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:
authorDavid Benson <david@draw.io>2022-05-19 17:41:39 +0300
committerDavid Benson <david@draw.io>2022-05-19 17:41:39 +0300
commit7764b250b3fa58b249542f4ff9a1ddc1362cf88c (patch)
treedfd6b89389535ad15a6a100347ef231b7804ea26
parentc63f3a04450f30798df47f9badbc74eb8a69fbdf (diff)
18.0.8 releasev18.0.8
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/java/com/mxgraph/online/EmbedServlet2.java2
-rw-r--r--src/main/java/com/mxgraph/online/ExportProxyServlet.java169
-rw-r--r--src/main/webapp/WEB-INF/web.xml14
-rw-r--r--src/main/webapp/electron.js28
-rw-r--r--src/main/webapp/js/app.min.js2738
-rw-r--r--src/main/webapp/js/diagramly/ElectronApp.js5
-rw-r--r--src/main/webapp/js/diagramly/Menus.js13
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js36
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar.js88
-rw-r--r--src/main/webapp/js/grapheditor/Graph.js102
-rw-r--r--src/main/webapp/js/integrate.min.js2842
-rw-r--r--src/main/webapp/js/viewer-static.min.js2041
-rw-r--r--src/main/webapp/js/viewer.min.js2041
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/resources/dia.txt1
-rw-r--r--src/main/webapp/resources/dia_am.txt1
-rw-r--r--src/main/webapp/resources/dia_ar.txt1
-rw-r--r--src/main/webapp/resources/dia_bg.txt1
-rw-r--r--src/main/webapp/resources/dia_bn.txt1
-rw-r--r--src/main/webapp/resources/dia_bs.txt1
-rw-r--r--src/main/webapp/resources/dia_ca.txt1
-rw-r--r--src/main/webapp/resources/dia_cs.txt1
-rw-r--r--src/main/webapp/resources/dia_da.txt1
-rw-r--r--src/main/webapp/resources/dia_de.txt1
-rw-r--r--src/main/webapp/resources/dia_el.txt1
-rw-r--r--src/main/webapp/resources/dia_eo.txt1
-rw-r--r--src/main/webapp/resources/dia_es.txt1
-rw-r--r--src/main/webapp/resources/dia_et.txt1
-rw-r--r--src/main/webapp/resources/dia_eu.txt1
-rw-r--r--src/main/webapp/resources/dia_fa.txt1
-rw-r--r--src/main/webapp/resources/dia_fi.txt1
-rw-r--r--src/main/webapp/resources/dia_fil.txt1
-rw-r--r--src/main/webapp/resources/dia_fr.txt1
-rw-r--r--src/main/webapp/resources/dia_gl.txt1
-rw-r--r--src/main/webapp/resources/dia_gu.txt1
-rw-r--r--src/main/webapp/resources/dia_he.txt1
-rw-r--r--src/main/webapp/resources/dia_hi.txt1
-rw-r--r--src/main/webapp/resources/dia_hr.txt1
-rw-r--r--src/main/webapp/resources/dia_hu.txt1
-rw-r--r--src/main/webapp/resources/dia_i18n.txt1
-rw-r--r--src/main/webapp/resources/dia_id.txt1
-rw-r--r--src/main/webapp/resources/dia_it.txt1
-rw-r--r--src/main/webapp/resources/dia_ja.txt1
-rw-r--r--src/main/webapp/resources/dia_kn.txt1
-rw-r--r--src/main/webapp/resources/dia_ko.txt1
-rw-r--r--src/main/webapp/resources/dia_lt.txt1
-rw-r--r--src/main/webapp/resources/dia_lv.txt1
-rw-r--r--src/main/webapp/resources/dia_ml.txt1
-rw-r--r--src/main/webapp/resources/dia_mr.txt1
-rw-r--r--src/main/webapp/resources/dia_ms.txt1
-rw-r--r--src/main/webapp/resources/dia_my.txt1
-rw-r--r--src/main/webapp/resources/dia_nl.txt1
-rw-r--r--src/main/webapp/resources/dia_no.txt1
-rw-r--r--src/main/webapp/resources/dia_pl.txt1
-rw-r--r--src/main/webapp/resources/dia_pt-br.txt1
-rw-r--r--src/main/webapp/resources/dia_pt.txt1
-rw-r--r--src/main/webapp/resources/dia_ro.txt1
-rw-r--r--src/main/webapp/resources/dia_ru.txt1
-rw-r--r--src/main/webapp/resources/dia_si.txt1
-rw-r--r--src/main/webapp/resources/dia_sk.txt1
-rw-r--r--src/main/webapp/resources/dia_sl.txt1
-rw-r--r--src/main/webapp/resources/dia_sr.txt1
-rw-r--r--src/main/webapp/resources/dia_sv.txt1
-rw-r--r--src/main/webapp/resources/dia_sw.txt1
-rw-r--r--src/main/webapp/resources/dia_ta.txt1
-rw-r--r--src/main/webapp/resources/dia_te.txt1
-rw-r--r--src/main/webapp/resources/dia_th.txt1
-rw-r--r--src/main/webapp/resources/dia_tr.txt1
-rw-r--r--src/main/webapp/resources/dia_uk.txt1
-rw-r--r--src/main/webapp/resources/dia_vi.txt1
-rw-r--r--src/main/webapp/resources/dia_zh-tw.txt1
-rw-r--r--src/main/webapp/resources/dia_zh.txt1
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
-rw-r--r--src/main/webapp/workbox-50a29d49.js2
-rw-r--r--src/main/webapp/workbox-50a29d49.js.map1
78 files changed, 5081 insertions, 5111 deletions
diff --git a/ChangeLog b/ChangeLog
index a7060689..9bb2c271 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+19-MAY-2022: 18.0.8
+
+- Deletes unused ExportProxyServlet
+
17-MAY-2022: 18.0.7
- Sets setInstanceFollowRedirects(false) in proxyservlet
diff --git a/VERSION b/VERSION
index f64fde37..fee4da9f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-18.0.7 \ No newline at end of file
+18.0.8 \ No newline at end of file
diff --git a/src/main/java/com/mxgraph/online/EmbedServlet2.java b/src/main/java/com/mxgraph/online/EmbedServlet2.java
index 0cfd3e72..6522e564 100644
--- a/src/main/java/com/mxgraph/online/EmbedServlet2.java
+++ b/src/main/java/com/mxgraph/online/EmbedServlet2.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.text.DateFormat;
@@ -398,6 +399,7 @@ public class EmbedServlet2 extends HttpServlet
completed.add(urls[i]);
URL url = new URL(urls[i]);
URLConnection connection = url.openConnection();
+ ((HttpURLConnection) connection).setInstanceFollowRedirects(false);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
Utils.copy(connection.getInputStream(), stream);
setCachedUrls += "GraphViewer.cachedUrls['"
diff --git a/src/main/java/com/mxgraph/online/ExportProxyServlet.java b/src/main/java/com/mxgraph/online/ExportProxyServlet.java
deleted file mode 100644
index 164e2012..00000000
--- a/src/main/java/com/mxgraph/online/ExportProxyServlet.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.mxgraph.online;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Servlet implementation ExportProxyServlet
- */
-@SuppressWarnings("serial")
-public class ExportProxyServlet extends HttpServlet
-{
- private final String EXPORT_URL = "http://localhost:8000/";
-
- private final String[] supportedServices = {"EXPORT_URL", "PLANTUML_URL", "VSD_CONVERT_URL", "EMF_CONVERT_URL"};
-
- private void doRequest(String method, HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException
- {
- try
- {
- int serviceId = 0;
- String proxyPath = "";
- String queryString = "";
-
- try
- {
- if (request.getQueryString() != null)
- {
- queryString = "?" + request.getQueryString();
- }
-
- if (request.getPathInfo() != null) // /{serviceId}/*
- {
- String[] pathParts = request.getPathInfo().split("/");
-
- if (pathParts.length > 1)
- {
- serviceId = Integer.parseInt(pathParts[1]);
- }
-
- if (pathParts.length > 2)
- {
- proxyPath = String.join("/", Arrays.copyOfRange(pathParts, 2, pathParts.length));
- }
-
- if (serviceId < 0 || serviceId > supportedServices.length)
- {
- serviceId = 0;
- }
- }
- }
- catch (Exception e)
- {
- // Ignore and use 0
- }
-
- String exportUrl = System.getenv(supportedServices[serviceId]);
-
- if (exportUrl == null)
- {
- exportUrl = EXPORT_URL;
- }
-
- URL url = new URL(exportUrl + proxyPath + queryString);
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
-
- con.setRequestMethod(method);
-
- //Copy request headers to export server
- Enumeration<String> headerNames = request.getHeaderNames();
-
- while (headerNames.hasMoreElements())
- {
- String headerName = headerNames.nextElement();
- Enumeration<String> headers = request.getHeaders(headerName);
-
- while (headers.hasMoreElements())
- {
- String headerValue = headers.nextElement();
- con.addRequestProperty(headerName, headerValue);
- }
- }
-
- if ("POST".equals(method))
- {
- // Send post request
- con.setDoOutput(true);
-
- OutputStream params = con.getOutputStream();
- Utils.copy(request.getInputStream(), params);
- params.flush();
- params.close();
- }
-
- int responseCode = con.getResponseCode();
- //Copy response code
- response.setStatus(responseCode);
-
- //Copy response headers
- Map<String, List<String>> map = con.getHeaderFields();
-
- for (Map.Entry<String, List<String>> entry : map.entrySet())
- {
- String key = entry.getKey();
-
- if (key != null)
- {
- for (String val : entry.getValue())
- {
-
- response.addHeader(entry.getKey(), val);
- }
- }
- }
-
- //Copy response
- OutputStream out = response.getOutputStream();
-
- //Error
- if (responseCode >= 400)
- {
- Utils.copy(con.getErrorStream(), out);
- }
- else //Success
- {
- Utils.copy(con.getInputStream(), out);
- }
-
- out.flush();
- out.close();
- }
- catch (Exception e)
- {
- response.setStatus(
- HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- e.printStackTrace();
- }
- }
-
-
- /**
- * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
- */
- protected void doGet(HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException
- {
- doRequest("GET", request, response);
- }
-
- /**
- * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
- */
- protected void doPost(HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException
- {
- doRequest("POST", request, response);
- }
-} \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index d847103e..d7e63368 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -97,20 +97,6 @@
</servlet-mapping>
<servlet>
<description/>
- <display-name>ExportProxyServlet</display-name>
- <servlet-name>ExportProxyServlet</servlet-name>
- <servlet-class>com.mxgraph.online.ExportProxyServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>ExportProxyServlet</servlet-name>
- <url-pattern>/export</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ExportProxyServlet</servlet-name>
- <url-pattern>/service/*</url-pattern>
- </servlet-mapping>
- <servlet>
- <description/>
<display-name>GitlabAuthServlet</display-name>
<servlet-name>GitlabAuthServlet</servlet-name>
<servlet-class>com.mxgraph.online.GitlabAuthServlet</servlet-class>
diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js
index 8a933a37..b847e5ac 100644
--- a/src/main/webapp/electron.js
+++ b/src/main/webapp/electron.js
@@ -38,6 +38,7 @@ const isMac = process.platform === 'darwin'
const isWin = process.platform === 'win32'
let enableSpellCheck = store.get('enableSpellCheck');
enableSpellCheck = enableSpellCheck != null? enableSpellCheck : isMac;
+let enableStoreBkp = store.get('enableStoreBkp') != null? store.get('enableStoreBkp') : true;
//Read config file
var queryObj = {
@@ -55,7 +56,8 @@ var queryObj = {
'export': 'https://convert.diagrams.net/node/export',
'disableUpdate': disableUpdate? 1 : 0,
'winCtrls': isMac? 0 : 1,
- 'enableSpellCheck': enableSpellCheck? 1 : 0
+ 'enableSpellCheck': enableSpellCheck? 1 : 0,
+ 'enableStoreBkp': enableStoreBkp? 1 : 0
};
try
@@ -75,6 +77,9 @@ catch(e)
console.log('Error in urlParams.json file: ' + e.message);
}
+// Trying sandboxing the renderer for more protection
+app.enableSandbox();
+
function createWindow (opt = {})
{
let lastWinSizeStr = store.get('lastWinSize');
@@ -93,7 +98,7 @@ function createWindow (opt = {})
preload: `${__dirname}/electron-preload.js`,
spellcheck: enableSpellCheck,
contextIsolation: true,
- disableBlinkFeatures: 'Auxclick'
+ disableBlinkFeatures: 'Auxclick' // Is this needed?
}
}, opt)
@@ -300,7 +305,7 @@ app.on('ready', e =>
webPreferences: {
preload: `${__dirname}/electron-preload.js`,
contextIsolation: true,
- disableBlinkFeatures: 'Auxclick'
+ disableBlinkFeatures: 'Auxclick' // Is this needed?
}
});
@@ -687,6 +692,14 @@ app.on('ready', e =>
ipcMain.on('toggleSpellCheck', toggleSpellCheck);
+ function toggleStoreBkp()
+ {
+ enableStoreBkp = !enableStoreBkp;
+ store.set('enableStoreBkp', enableStoreBkp);
+ };
+
+ ipcMain.on('toggleStoreBkp', toggleStoreBkp);
+
let updateNoAvailAdded = false;
function checkForUpdatesFn()
@@ -880,6 +893,11 @@ app.on('web-contents-created', (event, contents) => {
return {action: 'deny'}
}
})
+
+ // Disable all webviews
+ contents.on('will-attach-webview', (event, webPreferences, params) => {
+ event.preventDefault()
+ })
})
autoUpdater.on('error', e => log.error('@error@\n', e))
@@ -1260,7 +1278,7 @@ function exportDiagram(event, args, directFinalize)
preload: `${__dirname}/electron-preload.js`,
backgroundThrottling: false,
contextIsolation: true,
- disableBlinkFeatures: 'Auxclick'
+ disableBlinkFeatures: 'Auxclick' // Is this needed?
},
show : false,
frame: false,
@@ -1680,7 +1698,7 @@ async function saveFile(fileObject, data, origStat, overwrite, defEnc)
async function doSaveFile(isNew)
{
- if (!isNew)
+ if (enableStoreBkp && !isNew)
{
//Copy file to backup file (after conflict and stat is checked)
let bkpFh;
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 57881f82..7717dd81 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -468,7 +468,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"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.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:"18.0.7",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.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:"18.0.8",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]"!==
@@ -2421,8 +2421,8 @@ this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPatt
n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var L=e.getCellStyle(I,!1),H=[],S=[],V;for(V in L)H.push(L[V]),S.push(V);e.getModel().isEdge(I)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",H,"cells",[I]))}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);
e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<u.length;c++)0>mxUtils.indexOf(d,u[c])&&d.push(u[c]);var m="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),r=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(c=0;c<r.length;c++)for(f=0;f<r[c].length;f++)d.push(r[c][f]);for(c=0;c<k.length;c++)0>mxUtils.indexOf(d,k[c])&&d.push(k[c]);var x=function(I,L,H,S,V,ea,ka){S=null!=S?S:e.currentVertexStyle;V=null!=V?V:e.currentEdgeStyle;ea=null!=ea?ea:!0;H=null!=H?H:e.getModel();if(ka){ka=[];for(var wa=0;wa<I.length;wa++)ka=ka.concat(H.getDescendants(I[wa]));I=ka}H.beginUpdate();try{for(wa=0;wa<I.length;wa++){var W=I[wa];if(L)var Z=["fontSize",
-"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Fa=va[Ja],sa=Fa.indexOf("=");if(0<=sa){var za=Fa.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ga=r[ka];if(0<=mxUtils.indexOf(Ga,za))for(var Ta=0;Ta<Ga.length;Ta++){var eb=mxUtils.indexOf(Z,Ga[Ta]);0<=eb&&Z.splice(eb,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Xa=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
-null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Xa=mxUtils.setStyle(Xa,za,Ya))}Editor.simpleLabels&&(Xa=mxUtils.setStyle(mxUtils.setStyle(Xa,"html",null),"whiteSpace",null));H.setStyle(W,Xa)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
+"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Ga=va[Ja],sa=Ga.indexOf("=");if(0<=sa){var za=Ga.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ha=r[ka];if(0<=mxUtils.indexOf(Ha,za))for(var Ta=0;Ta<Ha.length;Ta++){var db=mxUtils.indexOf(Z,Ha[Ta]);0<=db&&Z.splice(db,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Va=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
+null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Va=mxUtils.setStyle(Va,za,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));H.setStyle(W,Va)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
var A=mxUtils.bind(this,function(I){null==I&&(I=window.event);return e.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=A,this.menubarContainer.onmousedown=A,this.toolbarContainer.onselectstart=A,this.toolbarContainer.onmousedown=A,this.diagramContainer.onselectstart=A,this.diagramContainer.onmousedown=A,this.sidebarContainer.onselectstart=A,this.sidebarContainer.onmousedown=A,this.formatContainer.onselectstart=A,this.formatContainer.onmousedown=
A,this.footerContainer.onselectstart=A,this.footerContainer.onmousedown=A,null!=this.tabContainer&&(this.tabContainer.onselectstart=A));!this.editor.chromeless||this.editor.editable?(c=function(I){if(null!=I){var L=mxEvent.getSource(I);if("A"==L.nodeName)for(;null!=L;){if("geHint"==L.className)return!0;L=L.parentNode}}return A(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=
c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var C=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();C.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var L=mxUtils.getOffset(this.diagramContainer);
@@ -2486,8 +2486,8 @@ null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.a
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*S.width),this.scale*(this.translate.y+H.y*S.height),this.scale*H.width*S.width,
this.scale*H.height*S.height)};a.getPreferredPageSize=function(H,S,V){H=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,H.width*S.width,H.height*S.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(H,S,V,ea){if(null!=a.container&&!a.isViewer()){V=null!=V?V:0;ea=null!=ea?ea:0;var ka=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,Z=a.view.scale,
-oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Fa=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Fa/oa.width)):Z;S=(Fa-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
-ka.width<Fa||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Ga=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Ga/oa.width)):Z;S=(Ga-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
+ka.width<Ga||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(H){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(H){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(H,S,V){k++;
@@ -2779,27 +2779,27 @@ e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mx
2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,c){var f=!0;null!=c&&1==a.length&&(a=this.graph.getCellStyle(a[c]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
Sidebar.prototype.createDragSource=function(a,c,f,e,g){function d(Z,oa){var va=mxUtils.createImage(Z.src);va.style.width=Z.width+"px";va.style.height=Z.height+"px";null!=oa&&va.setAttribute("title",oa);mxUtils.setOpacity(va,Z==this.refreshTarget?30:20);va.style.position="absolute";va.style.cursor="crosshair";return va}function k(Z,oa,va,Ja){null!=Ja.parentNode&&(mxUtils.contains(va,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return va}for(var n=this.editorUi,u=n.editor.graph,
-m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Fa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
+m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Ga){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
e&&null!=L&&null!=E&&L!=fa?(sa=Z.model.isEdge(E.cell)||null==m?r:m,Z.setSelectionCells(this.dropAndConnect(E.cell,e,I,sa,oa))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(Z.view.getState(Z.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(Z,oa){F.isActive()&&F.reset()});var K=F.mouseDown;F.mouseDown=function(Z){mxEvent.isPopupTrigger(Z)||mxEvent.isMultiTouchEvent(Z)||u.isCellLocked(u.getDefaultParent())||(u.stopEditing(),
K.apply(this,arguments))};var E=null,O=null,R=null,Q=!1,P=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),T=d(this.triangleDown,mxResources.get("connect")),U=d(this.triangleLeft,mxResources.get("connect")),fa=d(this.refreshTarget,mxResources.get("replace")),ha=null,ba=d(this.roundDrop),qa=d(this.roundDrop),I=mxConstants.DIRECTION_NORTH,L=null,H=F.createPreviewElement;F.createPreviewElement=function(Z){var oa=H.apply(this,arguments);mxClient.IS_SVG&&
(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var S=F.dragEnter;F.dragEnter=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");S.apply(this,arguments)};var V=F.dragExit;F.dragExit=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");V.apply(this,arguments)};F.dragOver=function(Z,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=L&&this.currentGuide.hide();
-if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Fa=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
-sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ga=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ga=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Fa.x-sa)*va.scale+Ga+"px";this.previewElement.style.top=(Fa.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Fa.width*va.scale+"px",
-this.previewElement.style.height=Fa.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
-this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Fa=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,eb,Ua){return Z.isContainer(Ta.cell)});if(null!=Fa&&!this.graph.isCellConnectable(Fa)&&!this.graph.model.isEdge(Fa)){var sa=this.graph.getModel().getParent(Fa);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
-(Fa=sa)}Z.isCellLocked(Fa)&&(Fa=null);var za=Z.view.getState(Fa);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
+if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Ga=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
+sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ha=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ha=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Ga.x-sa)*va.scale+Ha+"px";this.previewElement.style.top=(Ga.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Ga.width*va.scale+"px",
+this.previewElement.style.height=Ga.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
+this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Ga=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,db,Ua){return Z.isContainer(Ta.cell)});if(null!=Ga&&!this.graph.isCellConnectable(Ga)&&!this.graph.model.isEdge(Ga)){var sa=this.graph.getModel().getParent(Ga);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
+(Ga=sa)}Z.isCellLocked(Ga)&&(Ga=null);var za=Z.view.getState(Ga);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ka||Z.model.isEdge(za.cell))&&ka>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(za)&&(Z.model.isVertex(za.cell)&&null!=r||Z.model.isEdge(za.cell)&&Z.model.isEdge(e[0]))){if(Z.isCellEditable(za.cell)){R=
za;var ra=Z.model.isEdge(za.cell)?Z.view.getPoint(za):new mxPoint(za.getCenterX(),za.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);fa.style.left=Math.floor(ra.x)+"px";fa.style.top=Math.floor(ra.y)+"px";null==ha&&(Z.container.appendChild(fa),ha=fa.parentNode);k(oa,va,ra,fa)}}else null==R||!mxUtils.contains(R,oa,va)||1500<ka&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ha&&(fa.parentNode.removeChild(fa),
-ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ga=E.absolutePoints;null!=ba.parentNode&&(ra=Ga[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ga=Ga[Ga.length-1],sa.add(k(oa,va,new mxRectangle(Ga.x-this.roundDrop.width/2,Ga.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ga&&(ra.x-=
-Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
+ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ha=E.absolutePoints;null!=ba.parentNode&&(ra=Ha[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ha=Ha[Ha.length-1],sa.add(k(oa,va,new mxRectangle(Ha.x-this.roundDrop.width/2,Ha.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ha&&(ra.x-=
+Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
ra.width,E.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),T)),sa.add(k(oa,va,new mxRectangle(ra.x-this.triangleLeft.width,E.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),U));null!=sa&&sa.grow(10)}I=mxConstants.DIRECTION_NORTH;L==aa?I=mxConstants.DIRECTION_EAST:L==T||L==
-qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Fa)&&null!=r||Z.model.isVertex(Fa)&&Z.isCellConnectable(Fa));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Fa)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Fa)?
-(Ga=za.absolutePoints,null!=Ga&&(ra=Ga[0],Ga=Ga[Ga.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ga.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ga.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Fa,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Fa,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
-null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ga&&(ra.x-=Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=
-Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
-(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Fa=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);sa=Z.getModel();if(null!=Fa&&(null!=L||!Z.isSplitTarget(Fa,e,Ja))){for(;null!=Fa&&!Z.isValidDropTarget(Fa,e,Ja)&&sa.isVertex(sa.getParent(Fa));)Fa=sa.getParent(Fa);null!=Fa&&(Z.view.currentRoot==Fa||!Z.isValidRoot(Fa)&&0==Z.getModel().getChildCount(Fa)||Z.isCellLocked(Fa)||sa.isEdge(Fa)||!Z.isValidDropTarget(Fa,e,Ja))&&(Fa=null)}Z.isCellLocked(Fa)&&(Fa=null);return Fa});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
+qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Ga)&&null!=r||Z.model.isVertex(Ga)&&Z.isCellConnectable(Ga));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Ga)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Ga)?
+(Ha=za.absolutePoints,null!=Ha&&(ra=Ha[0],Ha=Ha[Ha.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ha.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ha.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Ga,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Ga,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
+null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ha&&(ra.x-=Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=
+Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
+(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Ga=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);sa=Z.getModel();if(null!=Ga&&(null!=L||!Z.isSplitTarget(Ga,e,Ja))){for(;null!=Ga&&!Z.isValidDropTarget(Ga,e,Ja)&&sa.isVertex(sa.getParent(Ga));)Ga=sa.getParent(Ga);null!=Ga&&(Z.view.currentRoot==Ga||!Z.isValidRoot(Ga)&&0==Z.getModel().getChildCount(Ga)||Z.isCellLocked(Ga)||sa.isEdge(Ga)||!Z.isValidDropTarget(Ga,e,Ja))&&(Ga=null)}Z.isCellLocked(Ga)&&(Ga=null);return Ga});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
Z[oa].parentNode&&Z[oa].parentNode.removeChild(Z[oa]);null!=E&&null!=O&&O.reset();L=ha=R=E=O=null};return F};
Sidebar.prototype.itemClicked=function(a,c,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){c=null;for(var g=0;g<a.length&&null==c;g++)e.model.isVertex(a[g])&&(c=g);null!=c&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),c.drop(e,f,null,a.x,a.y,!0))};
@@ -2860,6 +2860,8 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
Graph.createSvgImage=function(a,c,f,e,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=g?'viewBox="0 0 '+e+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,c)};
+Graph.createSvgNode=function(a,c,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
+k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+c+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,c,f,e){var g=document.createElement("canvas");g.width=c;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
Graph.zapGremlins=function(a){for(var c=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&f.push(a.substring(c));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(c,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){a=mxUtils.getXml(a);return Graph.compress(c?a:Graph.zapGremlins(a))};
Graph.arrayBufferToString=function(a){var c="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)c+=String.fromCharCode(a[e]);return c};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(c){return c.charCodeAt(0)})};
@@ -3059,13 +3061,13 @@ B=this.snap(B));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.move
null==D.get(this.model.getParent(t[G]))&&(ja.offset=null,ja.relative=!1,ja.x=da.x/da.view.scale-da.view.translate.x,ja.y=da.y/da.view.scale-da.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),B);return M.encode(X)};Graph.prototype.isSwimlane=function(t,z){var B=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(B=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==
B};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var B=this.getCurrentCellStyle(z);if(null!=B.expand)return"0"!=B.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,B,D,G,M,X,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(M,X,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,
[t,z,B,D,G,M,X,ia]);this.model.setValue(B,"");var da=this.getChildCells(B,!0);for(z=0;z<da.length;z++){var ja=this.getCellGeometry(da[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(da[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ja=this.getCellGeometry(ta[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[B]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[B]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Ha=this.getCurrentCellStyle(Ba);null!=Ha&&"1"==Ha.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
+null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Da=this.getCurrentCellStyle(Ba);null!=Da&&"1"==Da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
function(t,z,B){if(z||B)m.apply(this,arguments);else{var D=this.getSelectionCell(),G=null,M=[],X=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(M.push(ia),ia==D)G=M.length-1;else if(t&&null==D&&0<M.length||null!=G&&t&&M.length>G||!t&&0<G)return;for(var da=0;da<this.model.getChildCount(ia);da++)X(this.model.getChildAt(ia,da))});X(this.model.root);0<M.length&&(G=null!=G?mxUtils.mod(G+(t?1:-1),M.length):0,this.setSelectionCell(M[G]))}};
Graph.prototype.swapShapes=function(t,z,B,D,G,M,X){z=!1;if(!D&&null!=G&&1==t.length&&(D=this.view.getState(G),B=this.view.getState(t[0]),null!=D&&null!=B&&(null!=M&&mxEvent.isShiftDown(M)||"umlLifeline"==D.style.shape&&"umlLifeline"==B.style.shape)&&(D=this.getCellGeometry(G),M=this.getCellGeometry(t[0]),null!=D&&null!=M))){z=D.clone();D=M.clone();D.x=z.x;D.y=z.y;z.x=M.x;z.y=M.y;this.model.beginUpdate();try{this.model.setGeometry(G,z),this.model.setGeometry(t[0],D)}finally{this.model.endUpdate()}z=
!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,B,D,G,M,X){if(this.swapShapes(t,z,B,D,G,M,X))return t;X=null!=X?X:{};if(this.isTable(G)){for(var ia=[],da=0;da<t.length;da++)this.isTable(t[da])?ia=ia.concat(this.model.getChildCells(t[da],!0).reverse()):ia.push(t[da]);t=ia}this.model.beginUpdate();try{ia=[];for(da=0;da<t.length;da++)if(null!=G&&this.isTableRow(t[da])){var ja=this.model.getParent(t[da]),ta=this.getCellGeometry(t[da]);this.isTable(ja)&&ia.push(ja);
-if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Ha=this.model.getChildCells(G,!0);if(0<Ha.length){t[da]=D?this.cloneCell(t[da]):t[da];var Na=this.model.getChildCells(t[da],!0),Ma=this.model.getChildCells(Ha[0],!0),Ia=Ma.length-Na.length;if(0<Ia)for(var Ea=
-0;Ea<Ia;Ea++){var Da=this.cloneCell(Na[Na.length-1]);null!=Da&&(Da.value="",this.model.add(t[da],Da))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Na[Na.length+Ea-1]);Na=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<Ma.length;Ea++){var La=this.getCellGeometry(Ma[Ea]),Oa=this.getCellGeometry(Na[Ea]);null!=La&&null!=Oa&&(Oa=Oa.clone(),Oa.width=La.width,this.model.setGeometry(Na[Ea],Oa))}}}}var Ra=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
-this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Ra)}finally{this.model.endUpdate()}return Ra};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
+if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Da=this.model.getChildCells(G,!0);if(0<Da.length){t[da]=D?this.cloneCell(t[da]):t[da];var Ma=this.model.getChildCells(t[da],!0),La=this.model.getChildCells(Da[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Ea=
+0;Ea<Ia;Ea++){var Fa=this.cloneCell(Ma[Ma.length-1]);null!=Fa&&(Fa.value="",this.model.add(t[da],Fa))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Ma[Ma.length+Ea-1]);Ma=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<La.length;Ea++){var Oa=this.getCellGeometry(La[Ea]),Pa=this.getCellGeometry(Ma[Ea]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Ea],Pa))}}}}var Na=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
+this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
"")}else{if(this.isTableRow(t[D])&&(M=this.model.getParent(t[D]),0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M))){for(var X=this.model.getChildCells(M,!0),ia=0,da=0;da<X.length;da++)0<=mxUtils.indexOf(t,X[da])&&ia++;ia==X.length&&B.push(M)}B.push(t[D])}B=x.apply(this,[B,z])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(t,z,B){B=null!=B?B:new Graph;for(var D=0;D<z.length;D++)null!=z[D]&&B.updateCustomLinksForCell(t,z[D],B)};Graph.prototype.updateCustomLinksForCell=
function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var B=this.model.getChildCount(z),D=0;D<B;D++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,D))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var B=JSON.parse(z);for(z=0;z<B.length;z++){var D=B[z];t.push(new mxConnectionConstraint(new mxPoint(D[0],D[1]),2<D.length?"0"!=D[2]:!0,null,3<D.length?
D[3]:0,4<D.length?D[4]:0))}}catch(M){}return t}if(null!=t.shape&&null!=t.shape.bounds){D=t.shape.direction;z=t.shape.bounds;var G=t.shape.scale;B=z.width/G;z=z.height/G;if(D==mxConstants.DIRECTION_NORTH||D==mxConstants.DIRECTION_SOUTH)D=B,B=z,z=D;z=t.shape.getConstraints(t.style,B,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
@@ -3073,9 +3075,9 @@ t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBO
function(t,z,B){for(var D=this.getCurrentCellStyle(t),G=!0,M=!0,X=0;X<z.length&&M;X++)G=G&&this.isTable(z[X]),M=M&&this.isTableRow(z[X]);return(1==z.length&&null!=B&&mxEvent.isShiftDown(B)&&!mxEvent.isControlDown(B)&&!mxEvent.isAltDown(B)||("1"!=mxUtils.getValue(D,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(D,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||M||G))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var B=this.model.getParent(t);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this,
arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var B=this.getModel(),D=[];B.beginUpdate();try{for(var G=0;G<t.length;G++){var M=t[G];if(B.isEdge(M)){var X=B.getTerminal(M,!0),ia=B.getTerminal(M,!1);B.setTerminal(M,ia,!0);B.setTerminal(M,X,!1);var da=B.getGeometry(M);if(null!=da){da=da.clone();null!=da.points&&da.points.reverse();var ja=da.getTerminalPoint(!0),ta=da.getTerminalPoint(!1);
-da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Ha=this.view.getState(X),Na=this.view.getState(ia);if(null!=Ba){var Ma=null!=Ha?this.getConnectionConstraint(Ba,Ha,!0):null,Ia=null!=Na?this.getConnectionConstraint(Ba,Na,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,Ma);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Da=da.width;da.width=da.height;da.height=Da;B.setGeometry(M,da)}var La=this.view.getState(M);if(null!=La){var Oa=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(La.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Oa[mxUtils.mod(mxUtils.indexOf(Oa,Ra)+(z?-1:1),Oa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
+da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Da=this.view.getState(X),Ma=this.view.getState(ia);if(null!=Ba){var La=null!=Da?this.getConnectionConstraint(Ba,Da,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Ba,Ma,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,La);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Fa=da.width;da.width=da.height;da.height=Fa;B.setGeometry(M,da)}var Oa=this.view.getState(M);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
t=t.nextSibling}return!1};var A=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var B=this.view.getState(z);null!=B&&null!=B.shape&&(this.view.invalidate(z),B.shape.bounds=null)}A.apply(this,arguments);
t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var B=this.view.getState(t[z]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}};
Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var B=Array.prototype.slice.call(t.attributes);attr=B.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var B=0;B<t.length;B++)z(t[B])}};Graph.prototype.updateLabelElements=function(t,z,B){t=null!=t?t:this.getSelectionCells();for(var D=document.createElement("div"),
@@ -3093,43 +3095,42 @@ z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.rou
D.geometry.relative=!0;D.connectable=!1;var G=this.view.getRelativePoint(B,t,z);D.geometry.x=Math.round(1E4*G.x)/1E4;D.geometry.y=Math.round(G.y);D.geometry.offset=new mxPoint(0,0);G=this.view.getPoint(B,D.geometry);var M=this.view.scale;D.geometry.offset=new mxPoint(Math.round((t-G.x)/M),Math.round((z-G.y)/M))}else G=this.view.translate,D.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",D.geometry.width=40,D.geometry.height=20,D.geometry.x=Math.round(t/this.view.scale)-
G.x-(null!=B?B.origin.x:0),D.geometry.y=Math.round(z/this.view.scale)-G.y-(null!=B?B.origin.y:0),D.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([D],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[D])),this.autoSizeCell(D)}finally{this.getModel().endUpdate()}return D};Graph.prototype.addClickHandler=function(t,z,B){var D=mxUtils.bind(this,function(){var da=this.container.getElementsByTagName("a");if(null!=da)for(var ja=0;ja<da.length;ja++){var ta=
this.getAbsoluteUrl(da[ja].getAttribute("href"));null!=ta&&(da[ja].setAttribute("rel",this.linkRelation),da[ja].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(da[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,D);D();var G=this.container.style.cursor,M=this.getTolerance(),X=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(da){var ja=
-da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Ha){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
+da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Da){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(da,ja){if(X.isMouseDown)null!=this.currentLink&&(da=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(da>M||ja>M)&&this.clear());else{for(da=ja.getSource();null!=da&&"a"!=da.nodeName.toLowerCase();)da=da.parentNode;null!=da?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
X.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!X.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(da,ja){var ta=ja.getSource();for(da=ja.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-X.container.scrollLeft)<M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&
((mxEvent.isLeftMouseButton(da)||mxEvent.isMiddleMouseButton(da))&&!mxEvent.isPopupTrigger(da)||mxEvent.isTouchEvent(da))&&(null!=this.currentLink?(ta=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(da,this.currentLink),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":ta?X.linkTarget:"_top",X.openLink(this.currentLink,da),ja.consume())):null!=B&&!ja.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&Math.abs(this.startX-ja.getGraphX())<M&&Math.abs(this.startY-ja.getGraphY())<M&&B(ja.getEvent()));this.clear()},activate:function(da){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(da.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(da.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(da))},clear:function(){null!=X.container&&(X.container.style.cursor=G);this.currentLink=this.currentState=
this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(da){};X.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(da){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var B=0;B<t.length;B++)this.isTableCell(t[B])&&(t[B]=this.model.getParent(t[B]));t=this.model.getTopmostCells(t);var D=this.getModel(),G=this.gridSize,M=[];D.beginUpdate();
-try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Ha=this.getCellGeometry(da[B]),Na=this.getCellGeometry(ja);null!=Ha&&null!=Na&&(Na=Na.clone(),Na.height+=Ha.height,D.setGeometry(ja,Na))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Da=this.getCellGeometry(da[B]),Ma=this.getCellGeometry(ja);null!=Da&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,D.setGeometry(ja,Ma))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
"cells",da))}finally{D.endUpdate()}return M};Graph.prototype.insertImage=function(t,z,B){if(null!=t&&null!=this.cellEditor.textarea){for(var D=this.cellEditor.textarea.getElementsByTagName("img"),G=[],M=0;M<D.length;M++)G.push(D[M]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==G.length+1)for(M=t.length-1;0<=M;M--)if(0==M||t[M]!=G[M-1]){t[M].setAttribute("width",z);t[M].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(t){if(null!=
this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),B=[],D=0;D<z.length;D++)B.push(z[D]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==B.length+1)for(D=z.length-1;0<=D;D--)if(z[D]!=B[D-1]){for(z=z[D].getElementsByTagName("a");0<z.length;){for(B=z[0].parentNode;null!=z[0].firstChild;)B.insertBefore(z[0].firstChild,z[0]);
B.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var B=[],D=null,
-G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Ha){return t?Ba.x-Ha.x:Ba.y-Ha.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
+G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Da){return t?Ba.x-Da.x:Ba.y-Da.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
ta=this.getCellGeometry(B[M].cell);D+=da;null!=ta&&null!=ja&&(ta=ta.clone(),t?ta.x=Math.round(D-ta.width/2)-ja.origin.x:ta.y=Math.round(D-ta.height/2)-ja.origin.y,this.getModel().setGeometry(B[M].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,B){return this.getLinkForCell(z.cell)});
-return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Ha,Na){var Ma=null;if(null!=Na)for(Ma=new mxDictionary,ta=0;ta<Na.length;ta++)Ma.put(Na[ta],!0);if(Na=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
-B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Ha?this.view.getBackgroundPageBounds():M&&null==Ma||D||"diagram"==Ha?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Ha&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
-if(null==Ia)throw Error(mxResources.get("drawingEmpty"));var Da=mxUtils.createXmlDocument(),La=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"svg"):Da.createElement("svg");null!=t&&(null!=La.style?La.style.backgroundColor=t:La.setAttribute("style","background-color:"+t));null==Da.createElementNS?(La.setAttribute("xmlns",mxConstants.NS_SVG),La.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):La.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);t=z/
-Ea;var Oa=Math.max(1,Math.ceil(Ia.width*t)+2*B)+(ja&&0==B?5:0),Ra=Math.max(1,Math.ceil(Ia.height*t)+2*B)+(ja&&0==B?5:0);La.setAttribute("version","1.1");La.setAttribute("width",Oa+"px");La.setAttribute("height",Ra+"px");La.setAttribute("viewBox",(G?"-0.5 -0.5":"0 0")+" "+Oa+" "+Ra);Da.appendChild(La);var Sa=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"g"):Da.createElement("g");La.appendChild(Sa);var Va=this.createSvgCanvas(Sa);Va.foOffset=G?-.5:0;Va.textOffset=G?-.5:0;Va.imageOffset=
-G?-.5:0;Va.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/Ea));var kb=document.createElement("div"),sb=Va.getAlternateText;Va.getAlternateText=function($a,lb,ab,fb,hb,Wa,gb,Qa,ob,xb,pb,qb,vb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(kb.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(kb.childNodes));for(var rb=Math.ceil(2*fb/this.state.fontSize),mb=[],b=0,h=0;(0==rb||b<rb)&&h<Wa.length;){var q=Wa.charCodeAt(h);if(10==q||13==q){if(0<b)break}else mb.push(Wa.charAt(h)),
-255>q&&b++;h++}mb.length<Wa.length&&1<Wa.length-mb.length&&(Wa=mxUtils.trim(mb.join(""))+"...");return Wa}catch(l){return sb.apply(this,arguments)}else return sb.apply(this,arguments)};var cb=this.backgroundImage;if(null!=cb){z=Ea/z;var nb=this.view.translate,tb=new mxRectangle((cb.x+nb.x)*z,(cb.y+nb.y)*z,cb.width*z,cb.height*z);mxUtils.intersects(Ia,tb)&&Va.image(cb.x+nb.x,cb.y+nb.y,cb.width,cb.height,cb.src,!0)}Va.scale(t);Va.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,
-jb=ia.getLinkForCellState;ia.getLinkForCellState=function($a,lb){var ab=jb.apply(this,arguments);return null==ab||$a.view.graph.isCustomLink(ab)?null:ab};ia.getLinkTargetForCellState=function($a,lb){return $a.view.graph.getLinkTargetForCell($a.cell)};ia.drawCellState=function($a,lb){for(var ab=$a.view.graph,fb=null!=Ma?Ma.get($a.cell):ab.isCellSelected($a.cell),hb=ab.model.getParent($a.cell);!(M&&null==Ma||fb)&&null!=hb;)fb=null!=Ma?Ma.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);(M&&null==
-Ma||fb)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),Va);this.updateSvgLinks(La,da,!0);this.addForeignObjectWarning(Va,La);return La}finally{Na&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
-var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x",
-"50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};
-Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=
-t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;
-t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=
-0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=
-B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=
-M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,
-X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?
-D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);
-null!=Ba&&(ta.height=Ba.height)}B.add(X[t],ja,G+(z?0:1))}var Ha=this.getCellGeometry(D);null!=Ha&&(Ha=Ha.clone(),Ha.width+=ia,B.setGeometry(D,Ha))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();
-B.beginUpdate();try{var D=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?
-0:M.length-1]}var X=B.getChildCells(G,!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=
-this.getCellGeometry(D);null!=ta&&(ta=ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,
-t));for(D=t=0;D<G.length;D++){var ia=z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||
-(D=G[G.length-1]);z.remove(D);t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};
-Graph.prototype.insertColumn=function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
+return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Da,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
+B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Da?this.view.getBackgroundPageBounds():M&&null==La||D||"diagram"==Da?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Da&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
+if(null==Ia)throw Error(mxResources.get("drawingEmpty"));D=z/Ea;Da=G?-.5:0;var Fa=Graph.createSvgNode(Da,Da,Math.max(1,Math.ceil(Ia.width*D)+2*B)+(ja&&0==B?5:0),Math.max(1,Math.ceil(Ia.height*D)+2*B)+(ja&&0==B?5:0),t),Oa=Fa.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Fa.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=G?-.5:0;Na.textOffset=G?-.5:0;Na.imageOffset=G?-.5:0;Na.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/
+Ea));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function(ab,mb,Xa,ib,gb,Wa,qb,tb,nb,fb,Ra,rb,xb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(Sa.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var kb=Math.ceil(2*ib/this.state.fontSize),hb=[],ob=0,lb=0;(0==kb||ob<kb)&&lb<Wa.length;){var sb=Wa.charCodeAt(lb);if(10==sb||13==sb){if(0<ob)break}else hb.push(Wa.charAt(lb)),255>sb&&ob++;lb++}hb.length<Wa.length&&1<Wa.length-
+hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(b){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var Za=this.backgroundImage;if(null!=Za){t=Ea/z;var pb=this.view.translate;Da=new mxRectangle((Za.x+pb.x)*t,(Za.y+pb.y)*t,Za.width*t,Za.height*t);mxUtils.intersects(Ia,Da)&&Na.image(Za.x+pb.x,Za.y+pb.y,Za.width,Za.height,Za.src,!0)}Na.scale(D);Na.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,vb=ia.getLinkForCellState;ia.getLinkForCellState=
+function(ab,mb){var Xa=vb.apply(this,arguments);return null==Xa||ab.view.graph.isCustomLink(Xa)?null:Xa};ia.getLinkTargetForCellState=function(ab,mb){return ab.view.graph.getLinkTargetForCell(ab.cell)};ia.drawCellState=function(ab,mb){for(var Xa=ab.view.graph,ib=null!=La?La.get(ab.cell):Xa.isCellSelected(ab.cell),gb=Xa.model.getParent(ab.cell);!(M&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Xa.isCellSelected(gb),gb=Xa.model.getParent(gb);(M&&null==La||ib)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),
+Na);this.updateSvgLinks(Fa,da,!0);this.addForeignObjectWarning(Na,Fa);return Fa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");
+null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);
+B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);
+t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;
+null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.selectNode=
+function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):
+D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,
+X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);
+B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):
+null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,
+!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(ta.height=Ba.height)}B.add(X[t],
+ja,G+(z?0:1))}var Da=this.getCellGeometry(D);null!=Da&&(Da=Da.clone(),Da.width+=ia,B.setGeometry(D,Da))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=null;
+if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?0:M.length-1]}var X=B.getChildCells(G,
+!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=this.getCellGeometry(D);null!=ta&&(ta=
+ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,t));for(D=t=0;D<G.length;D++){var ia=
+z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||(D=G[G.length-1]);z.remove(D);
+t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
+function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var B=document.createElement("div");B.innerHTML=t;t=document.createDocumentFragment();for(var D;D=B.firstChild;)lastNode=t.appendChild(D);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function B(G,M){G.length>M&&(G=G.substring(0,Math.round(M/2))+"..."+G.substring(G.length-Math.round(M/4)));return G}t=null!=t?t:"javascript:void(0);";
if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var D=document.createElement("a");D.setAttribute("rel",this.linkRelation);D.setAttribute("href",this.getAbsoluteUrl(t));D.setAttribute("title",B(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&D.setAttribute("target",this.linkTarget);mxUtils.write(D,B(z,40));this.isCustomLink(t)&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(G){this.customLinkClicked(t);mxEvent.consume(G)}));return D};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(M,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(M){M=t.apply(this,arguments);if(mxEvent.isTouchEvent(M.getEvent())&&null==M.getState()){var X=this.getCellAt(M.graphX,M.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,M.graphX,M.graphY)||(M.state=this.view.getState(X),null!=M.state&&
@@ -3166,14 +3167,14 @@ z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationH
function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 ba=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var L=null,H=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==L&&(L=mxCellRenderer.defaultShapes.tableLine);var t=H.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var z=function(Ma,Ia,Ea){for(var Da=[],La=0;La<Ma.length;La++){var Oa=Ma[La];Da.push(null==Oa?null:new mxPoint((da+Oa.x+Ia)*M,(ja+Oa.y+Ea)*M))}return Da},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Ha=D.getTableLines(this.state.cell,
-!1,!0),Na=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(Ma){var Ia=ta[Ma],Ea=Ma<ta.length-1?ta[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Da=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Na[Ma]?new L(Na[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var La=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==La?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Na[Ma],0,La),this.shape.updateBoundsFromLine();else{var Ra=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+La*M;this.shape.bounds.x=X.x+(Ma==ta.length-1?0:Ra.x*M);this.shape.bounds.width=X.width-(Ma==ta.length-1?0:Ra.width+Ra.x+M)}this.shape.redraw()}};var Oa=!1;
-Ia.setPosition=function(Ra,Sa,Va){La=Math.max(Graph.minTableRowHeight-Ra.height,Sa.y-Ra.y-Ra.height);Oa=mxEvent.isShiftDown(Va.getEvent());null!=Da&&Oa&&(La=Math.min(La,Da.height-Graph.minTableRowHeight))};Ia.execute=function(Ra){if(0!=La)D.setTableRowHeight(this.state.cell,La,!Oa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Ra.getGraphX(),Ra.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Ra)}La=0};Ia.reset=function(){La=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
-function(Ma){var Ia=D.view.getState(Ba[Ma]),Ea=D.getCellGeometry(Ba[Ma]),Da=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[Ma],D.getCellStyle(Ba[Ma])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Da.width*M,Ia.height=Da.height*M,Ia.updateCachedBounds());Ea=Ma<Ba.length-1?Ba[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var La=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ha[Ma]?new L(Ha[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Oa=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==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ha[Ma],Oa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(Da.width+Oa)*M;this.shape.bounds.y=X.y+(Ma==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(Ma==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Ra=!1;Ia.setPosition=function(Sa,Va,kb){Oa=Math.max(Graph.minTableColumnWidth-Da.width,Va.x-Sa.x-Da.width);Ra=mxEvent.isShiftDown(kb.getEvent());null==La||Ra||(Oa=Math.min(Oa,La.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Oa)D.setTableColumnWidth(this.state.cell,Oa,Ra);else if(!B.blockDelayedSelection){var Va=
-D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Va,Sa)}Oa=0};Ia.positionChanged=function(){};Ia.reset=function(){Oa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
+if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Ea){for(var Fa=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Fa.push(null==Pa?null:new mxPoint((da+Pa.x+Ia)*M,(ja+Pa.y+Ea)*M))}return Fa},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Da=D.getTableLines(this.state.cell,
+!1,!0),Ma=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(La){var Ia=ta[La],Ea=La<ta.length-1?ta[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Fa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ma[La]?new L(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var Oa=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==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*M;this.shape.bounds.x=X.x+(La==ta.length-1?0:Na.x*M);this.shape.bounds.width=X.width-(La==ta.length-1?0:Na.width+Na.x+M)}this.shape.redraw()}};var Pa=!1;
+Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Fa&&Pa&&(Oa=Math.min(Oa,Fa.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)D.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Na.getGraphX(),Na.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
+function(La){var Ia=D.view.getState(Ba[La]),Ea=D.getCellGeometry(Ba[La]),Fa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[La],D.getCellStyle(Ba[La])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Fa.width*M,Ia.height=Fa.height*M,Ia.updateCachedBounds());Ea=La<Ba.length-1?Ba[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Da[La]?new L(Da[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Pa=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==Pa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Da[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(Fa.width+Pa)*M;this.shape.bounds.y=X.y+(La==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(La==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,Za){Pa=Math.max(Graph.minTableColumnWidth-Fa.width,eb.x-Sa.x-Fa.width);Na=mxEvent.isShiftDown(Za.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)D.setTableColumnWidth(this.state.cell,Pa,Na);else if(!B.blockDelayedSelection){var eb=
+D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this,function(B){if(null!=B&&t.isVertex(B.cell)){var D=mxUtils.createImage(Editor.rowMoveImage);D.style.position="absolute";D.style.cursor="pointer";D.style.width="7px";D.style.height=
"4px";D.style.padding="4px 2px 4px 2px";D.rowState=B;mxEvent.addGestureListeners(D,mxUtils.bind(this,function(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(B.cell)||this.graph.selectCellForEvent(B.cell,G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),B.cell,G),mxEvent.consume(G))}));this.moveHandles.push(D);this.graph.container.appendChild(D)}})(this.graph.view.getState(t.getChildAt(this.state.cell,z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();
@@ -3204,28 +3205,28 @@ null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode
(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var Z=(new Date).getTime(),oa=0,va=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,B,D){va.apply(this,arguments);B!=this.currentTerminalState?(Z=(new Date).getTime(),
oa=0):oa=(new Date).getTime()-Z;this.currentTerminalState=B};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(t,z,B){z=null!=t&&0==t;var D=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,D,z):null;B=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=D?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=
-new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Fa.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
+new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ga=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return Ga.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
mxGraphHandler.prototype.getGuideStates=function(){for(var t=za.apply(this,arguments),z=[],B=0;B<t.length;B++)"1"!=mxUtils.getValue(t[B].style,"part","0")&&z.push(t[B]);return z};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),B=z.getParent(t.cell),D=this.graph.getCellGeometry(t.cell);return z.isEdge(B)&&null!=D&&D.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
-t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ga=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ga.apply(this,arguments)};
+t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ha=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ha.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var eb=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){eb.apply(this,arguments);null!=this.rotationShape&&null!=
+var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ua=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ua.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var B=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);B.dialect=mxConstants.DIALECT_SVG;B.init(this.graph.view.getOverlayPane());this.cornerHandles.push(B)}}var D=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(G,M){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));D()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(G,M){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title",
mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(G){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(G)}));this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(G){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Xa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Xa.apply(this,
+null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(D,G){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),B=this.graph.getLinksForState(this.state);if(null!=z||null!=B&&0<B.length)this.updateLinkHint(z,B),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var bb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();
var z=this.cornerHandles,B=z[0].bounds.height/2;z[0].bounds.x=this.state.x-z[0].bounds.width/2+t;z[0].bounds.y=this.state.y-B+t;z[0].redraw();z[1].bounds.x=z[0].bounds.x+this.state.width-2*t;z[1].bounds.y=z[0].bounds.y;z[1].redraw();z[2].bounds.x=z[0].bounds.x;z[2].bounds.y=this.state.y+this.state.height-2*t;z[2].redraw();z[3].bounds.x=z[1].bounds.x;z[3].bounds.y=z[2].bounds.y;z[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?
"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");bb.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),z=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),B=mxUtils.getBoundingBox(z,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var db=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){db.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
-this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ib=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(ib.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);
+"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var cb=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){cb.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
+this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var jb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(jb.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){$a.apply(this,arguments);
null!=this.linkHint&&(this.linkHint.style.visibility="")};var ca=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ca.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -3361,10 +3362,10 @@ null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;nu
null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){oa.style.display=ca==mxConstants.NONE?"none":"";va.style.display=oa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor);
n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);e.cellEditor.isContentEditing()||k.appendChild(va);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing"));
-n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Fa=this.addUnitInput(n,"pt",16,52,function(){Xa.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){ib.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){db.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
-arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ga=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ga&&(e.cellEditor.restoreSelection(Ga),Ga=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ga=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){cb.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
+arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ha=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ha&&(e.cellEditor.restoreSelection(Ha),Ha=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ta=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(Ga=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ga=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
+(Ha=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ha=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=U&&e.deleteColumn(T,U.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
@@ -3373,18 +3374,18 @@ function(ca){if(null!=T){var t=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s
""):(B.setAttribute("border","1"),B.style.border="1px solid "+z,B.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=T){var t=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,B,D,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
function(z){var B=null==U||null!=ca&&mxEvent.isShiftDown(ca)?T:U;e.processElements(B,function(D){D.style.backgroundColor=null});B.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=T){var ca=T.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?T.setAttribute("cellPadding",t):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));
f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d);
-a.appendChild(k);var eb=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
+a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=V)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),V.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(C,ca==mxConstants.ALIGN_LEFT);c(F,ca==mxConstants.ALIGN_CENTER);c(K,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(O,ca==mxConstants.ALIGN_TOP);c(R,ca==mxConstants.ALIGN_MIDDLE);c(Q,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ba.value=ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&
t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?L.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?
-L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Fa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Fa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
-za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Xa=this.installInputHandler(Fa,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var db=
-this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var ib=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Fa,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var Za=!1;d=function(){Za||
-(Za=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Ha){if(null!=Ba&&null!=Ha){if(Ba==Ha)return!0;if(Ba.length>Ha.length+1)return Ba.substring(Ba.length-Ha.length-1,Ba.length)=="-"+Ha}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Ha=ca;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
-2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Ha,Na){return null!=Na.style&&null!=Ha?(Ha=Ha.lineHeight,null!=Na.style.lineHeight&&"%"==Na.style.lineHeight.substring(Na.style.lineHeight.length-1)?parseInt(Na.style.lineHeight)/100:"px"==Ha.substring(Ha.length-2)?parseFloat(Ha)/Ba:parseInt(Ha)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
+L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Ga)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ga.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
+za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Va=this.installInputHandler(Ga,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var cb=
+this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Ga,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var $a=!1;d=function(){$a||
+($a=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Da){if(null!=Ba&&null!=Da){if(Ba==Da)return!0;if(Ba.length>Da.length+1)return Ba.substring(Ba.length-Da.length-1,Ba.length)=="-"+Da}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=Da.childNodes[0],Da.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
+2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Da,Ma){return null!=Ma.style&&null!=Da?(Da=Da.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Da.substring(Da.length-2)?parseFloat(Da)/Ba:parseInt(Da)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
0;ja<ia.length;ja++)if(da.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);M=Math.max(B(temp),M);var ta=D(M,temp,ia[ja]);if(ta!=X||isNaN(ta))X=""}null!=G&&(c(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),c(m[1],"italic"==G.fontStyle||z("I")||z("EM")),c(m[2],z("U")),c(aa,z("SUP")),c(P,z("SUB")),e.cellEditor.isTableSelected()?(c(ha,t(G.textAlign,"justify")),c(C,t(G.textAlign,"left")),c(F,t(G.textAlign,"center")),c(K,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),eb.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
-null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}Za=
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),db.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
+null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}$a=
!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea,"keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@@ -3454,7 +3455,7 @@ fa.style.width="23px";fa.style.height="1px";fa.style.borderBottom="1px solid "+t
m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){ka.apply(this,arguments)}),ba=this.addUnitInput(m,"pt",30,52,function(){ea.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");
R.style.height="8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){V.apply(this,arguments)}),I=this.addUnitInput(m,"pt",30,52,function(){S.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var L=this.addUnitInput(k,"pt",30,52,function(){wa.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&&
-a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Fa,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Fa),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
+a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Ga,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Ga),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
sa.style.color=this.defaultStrokeColor,sa.nextSibling.style.marginTop="0px"):(sa.nextSibling.style.position="relative",sa.nextSibling.style.top="-2px"));return sa}d=e.getSelectionState();if(oa||document.activeElement!=E)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),E.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=O)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==d.style.shape||"filledEdge"==
d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?U.style.borderBottom="1px dashed "+this.defaultStrokeColor:U.style.borderBottom="1px dotted "+this.defaultStrokeColor:U.style.borderBottom="1px solid "+this.defaultStrokeColor;fa.style.borderBottom=
U.style.borderBottom;W=Q.getElementsByTagName("div")[0];null!=W&&(Z=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(Z=null),"orthogonalEdgeStyle"==Z&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==Z||"none"==Z||null==Z?"geSprite geSprite-straight":"entityRelationEdgeStyle"==Z?"geSprite geSprite-entity":"elbowEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(d.style,
@@ -3509,19 +3510,19 @@ DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destro
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,U.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,U.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,U.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,U.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,U.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,U.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function qa(){mxActor.call(this)}function I(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxCylinder.call(this)}function V(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxEllipse.call(this)}function wa(){mxShape.call(this)}
-function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Fa(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ga(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function eb(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Xa(){mxArrowConnector.call(this);
-this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function db(){mxActor.call(this)}function ib(){mxActor.call(this)}function Za(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
-function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Da(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function La(){mxConnector.call(this)}
-function Oa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
+function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ga(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ha(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
+this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function cb(){mxActor.call(this)}function jb(){mxActor.call(this)}function $a(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
+function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Fa(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
+function Pa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
h,q,l,p){this.paintTableLine(b,this.line,0,0)};a.prototype.paintTableLine=function(b,h,q,l){if(null!=h){var p=null;b.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?b.moveTo(w.x+q,w.y+l):null!=p&&b.lineTo(w.x+q,w.y+l));p=w}b.end();b.stroke()}};a.prototype.intersectsRectangle=function(b){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(b,
-q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Ha.prototype.paintVertexShape.apply(this,
+q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Da.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-h,-q));v||this.outline||!(w&&J<p||!w&&J<l)||this.paintForeground(b,h,q,l,p)};c.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var J=v;v=w;w=J}b.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
s;this.paintTableForeground(b,h,q,l,p)}};c.prototype.paintTableForeground=function(b,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(b,l[p],h,q)};c.prototype.configurePointerEvents=function(b){0==this.getTitleSize()?b.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
c);mxUtils.extend(f,c);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(v,p);b.lineTo(0,p-v);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(l-v,0),b.lineTo(l,v),b.lineTo(v,v),b.close(),b.fill()),0!=J&&(b.setFillAlpha(Math.abs(J)),b.setFillColor(0>J?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(v,
-v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Ra=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
-mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Ra);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
-.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Ra));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
+v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Na);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
+.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
h,(1-Sa)*h),b.lineTo(0,.75*h),b.close());b.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,
-h);v||(b.moveTo(0,h),b.curveTo(0,-h/3,l,-h/3,l,h),b.lineTo(l,p-h),b.curveTo(l,p+h/3,0,p+h/3,0,p-h),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(0,p);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),b.close(),b.fill()),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),
@@ -3540,7 +3541,7 @@ q&&(b.ellipse(0,.5*p-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*p-5),b.
function(b,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("card",E);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));b.moveTo(0,h/2);b.quadTo(l/4,1.4*h,l/2,h/2);b.quadTo(3*l/4,h*(1-1.4),l,h/2);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};O.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=b.width,l=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*=
l,new mxRectangle(b.x,b.y+h,q,l-2*h);h*=q;return new mxRectangle(b.x+h,b.y,q-2*h,l)}return b};mxCellRenderer.registerShape("tape",O);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};R.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,
-0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
+0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*h),0,0)}return null};A.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(b.width,b.height));v=Math.min(v,.5*b.width,.5*(b.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(v,0,Math.min(b.width,b.width-q),Math.min(b.height,b.height-h)):new mxRectangle(Math.min(b.width,b.width-q),0,v,Math.min(b.height,b.height-h))}return new mxRectangle(0,Math.min(b.height,h),0,0)}return null};K.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
@@ -3551,9 +3552,9 @@ h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.siz
h=l/5;b.rect(0,0,h,p);b.fillAndStroke();b.rect(2*h,0,h,p);b.fillAndStroke();b.rect(4*h,0,h,p);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",T);U.prototype.moveTo=function(b,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;this.firstX=b;this.firstY=h};U.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
U.prototype.quadTo=function(b,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};U.prototype.curveTo=function(b,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};U.prototype.arcTo=function(b,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};U.prototype.lineTo=function(b,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(b-
this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;return}var w=Math.round(v/10),J=this.defaultVariation;5>w&&(w=5,J/=3);var y=q(b-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Y=(Math.random()-.5)*J;this.originalLineTo.call(this.canvas,y*v+this.lastX-Y*p,q*v+this.lastY-Y*l)}this.originalLineTo.call(this.canvas,b,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=
-h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var kb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){kb.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var sb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(b){sb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)nb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Za=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){Za.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(b){pb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l*
v,p*v)),b.moveTo(h+v,q),b.lineTo(h+l-v,q),b.quadTo(h+l,q,h+l,q+v),b.lineTo(h+l,q+p-v),b.quadTo(h+l,q+p,h+l-v,q+p),b.lineTo(h+v,q+p),b.quadTo(h,q+p,h,q+p-v),b.lineTo(h,q+v),b.quadTo(h,q,h+v,q)):(b.moveTo(h,q),b.lineTo(h+l,q),b.lineTo(h+l,q+p),b.lineTo(h,q+p),b.lineTo(h,q)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=.1;fa.prototype.fixedSize=!1;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=b.width,q=b.height;b=new mxRectangle(b.x,b.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}b.x+=Math.round(l);b.width-=Math.round(2*l);return b}return b};
@@ -3564,10 +3565,10 @@ this.position2)))),J=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.styl
q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("step",
qa);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,
0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(b,h,q,l,p){var v=Math.min(l/5,p/5)+1;b.begin();b.moveTo(h+l/2,q+v);b.lineTo(h+l/2,q+p-v);b.moveTo(h+v,q+p/2);b.lineTo(h+l-v,q+p/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-L);var tb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){tb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),tb.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Pa=this.style["symbol"+v+"VSpacing"]||Ca,
-Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Pa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Pa):la+Pa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+L);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),ab.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
+Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Qa):la+Qa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(b,h,q,l,p,v){v?(b.moveTo(0,0),b.lineTo(l/2,p/2),b.lineTo(l,0),b.end()):(b.moveTo(0,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(0,p),b.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(V,mxShape);V.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.ellipse(l/4,0,l/2,p/4);b.fillAndStroke();b.begin();b.moveTo(l/2,p/4);b.lineTo(l/2,2*p/3);b.moveTo(l/2,p/3);b.lineTo(0,p/3);b.moveTo(l/2,p/3);b.lineTo(l,p/3);b.moveTo(l/
2,2*p/3);b.lineTo(0,p);b.moveTo(l/2,2*p/3);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",V);mxUtils.extend(ea,mxShape);ea.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};ea.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,p/4);b.lineTo(0,3*p/4);b.end();b.stroke();b.begin();b.moveTo(0,p/2);b.lineTo(l/6,p/2);b.end();b.stroke();b.ellipse(l/6,0,5*l/6,p);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/8,q+p);b.lineTo(h+7*l/8,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",ka);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(l,0);b.lineTo(0,p);b.moveTo(0,0);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
@@ -3590,20 +3591,20 @@ y,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]):h==mxConstants
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?I.prototype.fixedSize:I.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=b.x,J=b.y,y=b.width,Y=b.height,N=b.getCenterX();b=b.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(N,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y-p),new mxPoint(N,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J+p),new mxPoint(N,J)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+p,J),new mxPoint(w+y-p,J),new mxPoint(w+y,b),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]);N=new mxPoint(N,
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(h,q);b.ellipse((l-v)/2,0,v,v);b.fillAndStroke();b.begin();b.moveTo(l/2,v);b.lineTo(l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ja,
-mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Fa,
-mxShape);Fa.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Fa);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
+mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ga,
+mxShape);Ga.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
p,l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=Math.min(h,p-h),y=Math.min(J+2*h,p-h);v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,
y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
-"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ga,mxRectangleShape);Ga.prototype.paintForeground=
-function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ga);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
-Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(eb,Ta);eb.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",eb);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
-this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Xa,mxArrowConnector);Xa.prototype.defaultWidth=10;Xa.prototype.defaultArrowWidth=20;Xa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Xa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Xa.prototype.getEdgeWidth=
-function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Xa);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=
+function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
+Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(db,Ta);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
+this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=
+function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
0),new mxPoint(l,p)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(bb,mxRectangleShape);bb.prototype.dx=20;bb.prototype.dy=20;bb.prototype.isHtmlAllowed=function(){return!1};bb.prototype.paintForeground=function(b,h,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
-Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",db);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(b,h,q,
-l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",ib);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(jb,mxActor);jb.prototype.redrawPath=function(b,h,q,
+l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",jb);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",$a);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(b,
h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h,
v),new mxPoint(h,p)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(h,0);b.lineTo(l,0);b.quadTo(l-2*h,p/2,l,p);b.lineTo(h,p);b.quadTo(h-
@@ -3613,21 +3614,21 @@ G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,h
function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/2,q+p);b.lineTo(h+l,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke();b.begin();b.moveTo(h+l/2,q);b.lineTo(h+l/2,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h+.145*l,q+.145*p);b.lineTo(h+.855*l,q+.855*p);b.end();b.stroke();b.begin();b.moveTo(h+.855*l,q+.145*p);b.lineTo(h+.145*l,q+.855*p);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(b,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(b,h,q,l,p){b.begin();b.moveTo(h,q);b.lineTo(h+l,q);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke();b.begin();b.moveTo(h,q+p);b.lineTo(h+l,q+p);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
-function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ha,mxEllipse);Ha.prototype.drawHidden=!0;Ha.prototype.paintVertexShape=function(b,h,q,
+function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(b,h,q,
l,p){this.outline||b.setStrokeColor(null);if(null!=this.style){var v=b.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(b.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||Y||N||y?(b.rect(h,q,l,p),b.fill(),b.pointerEvents=
-v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ha);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
+v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(La,mxActor);La.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",La);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
.2;Ia.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;b.moveTo(0,h);b.lineTo(w,h);b.lineTo(w,0);b.lineTo(v,0);b.lineTo(v,h);b.lineTo(l,h);b.lineTo(l,q);b.lineTo(v,q);b.lineTo(v,p);b.lineTo(w,p);b.lineTo(w,q);b.lineTo(0,q);b.close();b.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,
-h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Da,mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Fa,mxActor);Fa.prototype.cst={RECT2:"mxgraph.basic.rect"};Fa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Da.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
-"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Pa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
+enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Fa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Fa.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
+"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
v.relIndent?v.relIndent:Math.max(0,Math.min(50,N)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),ua=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Aa=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),zb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ab=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),wb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),yb=v&&v.gradientColor2?
-v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Da.prototype;b.setDashed(Ca);Pa&&""!=Pa&&b.setDashPattern(Pa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
+v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Fa.prototype;b.setDashed(Ca);Qa&&""!=Qa&&b.setDashPattern(Qa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
p)-y);(la||pa||na||ma)&&"frame"!=Y&&(b.begin(),la?v.moveNW(b,h,q,l,p,w,ua,y,ma):b.moveTo(0,0),la&&v.paintNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),na&&v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),b.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
b.begin(),la?v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma):b.moveTo(N,0),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(b,h,q,l,p,w,ya,y,N),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(b,h,q,l,p,w,xa,y,N),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),la&&ma&&v.paintNWInner(b,h,q,l,p,w,ua,y,N),b.fill(),"none"==zb&&(b.begin(),v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma),b.stroke()));
la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,
@@ -3652,81 +3653,81 @@ l,p,w,ya,y,na),v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma)
na,ma),b.close(),b.fillAndStroke())):"frame"!=Y?(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la)),b.stroke()):(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),v.lineNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),"double"==
Y&&(v.moveSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa)),b.stroke()):(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),v.lineSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,
h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.lineSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma)),b.stroke()):(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),v.lineNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,
-w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Da.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Da.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Da.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Da.prototype.moveSW=
-function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Da.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Da.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
-w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Da.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Da.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
-J)};Da.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Da.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Da.prototype.paintBottom=function(b,h,q,
-l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Da.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Da.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
-w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Da.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
-v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Da.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Da.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
-N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Da.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
-y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Da.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Da.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
-p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Da.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
-y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Da.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Da.prototype.lineSWInner=
-function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Da.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Da.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Da.prototype.moveNEInner=function(b,h,
-q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Da.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Da.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Da.prototype.lineNWInner=
-function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Da.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Pa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
-Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Pa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Pa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);Da.prototype.constraints=null;mxUtils.extend(La,mxConnector);La.prototype.origPaintEdgeShape=La.prototype.paintEdgeShape;
-La.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;La.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),La.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",La);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Fa.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Fa.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Fa.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Fa.prototype.moveSW=
+function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Fa.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Fa.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
+w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Fa.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Fa.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
+J)};Fa.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Fa.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Fa.prototype.paintBottom=function(b,h,q,
+l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Fa.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Fa.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
+w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Fa.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
+v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Fa.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Fa.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
+N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Fa.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
+y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Fa.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Fa.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
+p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Fa.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
+y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Fa.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Fa.prototype.lineSWInner=
+function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Fa.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
+y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Fa.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Fa.prototype.moveNEInner=function(b,h,
+q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Fa.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
+("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Fa.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Fa.prototype.lineNWInner=
+function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Fa.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
+Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Qa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Fa.prototype.cst.RECT2,Fa);Fa.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
+Oa.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var b=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=b.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Pa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Pa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Pa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
-b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Oa.apply(this,arguments),Pa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Pa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Pa-Ka+v*y,N.y-Ka+Pa-p*y);b.lineTo(N.x+Ka-Pa-v*y,N.y-Ka-Pa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
-h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa.x-Ca,Pa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Pa.x+Ca,Pa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
-b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ub=function(b,h,q){return jb(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
-w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},jb=function(b,h,q,l,p){return Qa(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Pa=y.y-Ca.y,Ka=Math.sqrt(Y*
-Y+Pa*Pa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Pa/Ka,Ca,y,w,J)})},$a=function(b){return function(h){return[Qa(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
-2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},lb=function(b){return function(h){return[Qa(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},ab=function(b,h,q){return function(l){var p=[Qa(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},fb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Qa(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
-Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(gb(v));return w}},hb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Qa(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},Wa=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));return h}},gb=function(b,h){return Qa(b,
+function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Qa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Qa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Qa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
+b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Qa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Qa-Ka+v*y,N.y-Ka+Qa-p*y);b.lineTo(N.x+Ka-Qa-v*y,N.y-Ka-Qa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
+h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa.x-Ca,Qa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Qa.x+Ca,Qa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
+b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var mb=function(b,h,q){return Xa(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
+w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},Xa=function(b,h,q,l,p){return Ra(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Y*
+Y+Qa*Qa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Qa/Ka,Ca,y,w,J)})},ib=function(b){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
+2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},gb=function(b){return function(h){return[Ra(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},Wa=function(b,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
+Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},tb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));return h}},fb=function(b,h){return Ra(b,
[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var p=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*
-p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Qa=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
-w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},ob={link:function(b){return[ub(b,!0,10),ub(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
+w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},rb={link:function(b){return[mb(b,!0,10),mb(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),
-Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Y.getEvent())||
-Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],
b.style.startWidth=b.style.endWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<h&&(b.style.endWidth=b.style.startWidth))})));return q},swimlane:function(b){var h=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(gb(b,q/2))}h.push(Qa(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(b,q/2))}h.push(Ra(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=b.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(b.cell)||p.isTableCell(b.cell))){l=p.getSwimlaneDirection(b.style);var v=p.model.getParent(b.cell);v=p.model.getChildCells(v,!0);for(var w=[],J=0;J<v.length;J++)v[J]!=b.cell&&p.isSwimlane(v[J])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[J]))==
-l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:Wa(),ext:Wa(),rectangle:Wa(),triangle:Wa(),rhombus:Wa(),umlLifeline:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Qa(b,
+l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Ra(b,
["width","height"],function(h){var q=Math.max(oa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),l=Math.max(1.5*oa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(h.height,q.y-h.y)))},
-!1)]},process:function(b){var h=[Qa(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
-!1)&&h.push(gb(b));return h},cross:function(b){return[Qa(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,
-Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
-function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Qa(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},dataStorage:function(b){return[Qa(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
-[Qa(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},internalStorage:function(b){var h=[Qa(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
-h.push(gb(b));return h},module:function(b){return[Qa(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
-q.y-h.y))/2)})]},corner:function(b){return[Qa(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Qa(b,["dx","dy"],function(h){var q=
-Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:$a(1),doubleArrow:$a(.5),folder:function(b){return[Qa(b,["tabWidth","tabHeight"],function(h){var q=
+!1)]},process:function(b){var h=[Ra(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
+!1)&&h.push(fb(b));return h},cross:function(b){return[Ra(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,
+Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
+function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Ra(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},dataStorage:function(b){return[Ra(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
+[Ra(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},internalStorage:function(b){var h=[Ra(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
+h.push(fb(b));return h},module:function(b){return[Ra(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
+q.y-h.y))/2)})]},corner:function(b){return[Ra(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Ra(b,["dx","dy"],function(h){var q=
+Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),folder:function(b){return[Ra(b,["tabWidth","tabHeight"],function(h){var q=
Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Qa(b,["size"],function(h){var q=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Qa(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
-Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:lb(x.prototype.size),cylinder3:lb(A.prototype.size),offPageConnector:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
+(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Ra(b,["size"],function(h){var q=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Ra(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
+Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(A.prototype.size),offPageConnector:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];b=Graph.createHandle(b,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*
-Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:fb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:fb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:fb(aa.prototype.size,!1),display:fb(Ea.prototype.size,!1),cube:ab(1,e.prototype.size,!1),card:ab(.5,E.prototype.size,!0),loopLimit:ab(.5,G.prototype.size,!0),trapezoid:hb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:hb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
-Qa;Graph.handleFactory=ob;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=ob[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(h=ob[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=ob[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),qb=new mxPoint(1,0),vb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,
-Math.cos(vb),Math.sin(vb));var rb=mxUtils.toRadians(-150);qb=mxUtils.getRotatedPoint(qb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=pb.x,Y=pb.y,N=qb.x,Ca=qb.y,Pa="horizontal"==mxUtils.getValue(b.style,
-"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Pa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var mb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return mb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:qb(aa.prototype.size,!1),display:qb(Ea.prototype.size,!1),cube:Wa(1,e.prototype.size,!1),card:Wa(.5,E.prototype.size,!0),loopLimit:Wa(.5,G.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
+Ra;Graph.handleFactory=rb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=rb[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
+Math.cos(ob),Math.sin(ob));var lb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=kb.x,Y=kb.y,N=hb.x,Ca=hb.y,Qa="horizontal"==mxUtils.getValue(b.style,
+"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Qa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return b};r.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*
Math.tan(l),.5*q);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,l));return b};ba.prototype.getConstraints=function(b,h,q){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-l)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return b};E.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3738,8 +3739,8 @@ null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.
"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(h+l),p))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=
-mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(p+h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};za.prototype.getConstraints=function(b,h,q){h=parseFloat(mxUtils.getValue(b,"jettyWidth",za.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
"jettyHeight",za.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,3.5*b))];q>5*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>
@@ -3755,12 +3756,12 @@ h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];Q.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;$a.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(h+l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};db.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};cb.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};ib.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
+1),!1));return b};jb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return b};t.prototype.getConstraints=function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};Ia.prototype.getConstraints=
@@ -3768,7 +3769,7 @@ function(b,h,q){b=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mx
0),!1,null,p,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return b};Z.prototype.constraints=null;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(m){d.escape();m=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),m);null!=m&&d.setSelectionCells(m)}function c(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var m=d.getSelectionCells(),r=0;r<m.length;r++)d.cellLabelChanged(m[r],"")}finally{d.getModel().endUpdate()}}}function f(m,r,x,A,C){C.getModel().beginUpdate();try{var F=C.getCellGeometry(m);null!=F&&x&&A&&(x/=A,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,C.getModel().setGeometry(m,
F));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var m=d.view.scale,
@@ -4069,26 +4070,26 @@ image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:
{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn")+" 2.0",id:"bpmn2",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"},{title:"Value Stream Mapping",id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",
id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:"Fluid Power (ISO 1219)",id:"fluid_power",image:IMAGE_PATH+"/sidebar-fluid_power.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},
{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Threat Modeling",id:"threatModeling",image:IMAGE_PATH+"/sidebar-threatmodeling.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&
-(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=h.cloneNode(!0);
-p.style.backgroundImage="";p.style.textDecoration="none";p.style.fontWeight="bold";p.style.fontSize="14px";p.style.color="rgb(80, 80, 80)";p.style.width="456px";p.style.backgroundColor="#ffffff";p.style.paddingLeft="6px";var q=p.getElementsByTagName("button")[0];q.parentNode.removeChild(q);var t=k.cloneNode(!0);t.style.backgroundColor="#ffffff";t.style.borderColor="transparent";t.style.width="456px";p=(new DOMParser).parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">'+
-p.outerHTML+t.outerHTML+"</body>","text/html");this.editorUi.editor.convertImages(p.documentElement,mxUtils.bind(this,function(v){var w='<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css"></head>'+mxUtils.getXml(v)+"</html>";t.style.position="absolute";window.document.body.appendChild(t);var r=t.clientHeight+18;t.parentNode.removeChild(t);this.editorUi.confirm("Image data created",mxUtils.bind(this,function(){(new mxXmlRequest(EXPORT_URL,
-"w=456&h="+r+"&html="+encodeURIComponent(Graph.compress(w)))).simulate(document,"_blank")}),null,mxResources.get("save"),mxResources.get("cancel"))}))}else{if("none"==k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var u=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=u;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+
-this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&
-(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=
-k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();
-window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,
-h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],
-w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,
-this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,
-r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=
-JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||
-(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==
-this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+
-"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));
-this.setCurrentSearchEntryLibrary("clipart","finance");this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",
-h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",
-h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),
-{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
+(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=k.getElementsByTagName("svg");
+var q=(Math.ceil(p.length/6)+1)*this.thumbHeight,t=Graph.createSvgNode(0,0,456,q,"#ffffff"),u=new mxSvgCanvas2D(t);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var v=h.childNodes,w=0;w<v.length;w++)if(v[w].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(v[w]));break}for(w=0;w<p.length;w++)u=p[w].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
+u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(w,6)),u.setAttribute("y",24+68*Math.floor(w/6)),t.appendChild(u);this.editorUi.editor.convertImages(t,mxUtils.bind(this,function(y){var x=document.createElement("canvas");x.width=456;x.height=q;var z=document.createElement("img");z.onload=mxUtils.bind(this,function(){x.getContext("2d").drawImage(z,0,0);this.editorUi.saveCanvas(x,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(t);z.src=Editor.createSvgDataUri(y)}))}else{if("none"==
+k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var r=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=r;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);
+mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=
+function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<
+k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<
+h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
+Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,
+C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):
+(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+
+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));
+else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?
+(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",
+";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.setCurrentSearchEntryLibrary("clipart","finance");
+this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
+"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
+"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",
+Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",h+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(p,k);this.addCisco19Palette();this.addCiscoSafePalette();
this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(m,k);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(q,k);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
@@ -10933,9 +10934,9 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(m){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[m]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=m?this.mergeFile(m,b,e,c):this.reloadFile(b,
e))}catch(n){null!=e&&e(n)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,f,c){var m=!0;try{this.stats.fileMerged++;var n=this.getShadowPages(),v=b.getShadowPages();if(null!=v&&0<v.length){var d=[this.ui.diffPages(null!=c?c:n,v)],g=this.ignorePatches(d);this.setShadowPages(v);if(g)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",g);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;c={};g={};var k=this.ui.patchPages(n,d[0]),l=this.ui.getHashValueForPages(k,
-c),p=this.ui.getHashValueForPages(v,g);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",n,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",p,"valid",l==p,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(v)),x=this.compressReportData(this.getAnonymizedXmlForPages(k)),y=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,d,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+l+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+y+"\nTo: "+A+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+x,null,"mergeFile");return}if(null!=this.sync){var B=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==B||mxUtils.isEmptyObject(B)||d.push(B)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,t);else{var I=this.getCurrentUser(),O=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),O,t)}}catch(z){}}};
+c),p=this.ui.getHashValueForPages(v,g);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",n,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",p,"valid",l==p,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(v)),x=this.compressReportData(this.getAnonymizedXmlForPages(k)),y=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(f,d,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+l+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+y+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+x,null,"mergeFile");return}if(null!=this.sync){var A=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==A||mxUtils.isEmptyObject(A)||d.push(A)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(L){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(L);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,L);else{var K=this.getCurrentUser(),P=null!=K?K.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),P,L)}}catch(u){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var m=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(m=this.ui.anonymizeNode(m,!0));m.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,m,!0);f.appendChild(m)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,f,c,m){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var n=mxUtils.bind(this,function(g){var k=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -11005,7 +11006,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
LocalFile.prototype.saveFile=function(b,e,f,c,m){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;m||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var v=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),g=mxUtils.bind(this,function(k){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
function(q){this.savingFile=!1;null!=c&&c({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);this.desc.lastModified==x.lastModified?q.write(n?this.ui.base64ToBlob(k,"image/png"):k).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){try{var A=this.desc;this.savingFile=!1;this.desc=y;this.fileSaved(v,A,d,l);this.removeDraft()}catch(B){l(B)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;l(x)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(k,b,n?"image/png":"text/xml",n);else if(k.length<MAX_REQUEST_SIZE){var p=b.lastIndexOf(".");p=0<p?b.substring(p+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){try{var z=this.desc;this.savingFile=!1;this.desc=y;this.fileSaved(v,z,d,l);this.removeDraft()}catch(A){l(A)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;l(x)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(k,b,n?"image/png":"text/xml",n);else if(k.length<MAX_REQUEST_SIZE){var p=b.lastIndexOf(".");p=0<p?b.substring(p+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+p+"&xml="+encodeURIComponent(k)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}));d()}});n?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(k){g(k)}),c,this.ui.getCurrentFile()!=this?v:null,e.scale,e.border)):g(v)};
LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,f)};
@@ -11021,11 +11022,11 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(m){var n=[];
StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(p,q,x,y,A,B){function I(){mxEvent.addListener(O,"click",null!=B?B:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
-function(E){b.spinner.stop();b.handleError(E)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var O=document.createElement("a");O.style.overflow="hidden";O.style.display="inline-block";O.className="geBaseButton";O.style.boxSizing="border-box";O.style.fontSize="11px";O.style.position="relative";O.style.margin="4px";O.style.marginTop="8px";O.style.marginBottom="0px";O.style.padding="8px 10px 8px 10px";O.style.width="88px";O.style.height=
-"100px";O.style.whiteSpace="nowrap";O.setAttribute("title",q);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.overflow="hidden";t.style.position="absolute";t.style.bottom="8px";t.style.left="0px";t.style.right="0px";mxUtils.write(t,q);O.appendChild(t);if(null!=p){var z=document.createElement("img");z.setAttribute("src",p);z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="60px";z.style.height="60px";z.style.paddingBottom="6px";O.appendChild(z)}else t.style.paddingTop=
-"5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(O.style.padding="0px 10px 20px 10px",O.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");if(null!=A)for(p=0;p<A.length;p++)mxUtils.br(t),mxUtils.write(t,A[p]);if(null!=y&&null==b[y]){z.style.visibility="hidden";mxUtils.setOpacity(t,10);var L=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});L.spin(O);
-var C=window.setTimeout(function(){null==b[y]&&(L.stop(),O.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(E,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(C),mxUtils.setOpacity(t,100),z.style.visibility="",L.stop(),I(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else I();g.appendChild(O)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
+var StorageDialog=function(b,e,f){function c(p,q,x,y,z,A){function K(){mxEvent.addListener(P,"click",null!=A?A:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
+function(C){b.spinner.stop();b.handleError(C)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var P=document.createElement("a");P.style.overflow="hidden";P.style.display="inline-block";P.className="geBaseButton";P.style.boxSizing="border-box";P.style.fontSize="11px";P.style.position="relative";P.style.margin="4px";P.style.marginTop="8px";P.style.marginBottom="0px";P.style.padding="8px 10px 8px 10px";P.style.width="88px";P.style.height=
+"100px";P.style.whiteSpace="nowrap";P.setAttribute("title",q);var L=document.createElement("div");L.style.textOverflow="ellipsis";L.style.overflow="hidden";L.style.position="absolute";L.style.bottom="8px";L.style.left="0px";L.style.right="0px";mxUtils.write(L,q);P.appendChild(L);if(null!=p){var u=document.createElement("img");u.setAttribute("src",p);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";P.appendChild(u)}else L.style.paddingTop=
+"5px",L.style.whiteSpace="normal",mxClient.IS_IOS?(P.style.padding="0px 10px 20px 10px",P.style.top="6px"):mxClient.IS_FF&&(L.style.paddingTop="0px",L.style.marginTop="-2px");if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(L),mxUtils.write(L,z[p]);if(null!=y&&null==b[y]){u.style.visibility="hidden";mxUtils.setOpacity(L,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(P);
+var B=window.setTimeout(function(){null==b[y]&&(D.stop(),P.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(C,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(B),mxUtils.setOpacity(L,100),u.style.visibility="",D.stop(),K(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else K();g.appendChild(P)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
"20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="10px 0px 20px 0px";var v=0,d=0,g=document.createElement("div");g.style.paddingTop="2px";n.appendChild(g);var k=document.createElement("p"),l=document.createElement("p");l.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");m.appendChild(l);m.appendChild(n);v=0;"function"===typeof window.DriveClient&&
c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,
@@ -11039,155 +11040,155 @@ mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(
"18px";n.style.padding="10px";n.style.width="340px";mxUtils.write(n,mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});m.appendChild(n);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(x){n.style.marginBottom="24px";var y=document.createElement("a");y.style.display="inline-block";y.style.color="gray";y.style.cursor="pointer";y.style.marginTop="6px";mxUtils.write(y,mxResources.get("signOut"));n.style.marginBottom="16px";m.style.paddingBottom="18px";mxEvent.addListener(y,"click",function(){b.confirm(mxResources.get("areYouSure"),
function(){x()})});m.appendChild(y)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var p=b.drive.getUsersList();if(0<p.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");n.style.marginBottom="16px";m.style.paddingBottom="18px";m.appendChild(c);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(f=0;f<p.length;f++)v=document.createElement("option"),mxUtils.write(v,p[f].displayName),v.value=f,q.appendChild(v),
-v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+p[f].email+">"),v.setAttribute("disabled","disabled"),q.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=p.length;q.appendChild(v);mxEvent.addListener(q,"change",function(){var x=q.value,y=p.length!=x;y&&b.drive.setUser(p[x]);b.drive.authorize(y,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
+v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+p[f].email+">"),v.setAttribute("disabled","disabled"),q.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=p.length;q.appendChild(v);mxEvent.addListener(q,"change",function(){var x=q.value,y=p.length!=x;y&&b.drive.setUser(p[x]);b.drive.authorize(y,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
b.showSplash()})},!0)});m.appendChild(q)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(m);this.container=e},EmbedDialog=function(b,e,f,c,m,n,v,d,g){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");
n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border=
"1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(l.value=e,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(null!=d?d:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var x=5E5>e.length?l.value:e;if(null!=m)m(x);else if(k)try{var y=b.openLink(x);null!=y&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=y&&null!=y.location.href&&y.location.href.substring(0,8)!=x.substring(0,8)&&(y.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(B){}}),
-f||500)}catch(B){b.handleError({message:B.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",n.appendChild(p));if(!k||7500<e.length)d=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(null!=d?d:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var x=5E5>e.length?l.value:e;if(null!=m)m(x);else if(k)try{var y=b.openLink(x);null!=y&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=y&&null!=y.location.href&&y.location.href.substring(0,8)!=x.substring(0,8)&&(y.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),
+f||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",n.appendChild(p));if(!k||7500<e.length)d=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
b.saveData(null!=g?g:"embed.txt","txt",e,"text/plain")}),d.className="geBtn",n.appendChild(d);if(k&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var q=mxUtils.button("",function(){try{var x="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}});d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height",
"18");d.setAttribute("border","0");q.appendChild(d);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";n.appendChild(q)}7168>e.length&&(q=mxUtils.button("",function(){try{var x="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),
d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",q.appendChild(d),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",n.appendChild(q))}!b.isOffline()&&5E5>e.length&&(q=mxUtils.button("",function(){try{var x="mailto:?subject="+encodeURIComponent(g||
b.defaultFilename)+"&body="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.mailImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",Editor.isDarkMode()&&(d.style.filter="invert(100%)"),q.appendChild(d),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className=
"geBtn",n.appendChild(q));d=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(d);q=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(n.appendChild(q),q.className="geBtn gePrimaryBtn",
d.className="geBtn"):(n.appendChild(p),d.className="geBtn",p.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var E=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=E&&(G+="&title="+encodeURIComponent(E));0<L.length&&(G+="&s="+L);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(t.checked?"1":"0");
-G+="&resize="+(O.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");I.checked?G+="&edit=_blank":B.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else C.constructor==DriveFile||C.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=C.getHash().substring(1),G=C.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
-E&&(G+="&title="+encodeURIComponent(E)),""!=p.value&&(E=parseInt(p.value)+parseInt(l.value),G+="&height="+E),k.value=G):k.value=""}var c=document.createElement("div"),m=b.editor.graph,n=m.getGraphBounds(),v=m.view.scale,d=Math.floor(n.x/v-m.view.translate.x),g=Math.floor(n.y/v-m.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
+var GoogleSitesDialog=function(b,e){function f(){var C=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(u.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=C&&(G+="&title="+encodeURIComponent(C));0<D.length&&(G+="&s="+D);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(L.checked?"1":"0");
+G+="&resize="+(P.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");K.checked?G+="&edit=_blank":A.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+C&&(G+="&title="+encodeURIComponent(C)),""!=p.value&&(C=parseInt(p.value)+parseInt(l.value),G+="&height="+C),k.value=G):k.value=""}var c=document.createElement("div"),m=b.editor.graph,n=m.getGraphBounds(),v=m.view.scale,d=Math.floor(n.x/v-m.view.translate.x),g=Math.floor(n.y/v-m.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
c.appendChild(k);mxUtils.br(c);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=d;c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");
p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(n.height/v);c.appendChild(p);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=e||"";c.appendChild(q);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.setAttribute("size","3");x.style.marginBottom="8px";x.style.marginLeft="4px";x.value="0";c.appendChild(x);mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";B.setAttribute("title",window.location.href);c.appendChild(B);mxUtils.write(c,mxResources.get("edit")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";c.appendChild(I);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("checked","checked");O.defaultChecked=!0;O.style.marginLeft="16px";c.appendChild(O);mxUtils.write(c,mxResources.get("resize")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";c.appendChild(t);mxUtils.write(c,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";c.appendChild(z);mxUtils.write(c,mxResources.get("embed")+" ");var L=b.getBasenames().join(";"),C=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(O,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.setAttribute("size","3");x.style.marginBottom="8px";x.style.marginLeft="4px";x.value="0";c.appendChild(x);mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("pan")+" ");var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";c.appendChild(K);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var P=document.createElement("input");P.setAttribute("type","checkbox");P.setAttribute("checked","checked");P.defaultChecked=!0;P.style.marginLeft="16px";c.appendChild(P);mxUtils.write(c,mxResources.get("resize")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";c.appendChild(L);mxUtils.write(c,mxResources.get("fit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft=
+"8px";c.appendChild(u);mxUtils.write(c,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),B=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(P,"change",f);mxEvent.addListener(L,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
mxEvent.addListener(k,"click",function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.width="100%";m.style.height="360px";m.style.overflow="hidden";m.style.marginBottom="16px";mxEvent.disableContextMenu(m);c.appendChild(m);var n=new Graph(m);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;var v="curved=1;";n.cellRenderer.installCellOverlayListeners=
-function(A,B,I){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(I.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(O){B.fireEvent(new mxEventObject("pointerdown","event",O,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(I.node,"touchstart",function(O){B.fireEvent(new mxEventObject("pointerdown","event",O,"state",A))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
-!1;n.connectionHandler.createEdgeState=function(A){A=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(A){var B=new mxCellOverlay(this.connectImage,"Add outgoing");B.cursor="hand";B.addListener(mxEvent.CLICK,function(I,O){n.connectionHandler.reset();n.clearSelection();var t=n.getCellGeometry(A),z;p(function(){z=n.insertVertex(d,null,"Entry",t.x,t.y,80,30,"rounded=1;");g(z);n.view.refresh(z);
-n.insertEdge(d,null,"",A,z,v)},function(){n.scrollCellToVisible(z)})});B.addListener("pointerdown",function(I,O){I=O.getProperty("event");O=O.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var t=mxUtils.convertPoint(n.container,mxEvent.getClientX(I),mxEvent.getClientY(I));n.connectionHandler.start(O,t.x,t.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(I);mxEvent.consume(I)});n.addCellOverlay(A,B)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
+function(z,A,K){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(K.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(P){A.fireEvent(new mxEventObject("pointerdown","event",P,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(K.node,"touchstart",function(P){A.fireEvent(new mxEventObject("pointerdown","event",P,"state",z))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
+!1;n.connectionHandler.createEdgeState=function(z){z=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(z){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(K,P){n.connectionHandler.reset();n.clearSelection();var L=n.getCellGeometry(z),u;p(function(){u=n.insertVertex(d,null,"Entry",L.x,L.y,80,30,"rounded=1;");g(u);n.view.refresh(u);
+n.insertEdge(d,null,"",z,u,v)},function(){n.scrollCellToVisible(u)})});A.addListener("pointerdown",function(K,P){K=P.getProperty("event");P=P.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var L=mxUtils.convertPoint(n.container,mxEvent.getClientX(K),mxEvent.getClientY(K));n.connectionHandler.start(P,L.x,L.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(K);mxEvent.consume(K)});n.addCellOverlay(z,A)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
0,0,80,30,"ellipse");g(k)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var l=new mxCompactTreeLayout(n);l.edgeRouting=!1;l.levelDistance=30;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(l=new mxCompactTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=30,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(l=new mxRadialTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=80):"verticalFlow"==f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(A,B){n.getModel().beginUpdate();try{null!=A&&A(),l.execute(n.getDefaultParent(),k)}catch(I){throw I;}finally{A=new mxMorphing(n),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=B&&B()})),A.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(A,B,I,O,t){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(A){n.clearCellOverlays();
-var B=n.getModel().getChildren(n.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(B,!0));B=b.editor.graph.importCells(B,A.x,A.y);A=b.editor.graph.view;var I=A.getBounds(B);I.x-=A.translate.x;I.y-=A.translate.y;b.editor.graph.scrollRectToVisible(I);b.editor.graph.setSelectionCells(B);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
+f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(z,A){n.getModel().beginUpdate();try{null!=z&&z(),l.execute(n.getDefaultParent(),k)}catch(K){throw K;}finally{z=new mxMorphing(n),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=A&&A()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(z,A,K,P,L){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(z){n.clearCellOverlays();
+var A=n.getModel().getChildren(n.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,z.x,z.y);z=b.editor.graph.view;var K=z.getBounds(A);K.x-=z.translate.x;K.y-=z.translate.y;b.editor.graph.scrollRectToVisible(K);b.editor.graph.setSelectionCells(A);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(x)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var m=document.createElement("h2");mxUtils.write(m,mxResources.get("backgroundImage"));m.style.marginTop="0px";c.appendChild(m);var n=null!=f&&null!=f.originalSrc;m=!1;var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");
d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=n||null==f?"":f.src;var k=document.createElement("select");k.style.width="360px";if(null!=b.pages)for(var l=0;l<b.pages.length;l++){var p=document.createElement("option");mxUtils.write(p,b.pages[l].getName()||
-mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,A=function(z,L){x||null!=z&&y||(d.checked?null!=L&&L(q.selected?null:
-k.value):""==g.value||b.isOffline()?(I.value="",O.value="",null!=L&&L("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(C){I.value=C.width;O.value=C.height;null!=L&&L(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));I.value="";O.value="";null!=L&&L(null)})))},B=mxUtils.bind(this,function(z){b.importFiles(z,0,0,b.maxBackgroundSize,function(L,C,E,G,P,J){g.value=L;A();g.focus()},function(){},function(L){return"image/"==L.type.substring(0,
-6)},function(L){for(var C=0;C<L.length;C++)L[C]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var z=c.parentNode,L=null;mxEvent.addListener(z,
-"dragleave",function(C){null!=L&&(L.parentNode.removeChild(L),L=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(C){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=b.highlightElement(z));C.stopPropagation();C.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(C){null!=L&&(L.parentNode.removeChild(L),L=null);if(0<C.dataTransfer.files.length)B(C.dataTransfer.files);else if(0<=mxUtils.indexOf(C.dataTransfer.types,
-"text/uri-list")){var E=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(E)&&(g.value=decodeURIComponent(E),A())}C.stopPropagation();C.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var I=document.createElement("input");I.setAttribute("type","text");I.style.width="60px";I.style.marginLeft="8px";I.style.marginRight="16px";
-I.value=null==f||n?"":f.width;c.appendChild(I);mxUtils.write(c,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.width="60px";O.style.marginLeft="8px";O.style.marginRight="16px";O.value=null==f||n?"":f.height;c.appendChild(O);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",A);ImageDialog.filePicked=function(z){z.action==google.picker.Action.PICKED&&null!=z.docs[0].thumbnails&&(z=z.docs[0].thumbnails[z.docs[0].thumbnails.length-1],
-null!=z&&(g.value=z.url,A()));g.focus()};c.appendChild(d);c.appendChild(k);mxUtils.br(c);n?(d.setAttribute("checked","checked"),d.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!m&&d.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),k.appendChild(q),mxEvent.addListener(k,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";I.value="";O.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type",
-"file");mxEvent.addListener(t,"change",function(z){null!=t.files&&(B(t.files),t.type="",t.type="file",t.value="")});t.style.display="none";c.appendChild(t);l=mxUtils.button(mxResources.get("open"),function(){t.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(z){e(""!=z&&null!=z?new mxImage(z,I.value,O.value):null,null==z)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,A){var B=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var I=function(V,M,W,U,X){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(new mxRectangle(0,0,U,X));var u=null;O.getModel().beginUpdate();try{u="txt"==M?b.insertAsPreText(W,n.x,n.y):O.insertVertex(null,null,null,n.x,n.y,
-U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(W)+";"),O.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:V,format:M},null,2))}finally{O.getModel().endUpdate()}null!=u&&(O.setSelectionCell(u),O.scrollCellToVisible(u))},O=b.editor.graph,t="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-x&&"svg"==t?window.setTimeout(function(){b.spinner.stop();I(x,t,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(x,t,function(V,M,W){b.spinner.stop();I(x,t,V,M,W)},function(V){b.handleError(V)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,t,function(V,M,W){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(new mxRectangle(0,0,M,W));b.spinner.stop();var U=null;O.getModel().beginUpdate();try{U=O.insertVertex(null,null,null,n.x,n.y,M,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-V+";"),O.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=U&&(O.setSelectionCell(U),O.scrollCellToVisible(U))},function(V){b.handleError(V)}));else if("table"==y){y=null;for(var z=[],L=0,C={},E=0;E<B.length;E++){var G=mxUtils.trim(B[E]);if("primary key"==G.substring(0,11).toLowerCase()){var P=G.match(/\((.+)\)/);P&&P[1]&&(C[P[1]]=!0);B.splice(E,1)}else 0<G.toLowerCase().indexOf("primary key")&&(C[G.split(" ")[0]]=
-!0,B[E]=mxUtils.trim(G.replace(/primary key/i,"")))}for(E=0;E<B.length;E++)if(G=mxUtils.trim(B[E]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(L,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,z.push(y),G=b.editor.graph.getPreferredSizeForCell(J),null!=
-G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))L+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);P=C[G.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(P?"1":"0")+";");J.vertex=!0;var F=new mxCell(P?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(P?"fontStyle=1;":""));F.vertex=!0;J.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(P?"fontStyle=5;":""));G.vertex=!0;J.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
-Math.max(y.geometry.width,G.width+30)));y.insert(J,P?0:null);y.geometry.height+=30}0<z.length&&(O=b.editor.graph,n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0)),O.setSelectionCells(O.importCells(z,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<B.length){O=b.editor.graph;J=null;z=[];for(E=y=0;E<B.length;E++)";"!=B[E].charAt(0)&&(0==B[E].length?J=null:null==J?(J=new mxCell(B[E],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-J.vertex=!0,z.push(J),G=O.getPreferredSizeForCell(J),null!=G&&J.geometry.width<G.width+10&&(J.geometry.width=G.width+10),y+=J.geometry.width+40):"--"==B[E]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,J.geometry.height+=G.geometry.height,J.insert(G)):0<B[E].length&&(L=new mxCell(B[E],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-L.vertex=!0,G=O.getPreferredSizeForCell(L),null!=G&&L.geometry.width<G.width&&(L.geometry.width=G.width),J.geometry.width=Math.max(J.geometry.width,L.geometry.width),J.geometry.height+=L.geometry.height,J.insert(L)));if(0<z.length){n=mxEvent.isAltDown(A)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0));O.getModel().beginUpdate();try{z=O.importCells(z,n.x,n.y);G=[];for(E=0;E<z.length;E++)G.push(z[E]),G=G.concat(z[E].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(z);
-O.scrollCellToVisible(O.getSelectionCell())}}}else{J=function(V){var M=H[V];null==M&&(M=new mxCell(V,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),M.vertex=!0,H[V]=M,z.push(M));return M};var H={};z=[];for(E=0;E<B.length;E++)if(";"!=B[E].charAt(0)){var S=B[E].split("->");2<=S.length&&(P=J(S[0]),F=J(S[S.length-1]),S=new mxCell(2<S.length?S[1]:"",new mxGeometry),S.edge=!0,P.insertEdge(S,!0),F.insertEdge(S,!1),z.push(S))}if(0<z.length){B=document.createElement("div");B.style.visibility="hidden";
-document.body.appendChild(B);O=new Graph(B);O.getModel().beginUpdate();try{z=O.importCells(z);for(E=0;E<z.length;E++)O.getModel().isVertex(z[E])&&(G=O.getPreferredSizeForCell(z[E]),z[E].geometry.width=Math.max(z[E].geometry.width,G.width),z[E].geometry.height=Math.max(z[E].geometry.height,G.height));E=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(O,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(O.getDefaultParent(),z),E=!1):"circle"==y?
-(new mxCircleLayout(O)).execute(O.getDefaultParent()):(L=new mxFastOrganicLayout(O),L.disableEdgeStyle=!1,L.forceConstant=180,L.execute(O.getDefaultParent()));E&&(C=new mxParallelEdgeLayout(O),C.spacing=30,C.execute(O.getDefaultParent()))}finally{O.getModel().endUpdate()}O.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{z=O.getModel().getChildren(O.getDefaultParent()),n=mxEvent.isAltDown(A)?n:b.editor.graph.getCenterInsertPoint(O.getBoundingBoxFromGeometry(z,!0)),G=b.editor.graph.importCells(z,
-n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());O.destroy();B.parentNode.removeChild(B)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
+mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,z=function(u,D){x||null!=u&&y||(d.checked?null!=D&&D(q.selected?null:
+k.value):""==g.value||b.isOffline()?(K.value="",P.value="",null!=D&&D("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(B){K.value=B.width;P.value=B.height;null!=D&&D(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));K.value="";P.value="";null!=D&&D(null)})))},A=mxUtils.bind(this,function(u){b.importFiles(u,0,0,b.maxBackgroundSize,function(D,B,C,G,N,I){g.value=D;z();g.focus()},function(){},function(D){return"image/"==D.type.substring(0,
+6)},function(D){for(var B=0;B<D.length;B++)D[B]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var u=c.parentNode,D=null;mxEvent.addListener(u,
+"dragleave",function(B){null!=D&&(D.parentNode.removeChild(D),D=null);B.stopPropagation();B.preventDefault()});mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(B){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(u));B.stopPropagation();B.preventDefault()}));mxEvent.addListener(u,"drop",mxUtils.bind(this,function(B){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<B.dataTransfer.files.length)A(B.dataTransfer.files);else if(0<=mxUtils.indexOf(B.dataTransfer.types,
+"text/uri-list")){var C=B.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(C)&&(g.value=decodeURIComponent(C),z())}B.stopPropagation();B.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var K=document.createElement("input");K.setAttribute("type","text");K.style.width="60px";K.style.marginLeft="8px";K.style.marginRight="16px";
+K.value=null==f||n?"":f.width;c.appendChild(K);mxUtils.write(c,mxResources.get("height")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.width="60px";P.style.marginLeft="8px";P.style.marginRight="16px";P.value=null==f||n?"":f.height;c.appendChild(P);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",z);ImageDialog.filePicked=function(u){u.action==google.picker.Action.PICKED&&null!=u.docs[0].thumbnails&&(u=u.docs[0].thumbnails[u.docs[0].thumbnails.length-1],
+null!=u&&(g.value=u.url,z()));g.focus()};c.appendChild(d);c.appendChild(k);mxUtils.br(c);n?(d.setAttribute("checked","checked"),d.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!m&&d.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),k.appendChild(q),mxEvent.addListener(k,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));f=document.createElement("div");
+f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";K.value="";P.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
+"file");mxEvent.addListener(L,"change",function(u){null!=L.files&&(A(L.files),L.type="",L.type="file",L.value="")});L.style.display="none";c.appendChild(L);l=mxUtils.button(mxResources.get("open"),function(){L.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(u){e(""!=u&&null!=u?new mxImage(u,K.value,P.value):null,null==u)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,z){var A=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var K=function(W,J,V,U,X){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(new mxRectangle(0,0,U,X));var t=null;P.getModel().beginUpdate();try{t="txt"==J?b.insertAsPreText(V,n.x,n.y):P.insertVertex(null,null,null,n.x,n.y,
+U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),P.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:W,format:J},null,2))}finally{P.getModel().endUpdate()}null!=t&&(P.setSelectionCell(t),P.scrollCellToVisible(t))},P=b.editor.graph,L="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+x&&"svg"==L?window.setTimeout(function(){b.spinner.stop();K(x,L,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(x,L,function(W,J,V){b.spinner.stop();K(x,L,W,J,V)},function(W){b.handleError(W)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(P=b.editor.graph,b.generateMermaidImage(x,L,function(W,J,V){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(new mxRectangle(0,0,J,V));b.spinner.stop();var U=null;P.getModel().beginUpdate();try{U=P.insertVertex(null,null,null,n.x,n.y,J,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+W+";"),P.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{P.getModel().endUpdate()}null!=U&&(P.setSelectionCell(U),P.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==y){y=null;for(var u=[],D=0,B={},C=0;C<A.length;C++){var G=mxUtils.trim(A[C]);if("primary key"==G.substring(0,11).toLowerCase()){var N=G.match(/\((.+)\)/);N&&N[1]&&(B[N[1]]=!0);A.splice(C,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
+!0,A[C]=mxUtils.trim(G.replace(/primary key/i,"")))}for(C=0;C<A.length;C++)if(G=mxUtils.trim(A[C]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(D,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,u.push(y),G=b.editor.graph.getPreferredSizeForCell(I),null!=
+G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))D+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var I=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");I.vertex=!0;var F=new mxCell(N?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));F.vertex=!0;I.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;I.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
+Math.max(y.geometry.width,G.width+30)));y.insert(I,N?0:null);y.geometry.height+=30}0<u.length&&(P=b.editor.graph,n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0)),P.setSelectionCells(P.importCells(u,n.x,n.y)),P.scrollCellToVisible(P.getSelectionCell()))}else if("list"==y){if(0<A.length){P=b.editor.graph;I=null;u=[];for(C=y=0;C<A.length;C++)";"!=A[C].charAt(0)&&(0==A[C].length?I=null:null==I?(I=new mxCell(A[C],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+I.vertex=!0,u.push(I),G=P.getPreferredSizeForCell(I),null!=G&&I.geometry.width<G.width+10&&(I.geometry.width=G.width+10),y+=I.geometry.width+40):"--"==A[C]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,I.geometry.height+=G.geometry.height,I.insert(G)):0<A[C].length&&(D=new mxCell(A[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+D.vertex=!0,G=P.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),I.geometry.width=Math.max(I.geometry.width,D.geometry.width),I.geometry.height+=D.geometry.height,I.insert(D)));if(0<u.length){n=mxEvent.isAltDown(z)?n:P.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0));P.getModel().beginUpdate();try{u=P.importCells(u,n.x,n.y);G=[];for(C=0;C<u.length;C++)G.push(u[C]),G=G.concat(u[C].children);P.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{P.getModel().endUpdate()}P.setSelectionCells(u);
+P.scrollCellToVisible(P.getSelectionCell())}}}else{I=function(W){var J=H[W];null==J&&(J=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),J.vertex=!0,H[W]=J,u.push(J));return J};var H={};u=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var R=A[C].split("->");2<=R.length&&(N=I(R[0]),F=I(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,N.insertEdge(R,!0),F.insertEdge(R,!1),u.push(R))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
+document.body.appendChild(A);P=new Graph(A);P.getModel().beginUpdate();try{u=P.importCells(u);for(C=0;C<u.length;C++)P.getModel().isVertex(u[C])&&(G=P.getPreferredSizeForCell(u[C]),u[C].geometry.width=Math.max(u[C].geometry.width,G.width),u[C].geometry.height=Math.max(u[C].geometry.height,G.height));C=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(P,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(P.getDefaultParent(),u),C=!1):"circle"==y?
+(new mxCircleLayout(P)).execute(P.getDefaultParent()):(D=new mxFastOrganicLayout(P),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(P.getDefaultParent()));C&&(B=new mxParallelEdgeLayout(P),B.spacing=30,B.execute(P.getDefaultParent()))}finally{P.getModel().endUpdate()}P.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{u=P.getModel().getChildren(P.getDefaultParent()),n=mxEvent.isAltDown(z)?n:b.editor.graph.getCenterInsertPoint(P.getBoundingBoxFromGeometry(u,!0)),G=b.editor.graph.importCells(u,
+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());P.destroy();A.parentNode.removeChild(A)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==d.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==d.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==d.value||"plantUmlTxt"==d.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize=
"none";v.style.width="100%";v.style.height="354px";v.style.marginBottom="16px";var d=document.createElement("select");if("formatSql"==f||"mermaid"==f)d.style.display="none";var g=document.createElement("option");g.setAttribute("value","list");mxUtils.write(g,mxResources.get("list"));"plantUml"!=f&&d.appendChild(g);null!=f&&"fromText"!=f||g.setAttribute("selected","selected");g=document.createElement("option");g.setAttribute("value","table");mxUtils.write(g,mxResources.get("formatSql"));"formatSql"==
f&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","mermaid");mxUtils.write(g,mxResources.get("formatSql"));"mermaid"==f&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","diagram");mxUtils.write(g,mxResources.get("diagram"));var k=document.createElement("option");k.setAttribute("value","circle");mxUtils.write(k,mxResources.get("circle"));var l=document.createElement("option");
l.setAttribute("value","horizontalFlow");mxUtils.write(l,mxResources.get("horizontalFlow"));var p=document.createElement("option");p.setAttribute("value","verticalFlow");mxUtils.write(p,mxResources.get("verticalFlow"));"plantUml"!=f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l),d.appendChild(p));g=document.createElement("option");g.setAttribute("value","plantUmlSvg");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&g.setAttribute("selected",
"selected");k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");l=document.createElement("option");l.setAttribute("value","plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l));var q=m();v.value=q;e.appendChild(v);this.init=function(){v.focus()};
-Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(A){v.value=A.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
+Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(z){v.value=z.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),function(){v.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(mxResources.get("insert"),function(x){b.hideDialog();c(v.value,d.value,x)});e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B,I){function O(oa){null!=oa&&(Da=qa=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=L(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function t(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
-0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=N&&0<N.length?N:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function z(oa,sa,ya,wa,ua,xa,ha){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");V.removeAttribute("disabled");Q=sa;T=ya;N=xa;R=oa;Y=wa;ba=ha;ea=ua;R.style.backgroundColor=d;R.style.border=g}function L(oa,sa,ya,wa,ua,xa,ha,da,
+e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,K){function P(oa){null!=oa&&(Da=qa=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=D(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function L(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
+0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=O&&0<O.length?O:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(oa,sa,ya,wa,ua,xa,ha){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");Q=sa;T=ya;O=xa;S=oa;Y=wa;ba=ha;ea=ua;S.style.backgroundColor=d;S.style.border=g}function D(oa,sa,ya,wa,ua,xa,ha,da,
ca,la,ia){function ma(Ma,Ta){null==Ka?(Ia=Ma,Ia=/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)?PROXY_URL+"?url="+encodeURIComponent(Ia):TEMPLATE_PATH+"/"+Ia,mxUtils.get(Ia,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ka=Ua.getText());Ta(Ka,Ia)}))):Ta(Ka,Ia)}function ra(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,na)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Za=new mxCodec(Ma.ownerDocument),Wa=new mxGraphModel;
-Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;z(na,null,null,oa,ha,ia)},!0,!1)}}function pa(Ma,Ta){null==oa||Ra||
+Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(na,null,null,oa,ha,ia)},!0,!1)}}function pa(Ma,Ta){null==oa||Ra||
b.sidebar.currentElt==na?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ra(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
na,Ra=!0,ma(oa,function(Ua){Ra&&b.sidebar.currentElt==na&&ra(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Ra=!1})))}var na=document.createElement("div");na.className="geTemplate";na.style.position="relative";na.style.height=Da+"px";na.style.width=qa+"px";var Ka=null,Ia=oa;Editor.isDarkMode()&&(na.style.filter="invert(100%)");null!=ya?na.setAttribute("title",mxResources.get(ya,null,ya)):null!=wa&&0<wa.length&&na.setAttribute("title",wa);var Ra=!1,Sa=null;if(null!=xa){na.style.display="inline-flex";
-na.style.justifyContent="center";na.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",xa);ua.setAttribute("alt",wa);ua.style.maxWidth=Da+"px";ua.style.maxHeight=qa+"px";Sa=ua;var Ja=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ua);ua.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){z(na,null,null,oa,ha,ia)}),null,null);mxEvent.addListener(na,
-"dblclick",function(Ma){t();mxEvent.consume(Ma)})}else if(!la&&null!=oa&&0<oa.length){var Oa=function(Ma){V.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(oa,function(Ta,Ua){S.stop();null!=Ta&&(z(na,Ta,sa,null,null,ia,Ua),Ma&&t())})};ua=ca||TEMPLATE_PATH+"/"+oa.substring(0,oa.length-4)+".png";na.style.backgroundImage="url("+ua+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
+na.style.justifyContent="center";na.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",xa);ua.setAttribute("alt",wa);ua.style.maxWidth=Da+"px";ua.style.maxHeight=qa+"px";Sa=ua;var Ja=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ua);ua.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){u(na,null,null,oa,ha,ia)}),null,null);mxEvent.addListener(na,
+"dblclick",function(Ma){L();mxEvent.consume(Ma)})}else if(!la&&null!=oa&&0<oa.length){var Oa=function(Ma){W.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";R.spin(Z);ma(oa,function(Ta,Ua){R.stop();null!=Ta&&(u(na,Ta,sa,null,null,ia,Ua),Ma&&L())})};ua=ca||TEMPLATE_PATH+"/"+oa.substring(0,oa.length-4)+".png";na.style.backgroundImage="url("+ua+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
ya){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";xa=document.createElement("tbody");ca=document.createElement("tr");la=document.createElement("td");la.setAttribute("align","center");la.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";
Pa.style.userSelect="none";Pa.style.borderRadius="3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=Da-34+"px";mxUtils.write(Pa,mxResources.get(ya,null,ya));la.appendChild(Pa);ca.appendChild(la);xa.appendChild(ca);wa.appendChild(xa);na.appendChild(wa)}mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){Oa()}),null,null);mxEvent.addListener(na,"dblclick",function(Ma){Oa(!0);mxEvent.consume(Ma)})}else wa=document.createElement("table"),
wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",xa=document.createElement("tbody"),ca=document.createElement("tr"),la=document.createElement("td"),la.setAttribute("align","center"),la.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",
-Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),la.appendChild(Pa),ca.appendChild(la),xa.appendChild(ca),wa.appendChild(xa),na.appendChild(wa),ua&&z(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){z(na,null,null,oa,ha)}),null,null),null!=da?mxEvent.addListener(na,"click",da):(mxEvent.addListener(na,"click",function(Ma){z(na,null,null,oa,ha)}),mxEvent.addListener(na,"dblclick",function(Ma){t();mxEvent.consume(Ma)}));if(null!=oa){var Qa=document.createElement("img");
+Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),la.appendChild(Pa),ca.appendChild(la),xa.appendChild(ca),wa.appendChild(xa),na.appendChild(wa),ua&&u(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){u(na,null,null,oa,ha)}),null,null),null!=da?mxEvent.addListener(na,"click",da):(mxEvent.addListener(na,"click",function(Ma){u(na,null,null,oa,ha)}),mxEvent.addListener(na,"dblclick",function(Ma){L();mxEvent.consume(Ma)}));if(null!=oa){var Qa=document.createElement("img");
Qa.setAttribute("src",Sidebar.prototype.searchImage);Qa.setAttribute("title",mxResources.get("preview"));Qa.className="geActiveButton";Qa.style.position="absolute";Qa.style.cursor="default";Qa.style.padding="8px";Qa.style.right="0px";Qa.style.top="0px";na.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(Ma){Ya=b.sidebar.currentElt==na}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(Ma){Ya||pa(Ma,Qa);mxEvent.consume(Ma)}))}Z.appendChild(na);
-return na}function C(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?Aa[pa][Ka]:Ca[pa],W=null,O(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
-(O(),mxEvent.consume(pa))}));if(0<Na){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Ba.appendChild(ya);for(var wa in Ha){var ua=document.createElement("div"),xa=wa;ya=Ha[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ua.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=k&&(ua.style.padding=k);Ba.appendChild(ua);(function(pa,na){mxEvent.addListener(ua,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ha[pa],W=null,O(!1))})})(wa,ua)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Ba.appendChild(ya)}for(wa in Ca){xa=
+return na}function B(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?Aa[pa][Ka]:Ca[pa],V=null,P(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(P(),mxEvent.consume(pa))}));if(0<Na){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Ba.appendChild(ya);for(var wa in Ha){var ua=document.createElement("div"),xa=wa;ya=Ha[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ua.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=k&&(ua.style.padding=k);Ba.appendChild(ua);(function(pa,na){mxEvent.addListener(ua,"click",function(){Fa!=na&&(Fa.style.backgroundColor="",Fa=na,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ha[pa],V=null,P(!1))})})(wa,ua)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Ba.appendChild(ya)}for(wa in Ca){xa=
Aa[wa];var ha=ua=document.createElement(xa?"ul":"div");ya=Ca[wa];var da=oa(wa,ya);if(null!=xa){var ca=document.createElement("li"),la=document.createElement("div");la.className="geTempTreeCaret";la.setAttribute("title",da);mxUtils.write(la,da);ha=la;ca.appendChild(la);da=document.createElement("ul");da.className="geTempTreeNested";da.style.visibility="hidden";for(var ia in xa){var ma=document.createElement("li"),ra=oa(ia,xa[ia]);ma.setAttribute("title",ra);mxUtils.write(ma,ra);sa(wa,ma,ia);da.appendChild(ma)}ca.appendChild(da);
ua.className="geTempTree";ua.appendChild(ca);(function(pa,na){mxEvent.addListener(na,"click",function(){pa.style.visibility="visible";pa.classList.toggle("geTempTreeActive");pa.classList.toggle("geTempTreeNested")&&setTimeout(function(){pa.style.visibility="hidden"},550);na.classList.toggle("geTempTreeCaret-down")})})(da,la)}else ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ua.setAttribute("title",da),mxUtils.write(ua,da);null!=k&&(ua.style.padding=k);Ba.appendChild(ua);null==Fa&&0<ya.length&&(Fa=ua,Fa.style.backgroundColor=v,La=ya);sa(wa,ha)}O(!1)}var E=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
-G.style.userSelect="none";G.style.height="100%";var P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.height="46px";f&&G.appendChild(P);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||E||!f||P.appendChild(J);f&&mxUtils.write(P,(E?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+J);F.style.marginLeft="10px";F.style.width=e||
-E?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(oa){b.sidebar.hideTooltip()}),null,null)};f&&(P.appendChild(F),I?F.style.width=e||E?"350px":"450px":(null!=b.editor.diagramFileTypes&&(I=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),I.style.marginLeft=
-"6px",I.style.width=e||E?"80px":"180px",P.appendChild(I)),null!=b.editor.fileExtensions&&(E=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),E.style.marginTop="12px",P.appendChild(E))));P=!1;var H=0,S=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),V=mxUtils.button(A||mxResources.get("create"),function(){V.setAttribute("disabled","disabled");t();V.removeAttribute("disabled")});V.className="geBtn gePrimaryBtn";
-if(p||q){var M=[],W=null,U=null,X=null,u=function(oa){V.setAttribute("disabled","disabled");for(var sa=0;sa<M.length;sa++)M[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};P=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);E=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";u(0);Z.scrollTop=0;Z.innerHTML="";H=0;W!=La&&(La=W,Ca=U,Na=X,Ba.innerHTML="",C(),W=null)});
-M.push(E);A.appendChild(E);var D=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";u(oa?-1:1);null==W&&(W=La);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ua){H=0;S.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
-Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];C()}else O(!0)};oa?q(K.value,sa):p(sa)};p&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){D()}),A.appendChild(E),M.push(E));if(q){E=document.createElement("span");E.style.marginLeft="10px";E.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(E);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(oa){13==
-oa.keyCode&&D(!0)});A.appendChild(K);E=mxUtils.button(mxResources.get("search"),function(){D(!0)});E.className="geBtn";A.appendChild(E)}u(0)}var T=null,N=null,Q=null,R=null,Y=null,ba=null,ea=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";A=(f?72:40)+(P?30:0);Z.style.top=A+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var fa=document.createElement("div");
-fa.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");fa.appendChild(aa);var va=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
+ua.setAttribute("title",da),mxUtils.write(ua,da);null!=k&&(ua.style.padding=k);Ba.appendChild(ua);null==Fa&&0<ya.length&&(Fa=ua,Fa.style.backgroundColor=v,La=ya);sa(wa,ha)}P(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
+G.style.userSelect="none";G.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";f&&G.appendChild(N);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||C||!f||N.appendChild(I);f&&mxUtils.write(N,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+I);F.style.marginLeft="10px";F.style.width=e||
+C?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(oa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(F),K?F.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(K=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),K.style.marginLeft=
+"6px",K.style.width=e||C?"80px":"180px",N.appendChild(K)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),C.style.marginTop="12px",N.appendChild(C))));N=!1;var H=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");L();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(p||q){var J=[],V=null,U=null,X=null,t=function(oa){W.setAttribute("disabled","disabled");for(var sa=0;sa<J.length;sa++)J[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=La&&(La=V,Ca=U,Na=X,Ba.innerHTML="",B(),V=null)});
+J.push(C);z.appendChild(C);var E=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";t(oa?-1:1);null==V&&(V=La);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var sa=function(ya,wa,ua){H=0;R.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
+Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];B()}else P(!0)};oa?q(M.value,sa):p(sa)};p&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),z.appendChild(C),J.push(C));if(q){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(C);var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(oa){13==
+oa.keyCode&&E(!0)});z.appendChild(M);C=mxUtils.button(mxResources.get("search"),function(){E(!0)});C.className="geBtn";z.appendChild(C)}t(0)}var T=null,O=null,Q=null,S=null,Y=null,ba=null,ea=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(f?72:40)+(N?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var fa=document.createElement("div");
+fa.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");fa.appendChild(aa);var va=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
ja);va.setAttribute("title",mxResources.get("search"));va.style.position="relative";va.style.left="-18px";va.style.top="1px";va.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(va);mxEvent.addListener(va,"click",function(){va.getAttribute("src")==Dialog.prototype.closeImage&&(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ea&&(Ea.click(),Ea=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(oa){if(13==
oa.keyCode){var sa=aa.value;if(""==sa)null!=Ea&&(Ea.click(),Ea=null);else{if(null==NewDialog.tagsList[l]){var ya={};for(ia in Ca)for(var wa=Ca[ia],ua=0;ua<wa.length;ua++){var xa=wa[ua];if(null!=xa.tags)for(var ha=xa.tags.toLowerCase().split(";"),da=0;da<ha.length;da++)null==ya[ha[da]]&&(ya[ha[da]]=[]),ya[ha[da]].push(xa)}NewDialog.tagsList[l]=ya}var ca=sa.toLowerCase().split(" ");ya=NewDialog.tagsList[l];if(0<Na&&null==ya.__tagsList__){for(ia in Ha)for(wa=Ha[ia],ua=0;ua<wa.length;ua++)for(xa=wa[ua],
ha=xa.title.split(" "),ha.push(ia),da=0;da<ha.length;da++){var la=ha[da].toLowerCase();null==ya[la]&&(ya[la]=[]);ya[la].push(xa)}ya.__tagsList__=!0}var ia=[];wa={};for(ua=ha=0;ua<ca.length;ua++)if(0<ca[ua].length){la=ya[ca[ua]];var ma={};ia=[];if(null!=la)for(da=0;da<la.length;da++)xa=la[da],0==ha==(null==wa[xa.url])&&(ma[xa.url]=!0,ia.push(xa));wa=ma;ha++}Z.scrollTop=0;Z.innerHTML="";H=0;ya=document.createElement("div");ya.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=ya);La=ia;W=null;O(!1)}mxEvent.consume(oa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(oa){""==aa.value?(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));A+=23;var Ba=document.createElement("div");
-Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,qa=140,Ca={},Aa={},Ha={},Na=0,Ga=!0,Fa=null,Ea=null;Ca.basic=[{title:"blankDiagram",select:!0}];var La=Ca.basic;if(!e){var za=function(){mxUtils.get(ka,function(oa){if(!ta){ta=!0;oa=oa.getXml().documentElement.firstChild;for(var sa={};null!=oa;){if("undefined"!==typeof oa.getAttribute)if("clibs"==
+mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=ya);La=ia;V=null;P(!1)}mxEvent.consume(oa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(oa){""==aa.value?(va.setAttribute("src",ja),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ba=document.createElement("div");
+Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,qa=140,Ca={},Aa={},Ha={},Na=0,Ga=!0,Fa=null,Ea=null;Ca.basic=[{title:"blankDiagram",select:!0}];var La=Ca.basic;if(!e){var za=function(){mxUtils.get(ka,function(oa){if(!ta){ta=!0;oa=oa.getXml().documentElement.firstChild;for(var sa={};null!=oa;){if("undefined"!==typeof oa.getAttribute)if("clibs"==
oa.nodeName){for(var ya=oa.getAttribute("name"),wa=oa.getElementsByTagName("add"),ua=[],xa=0;xa<wa.length;xa++)ua.push(encodeURIComponent(mxUtils.getTextContent(wa[xa])));null!=ya&&0<ua.length&&(sa[ya]=ua.join(";"))}else if(ua=oa.getAttribute("url"),null!=ua){wa=oa.getAttribute("section");ya=oa.getAttribute("subsection");if(null==wa&&(xa=ua.indexOf("/"),wa=ua.substring(0,xa),null==ya)){var ha=ua.indexOf("/",xa+1);-1<ha&&(ya=ua.substring(xa+1,ha))}xa=Ca[wa];null==xa&&(xa=[],Ca[wa]=xa);ua=oa.getAttribute("clibs");
-null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=Aa[wa],null==xa&&(xa={},Aa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}S.stop();C()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
-(ka=PROXY_URL+"?url="+encodeURIComponent(ka));S.spin(Z);null!=B?B(function(oa,sa){Ha=oa;X=Na=sa;za()},za):za();U=Ca}mxEvent.addListener(F,"keypress",function(oa){b.dialog.container.firstChild==G&&13==oa.keyCode&&t()});B=document.createElement("div");B.style.marginTop=e?"4px":"16px";B.style.textAlign="right";B.style.position="absolute";B.style.left="40px";B.style.bottom="24px";B.style.right="40px";e||b.isOffline()||!f||null!=c||m||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",B.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||m&&null==n||B.appendChild(A);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var oa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(oa.container,300,80,!0,!0);oa.init()}),e.className="geBtn",B.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var oa=document.createElement("input");oa.setAttribute("multiple","multiple");oa.setAttribute("type","file");mxEvent.addListener(oa,"change",function(sa){b.openFiles(oa.files,
-!0);oa.value=""});oa.style.display="none";document.body.appendChild(oa);b.newDlgFileInputElt=oa}b.newDlgFileInputElt.click()}),y.className="geBtn",B.appendChild(y));B.appendChild(V);b.editor.cancelFirst||null!=c||m&&null==n||B.appendChild(A);G.appendChild(B);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B){function I(P,J,F,H){function S(){mxEvent.addListener(V,"click",function(){var u=F;if(v){var D=z.value,K=D.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>K){u=null!=u?u:G.value;var T="";u==App.MODE_GOOGLE?T=b.drive.extension:u==App.MODE_GITHUB?T=b.gitHub.extension:u==App.MODE_GITLAB?T=b.gitLab.extension:u==App.MODE_TRELLO?T=b.trello.extension:u==App.MODE_DROPBOX?T=b.dropbox.extension:u==App.MODE_ONEDRIVE?T=b.oneDrive.extension:u==App.MODE_DEVICE&&
-(T=".drawio");0<=K&&(D=D.substring(0,K));z.value=D+T}}O(F)})}var V=document.createElement("a");V.style.overflow="hidden";var M=document.createElement("img");M.src=P;M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";V.style.display="inline-block";V.className="geBaseButton";V.style.position="relative";V.style.margin="4px";V.style.padding="8px 8px 10px 8px";V.style.whiteSpace="nowrap";V.appendChild(M);V.style.color=
-"gray";V.style.fontSize="11px";var W=document.createElement("div");V.appendChild(W);mxUtils.write(W,J);if(null!=H&&null==b[H]){M.style.visibility="hidden";mxUtils.setOpacity(W,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(V);var X=window.setTimeout(function(){null==b[H]&&(U.stop(),V.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
-mxUtils.setOpacity(W,100),M.style.visibility="",U.stop(),S())}))}else S();C.appendChild(V);++E==p&&(mxUtils.br(C),E=0)}function O(P){var J=z.value;if(null==P||null!=J&&0<J.length)B&&b.hideDialog(),f(J,P,z)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;B=null!=B?B:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var t=document.createElement("h2");mxUtils.write(t,m||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom=
-"24px";n.appendChild(t);mxUtils.write(n,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",e);z.style.width="200px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)};n.appendChild(z);null!=A&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,z,b.editor.diagramFileTypes),
-m.style.marginLeft="6px",m.style.width="90px",n.appendChild(m)),n.appendChild(FilenameDialog.createTypeHint(b,z,A)));A=null;if("1"!=urlParams.noDevice&&null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){z.style.width="160px";m=document.createElement("img");var L=y?q:btoa(unescape(encodeURIComponent(q)));m.setAttribute("src","data:"+x+";base64,"+L);m.style.position="absolute";m.style.top="70px";m.style.right="100px";m.style.maxWidth="120px";m.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(A=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(L,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+x+";base64,"+L+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
-A.style.marginTop="6px",A.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(P){mxEvent.isPopupTrigger(P)||O("_blank")}))}mxUtils.br(n);var C=document.createElement("div");C.style.textAlign="center";var E=0;C.style.marginTop="6px";n.appendChild(C);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),I(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),I(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),I(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),I(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),I(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),I(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&I(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
-d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),I(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
-function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});l.className="geBtn";b.editor.cancelFirst&&null==c&&d.appendChild(l);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){O(null)}),q.className="geBtn",d.appendChild(q));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){O("_blank")}),g.className="geBtn",d.appendChild(g));CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),
-function(){O("download")}),g.className="geBtn",d.appendChild(g),null!=A&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=A&&(mxUtils.br(d),d.appendChild(A));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(z,"keypress",function(P){13==P.keyCode?O(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=Aa[wa],null==xa&&(xa={},Aa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}R.stop();B()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
+(ka=PROXY_URL+"?url="+encodeURIComponent(ka));R.spin(Z);null!=A?A(function(oa,sa){Ha=oa;X=Na=sa;za()},za):za();U=Ca}mxEvent.addListener(F,"keypress",function(oa){b.dialog.container.firstChild==G&&13==oa.keyCode&&L()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var oa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(oa.container,300,80,!0,!0);oa.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var oa=document.createElement("input");oa.setAttribute("multiple","multiple");oa.setAttribute("type","file");mxEvent.addListener(oa,"change",function(sa){b.openFiles(oa.files,
+!0);oa.value=""});oa.style.display="none";document.body.appendChild(oa);b.newDlgFileInputElt=oa}b.newDlgFileInputElt.click()}),y.className="geBtn",A.appendChild(y));A.appendChild(W);b.editor.cancelFirst||null!=c||m&&null==n||A.appendChild(z);G.appendChild(A);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function K(N,I,F,H){function R(){mxEvent.addListener(W,"click",function(){var t=F;if(v){var E=u.value,M=E.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>M){t=null!=t?t:G.value;var T="";t==App.MODE_GOOGLE?T=b.drive.extension:t==App.MODE_GITHUB?T=b.gitHub.extension:t==App.MODE_GITLAB?T=b.gitLab.extension:t==App.MODE_TRELLO?T=b.trello.extension:t==App.MODE_DROPBOX?T=b.dropbox.extension:t==App.MODE_ONEDRIVE?T=b.oneDrive.extension:t==App.MODE_DEVICE&&
+(T=".drawio");0<=M&&(E=E.substring(0,M));u.value=E+T}}P(F)})}var W=document.createElement("a");W.style.overflow="hidden";var J=document.createElement("img");J.src=N;J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="60px";J.style.height="60px";J.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(J);W.style.color=
+"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,I);if(null!=H&&null==b[H]){J.style.visibility="hidden";mxUtils.setOpacity(V,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(W);var X=window.setTimeout(function(){null==b[H]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
+mxUtils.setOpacity(V,100),J.style.visibility="",U.stop(),R())}))}else R();B.appendChild(W);++C==p&&(mxUtils.br(B),C=0)}function P(N){var I=u.value;if(null==N||null!=I&&0<I.length)A&&b.hideDialog(),f(I,N,u)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;A=null!=A?A:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var L=document.createElement("h2");mxUtils.write(L,m||mxResources.get("create"));L.style.marginTop="0px";L.style.marginBottom=
+"24px";n.appendChild(L);mxUtils.write(n,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",e);u.style.width="200px";u.style.marginLeft="10px";u.style.marginBottom="20px";u.style.maxWidth="70%";this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);null!=z&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,u,b.editor.diagramFileTypes),
+m.style.marginLeft="6px",m.style.width="90px",n.appendChild(m)),n.appendChild(FilenameDialog.createTypeHint(b,u,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){u.style.width="160px";m=document.createElement("img");var D=y?q:btoa(unescape(encodeURIComponent(q)));m.setAttribute("src","data:"+x+";base64,"+D);m.style.position="absolute";m.style.top="70px";m.style.right="100px";m.style.maxWidth="120px";m.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(z=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(D,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+x+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(I){b.handleError(I)}))}),
+z.style.marginTop="6px",z.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(N){mxEvent.isPopupTrigger(N)||P("_blank")}))}mxUtils.br(n);var B=document.createElement("div");B.style.textAlign="center";var C=0;B.style.marginTop="6px";n.appendChild(B);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),K(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),K(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),K(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),K(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&K(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
+d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),K(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});l.className="geBtn";b.editor.cancelFirst&&null==c&&d.appendChild(l);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){P(null)}),q.className="geBtn",d.appendChild(q));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){P("_blank")}),g.className="geBtn",d.appendChild(g));CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),
+function(){P("download")}),g.className="geBtn",d.appendChild(g),null!=z&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=z&&(mxUtils.br(d),d.appendChild(z));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(u,"keypress",function(N){13==N.keyCode?P(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,e,f,c,m){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){m&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";n.appendChild(v);mxUtils.br(n);var d=mxUtils.button(mxResources.get("openInNewWindow"),function(){m&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=v.style.width;n.appendChild(d);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,m,n,v,d){function g(){0<p.value.length?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}n=null!=n?n:!0;var k=b.editor.graph,l=document.createElement("div");mxUtils.write(l,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
+null!=f&&f();b.openLink(e,null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=v.style.width;n.appendChild(d);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,m,n,v,d){function g(){0<p.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}n=null!=n?n:!0;var k=b.editor.graph,l=document.createElement("div");mxUtils.write(l,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
"transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var p=document.createElement("input");p.setAttribute("value",f);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?460:340)-20+"px";p.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){p.value="";p.focus()});
-e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,A=function(t,z,L,C){var E="data:"==t.substring(0,5);!b.isOffline()||E&&"undefined"===typeof chrome?0<t.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(t,function(G){b.spinner.stop();b.hideDialog();var P=!1===C?1:null!=z&&null!=L?Math.max(z/G.width,L/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(t=b.convertDataUri(t));c(t,Math.round(Number(G.width)*P),Math.round(Number(G.height)*P),q,x,y)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(t,null,null,q,x,y)):(t=b.convertDataUri(t),z=null==z?120:z,L=null==L?100:L,b.hideDialog(),c(t,z,L,q,x,y))},B=function(t,z){if(null!=t){var L=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=L?A(t,L.width,L.height,z):A(t,null,null,z)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var t=l.parentNode,z=null;mxEvent.addListener(t,"dragleave",function(L){null!=z&&(z.parentNode.removeChild(z),z=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(t,"dragover",mxUtils.bind(this,function(L){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=b.highlightElement(t));L.stopPropagation();L.preventDefault()}));mxEvent.addListener(t,"drop",mxUtils.bind(this,function(L){null!=z&&(z.parentNode.removeChild(z),z=null);if(0<L.dataTransfer.files.length)b.importFiles(L.dataTransfer.files,
-0,0,b.maxImageSize,function(E,G,P,J,F,H,S,V){B(E,V)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var G=0;G<E.length;G++)E[G]()},!mxEvent.isControlDown(L),null,null,!0);else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var C=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(C)&&B(decodeURIComponent(C))}L.stopPropagation();L.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(t){t.action==google.picker.Action.PICKED&&null!=t.docs[0].thumbnails&&(t=t.docs[0].thumbnails[t.docs[0].thumbnails.length-1],null!=t&&(p.value=t.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(t){null!=I.files&&(b.importFiles(I.files,0,0,b.maxImageSize,function(z,L,C,E,G,P){B(z)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var L=0;L<z.length;L++)z[L]()},!0),I.type="",I.type="file",I.value="")});I.style.display="none";document.body.appendChild(I);b.imgDlgFileInputElt=I}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
-"keypress",function(t){13==t.keyCode&&B(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var t=new CropImageDialog(b,p.value,q,function(z,L,C){q=z;x=L;y=C});b.showDialog(t.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(t){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){B(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
-"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(t,z,L){L=mxUtils.button("",L);
-L.className="geBtn";L.setAttribute("title",z);z=document.createElement("img");z.style.height="26px";z.style.width="26px";z.setAttribute("src",t);L.style.minWidth="42px";L.style.verticalAlign="middle";L.appendChild(z);O.appendChild(L)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
+e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(L,u,D,B){var C="data:"==L.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<L.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(L,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=u&&null!=D?Math.max(u/G.width,D/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(L=b.convertDataUri(L));c(L,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,x,y)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(L,null,null,q,x,y)):(L=b.convertDataUri(L),u=null==u?120:u,D=null==D?100:D,b.hideDialog(),c(L,u,D,q,x,y))},A=function(L,u){if(null!=L){var D=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=D?z(L,D.width,D.height,u):z(L,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var L=l.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(L,"drop",mxUtils.bind(this,function(D){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
+0,0,b.maxImageSize,function(C,G,N,I,F,H,R,W){A(C,W)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var B=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}D.stopPropagation();D.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(L){L.action==google.picker.Action.PICKED&&null!=L.docs[0].thumbnails&&(L=L.docs[0].thumbnails[L.docs[0].thumbnails.length-1],null!=L&&(p.value=L.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
+"file");mxEvent.addListener(K,"change",function(L){null!=K.files&&(b.importFiles(K.files,0,0,b.maxImageSize,function(u,D,B,C,G,N){A(u)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var D=0;D<u.length;D++)u[D]()},!0),K.type="",K.type="file",K.value="")});K.style.display="none";document.body.appendChild(K);b.imgDlgFileInputElt=K}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
+"keypress",function(L){13==L.keyCode&&A(p.value)});var P=mxUtils.button(mxResources.get("crop"),function(){var L=new CropImageDialog(b,p.value,q,function(u,D,B){q=u;x=D;y=B});b.showDialog(L.container,300,390,!0,!0)});v&&(P.className="geBtn",d.appendChild(P));mxEvent.addListener(p,"change",function(L){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){A(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
+"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(L,u,D){D=mxUtils.button("",D);
+D.className="geBtn";D.setAttribute("title",u);u=document.createElement("img");u.style.height="26px";u.style.width="26px";u.setAttribute("src",L);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(u);P.appendChild(D)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
"clip";k.style.cursor="default";k.style.paddingRight="20px";var l=document.createElement("input");l.setAttribute("placeholder",mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="97%";l.style.boxSizing="border-box";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";l.style.marginBottom="4px";var p=document.createElement("div");p.setAttribute("title",
mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height="14px";p.style.cursor="pointer";p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){l.value="";l.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
-var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=v&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);v=null!=v?v:"_blank";A.setAttribute("title",v);n&&(l.style.width="340px");if(m&&
-null!=b.pages){null!=e&&Graph.isPageLink(e)?(x.setAttribute("checked","checked"),x.defaultChecked=!0):(l.setAttribute("value",e),q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);k.appendChild(l);k.appendChild(p);n&&(k.appendChild(A),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(x);m=!1;for(n=0;n<b.pages.length;n++)p=document.createElement("option"),mxUtils.write(p,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),p.setAttribute("value",
-"data:page/id,"+b.pages[n].getId()),e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0),y.appendChild(p);if(!m&&x.checked){var B=document.createElement("option");mxUtils.write(B,mxResources.get("pageNotFound"));B.setAttribute("disabled","disabled");B.setAttribute("selected","selected");B.setAttribute("value","pageNotFound");y.appendChild(B);mxEvent.addListener(y,"change",function(){null==B.parentNode||B.selected||B.parentNode.removeChild(B)})}k.appendChild(y)}else l.setAttribute("value",
-e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var I=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,A.checked?v:null)});I.style.verticalAlign="middle";I.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
-"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var t=g.parentNode,z=null;mxEvent.addListener(t,"dragleave",function(L){null!=z&&(z.parentNode.removeChild(z),z=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(t,"dragover",mxUtils.bind(this,function(L){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=b.highlightElement(t));L.stopPropagation();L.preventDefault()}));
-mxEvent.addListener(t,"drop",mxUtils.bind(this,function(L){null!=z&&(z.parentNode.removeChild(z),z=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,I.click());L.stopPropagation();L.preventDefault()}),!1)}};var O=document.createElement("div");O.style.marginTop="18px";O.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-f.style.verticalAlign="middle";f.className="geBtn";O.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&O.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(t){if(t.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=t.docs;var z=t.docs[0].url;"application/mxe"==t.docs[0].mimeType||null!=t.docs[0].mimeType&&
-"application/vnd.jgraph."==t.docs[0].mimeType.substring(0,23)?z="https://www.draw.io/#G"+t.docs[0].id:"application/vnd.google-apps.folder"==t.docs[0].mimeType&&(z="https://drive.google.com/#folders/"+t.docs[0].id);l.value=z;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var t=b.drive.createLinkPicker();b.linkPicker=t.setCallback(function(z){LinkDialog.filePicked(z)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(t){l.value=t[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(t,z){l.value=z.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(t){if(null!=t){t=t.split("/");var z=t[0],L=t[1],C=t[2];t=t.slice(3,t.length).join("/");l.value="https://github.com/"+z+"/"+L+"/blob/"+C+"/"+t;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(t){if(null!=t){t=t.split("/");var z=
-t[0],L=t[1],C=t[2];t=t.slice(3,t.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+z+"/"+L+"/blob/"+C+"/"+t;l.focus()}})});mxEvent.addListener(l,"keypress",function(t){13==t.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});O.appendChild(I);b.editor.cancelFirst||O.appendChild(f);g.appendChild(O);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
+var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=v&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);v=null!=v?v:"_blank";z.setAttribute("title",v);n&&(l.style.width="340px");if(m&&
+null!=b.pages){null!=e&&Graph.isPageLink(e)?(x.setAttribute("checked","checked"),x.defaultChecked=!0):(l.setAttribute("value",e),q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);k.appendChild(l);k.appendChild(p);n&&(k.appendChild(z),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(x);m=!1;for(n=0;n<b.pages.length;n++)p=document.createElement("option"),mxUtils.write(p,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),p.setAttribute("value",
+"data:page/id,"+b.pages[n].getId()),e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0),y.appendChild(p);if(!m&&x.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");y.appendChild(A);mxEvent.addListener(y,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}k.appendChild(y)}else l.setAttribute("value",
+e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var K=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,z.checked?v:null)});K.style.verticalAlign="middle";K.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
+"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var L=g.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));D.stopPropagation();D.preventDefault()}));
+mxEvent.addListener(L,"drop",mxUtils.bind(this,function(D){null!=u&&(u.parentNode.removeChild(u),u=null);0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(D.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,K.click());D.stopPropagation();D.preventDefault()}),!1)}};var P=document.createElement("div");P.style.marginTop="18px";P.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+f.style.verticalAlign="middle";f.className="geBtn";P.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&P.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(L){if(L.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=L.docs;var u=L.docs[0].url;"application/mxe"==L.docs[0].mimeType||null!=L.docs[0].mimeType&&
+"application/vnd.jgraph."==L.docs[0].mimeType.substring(0,23)?u="https://www.draw.io/#G"+L.docs[0].id:"application/vnd.google-apps.folder"==L.docs[0].mimeType&&(u="https://drive.google.com/#folders/"+L.docs[0].id);l.value=u;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var L=b.drive.createLinkPicker();b.linkPicker=L.setCallback(function(u){LinkDialog.filePicked(u)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(L){l.value=L[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(L,u){l.value=u.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(L){if(null!=L){L=L.split("/");var u=L[0],D=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value="https://github.com/"+u+"/"+D+"/blob/"+B+"/"+L;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(L){if(null!=L){L=L.split("/");var u=
+L[0],D=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+u+"/"+D+"/blob/"+B+"/"+L;l.focus()}})});mxEvent.addListener(l,"keypress",function(L){13==L.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});P.appendChild(K);b.editor.cancelFirst||P.appendChild(f);g.appendChild(P);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
"18px";n.style.marginBottom="18px";m.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));m.appendChild(n);var v=document.createElement("input");v.setAttribute("type","text");v.style.marginTop="6px";v.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var p=l.value+(k.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;p.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
":\n"+p),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});d.className="geBtn gePrimaryBtn";if(!f){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(v,
@@ -11196,193 +11197,193 @@ f.appendChild(k);n=document.createElement("span");mxUtils.write(n," "+mxResource
m.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(d)):(f.appendChild(d),f.appendChild(n));m.appendChild(f);this.container=m};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),m=document.createElement("h3");m.style.marginTop="0px";mxUtils.write(m,mxResources.get("revisionHistory"));c.appendChild(m);m=document.createElement("div");m.style.position="absolute";m.style.overflow="auto";m.style.width="170px";m.style.height="378px";c.appendChild(m);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height="376px";
n.style.overflow="hidden";var v=document.createElement("div");v.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";n.appendChild(v);mxEvent.disableContextMenu(n);c.appendChild(n);var d=new Graph(n);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,k=null,l=0,p=d.getGlobalVariable;
-d.getGlobalVariable=function(R){return"page"==R&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==R?l+1:"pagecount"==R?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
-hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},x=new Spinner(q),y=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),B={};for(q=0;q<A.length;q++)B[A[q].getAttribute("id")]=A[q];var I=null,O=null,t=null,z=null,L=mxUtils.button("",function(){null!=t&&d.zoomIn()});L.className="geSprite geSprite-zoomin";L.setAttribute("title",mxResources.get("zoomIn"));L.style.outline="none";L.style.border="none";L.style.margin="2px";L.setAttribute("disabled","disabled");
-mxUtils.setOpacity(L,20);var C=mxUtils.button("",function(){null!=t&&d.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var E=mxUtils.button("",function(){null!=t&&(d.maxFitScale=8,d.fit(8),d.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border=
-"none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var G=mxUtils.button("",function(){null!=t&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var P=mxUtils.button("",function(){});P.className="geSprite geSprite-middle";P.setAttribute("title",mxResources.get("compare"));
-P.style.outline="none";P.style.border="none";P.style.margin="2px";mxUtils.setOpacity(P,60);var J=n.cloneNode(!1);J.style.pointerEvent="none";n.parentNode.appendChild(J);var F=new Graph(J);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(P,function(R){R=B[k[g].getAttribute("id")];mxUtils.setOpacity(P,20);v.innerHTML="";null==R?mxUtils.write(v,
-mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",J.style.display="",J.style.backgroundColor=n.style.backgroundColor,R=Editor.parseDiagramNode(R),(new mxCodec(R.ownerDocument)).decode(R,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(P,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",J.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var S=mxUtils.button(mxResources.get("download"),function(){if(null!=t){var R=mxUtils.getXml(t.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(R,Y,"text/xml"):(R="undefined"===typeof pako?"&xml="+encodeURIComponent(R):"&data="+encodeURIComponent(Graph.compress(R)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+R)).simulate(document,"_blank"))}});S.className="geBtn";S.setAttribute("disabled","disabled");var V=mxUtils.button(mxResources.get("restore"),function(R){null!=t&&null!=z&&(mxEvent.isShiftDown(R)?null!=t&&(R=b.getPagesForNode(t.documentElement),R=b.diffPages(b.pages,R),R=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(R,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(R.container,620,460,!0,!0),R.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(z):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(z);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-V.className="geBtn";V.setAttribute("disabled","disabled");V.setAttribute("title","Shift+Click for Diff");var M=document.createElement("select");M.setAttribute("disabled","disabled");M.style.maxWidth="80px";M.style.position="relative";M.style.top="-2px";M.style.verticalAlign="bottom";M.style.marginRight="6px";M.style.display="none";var W=null;mxEvent.addListener(M,"change",function(R){null!=W&&(W(R),mxEvent.consume(R))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=t&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(t.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=f&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=O&&b.openLink(O.getUrl(M.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=f&&(X.style.display="none",V.className="geBtn gePrimaryBtn");A=document.createElement("div");
-A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var u=document.createElement("div");u.className="geToolbarContainer";u.style.backgroundColor="transparent";u.style.padding="2px";u.style.border="none";u.style.left="199px";u.style.top="442px";var D=null;if(null!=e&&0<e.length){n.style.cursor="move";var K=document.createElement("table");K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";
-var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Da){null!=Da&&(Da=Ba(Editor.parseDiagramNode(Da)));return Da},Ba=function(Da){var qa=Da.getAttribute("background");
-if(null==qa||""==qa||qa==mxConstants.NONE)qa=d.defaultPageBackgroundColor;n.style.backgroundColor=qa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};M.style.display="none";M.innerHTML="";t=aa;z=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(M.removeAttribute("disabled"),M.style.display=
-"",fa=0;fa<k.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,k[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==l&&aa.setAttribute("selected","selected"),M.appendChild(aa);W=function(){try{var Da=parseInt(M.value);l=g=Da;ja(k[Da])}catch(qa){M.value=g,b.handleError(qa)}}}else Ba(va);fa=R.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());H.setAttribute("title",ba.getAttribute("title"));L.removeAttribute("disabled");C.removeAttribute("disabled");E.removeAttribute("disabled");G.removeAttribute("disabled");P.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&V.removeAttribute("disabled"),S.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(L,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(P,60)}else M.style.display="none",M.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";R==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===N?mxUtils.write(Z,Y.toLocaleTimeString()):
-mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=R.fileSize?" "+b.formatFileSize(parseInt(R.fileSize)):"")+(null!=R.lastModifyingUserName?" "+R.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(fa){O!=R&&(x.stop(),null!=I&&(I.style.backgroundColor=""),O=R,I=ba,I.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",z=t=null,H.removeAttribute("title"),H.innerHTML=
-mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerHTML="",d.getModel().clear(),V.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),M.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(L,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(P,20),x.spin(n),R.getXml(function(aa){if(O==R)try{ea(aa)}catch(va){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){x.stop();M.style.display="none";M.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ba,
-"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);T.appendChild(ba)}return ba}(e[q]);null!=Q&&q==e.length-1&&(D=Q)}K.appendChild(T);m.appendChild(K)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",u.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",u.style.display=
-"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=D&&D.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";u.appendChild(M);u.appendChild(L);u.appendChild(C);u.appendChild(G);u.appendChild(E);u.appendChild(P);b.editor.cancelFirst?(A.appendChild(m),A.appendChild(S),A.appendChild(U),A.appendChild(V),A.appendChild(X)):(A.appendChild(S),A.appendChild(U),A.appendChild(V),A.appendChild(X),A.appendChild(m));c.appendChild(A);
-c.appendChild(u);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){O=mxUtils.parseXml(g[p.value].data);t=b.editor.extractGraphModel(O.documentElement,!0);z=0;this.init()});if(null!=g){p.style.marginLeft=
-"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),A=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[0].data);var B=document.createElement("div");B.style.position="absolute";B.style.border="1px solid lightGray";
-B.style.marginTop="10px";B.style.left="40px";B.style.right="40px";B.style.top="46px";B.style.bottom="74px";B.style.overflow="hidden";mxEvent.disableContextMenu(B);k.appendChild(B);var I=new Graph(B);I.setEnabled(!1);I.setPanning(!0);I.panningHandler.ignoreCell=!0;I.panningHandler.useLeftButtonForPanning=!0;I.minFitScale=null;I.maxFitScale=null;I.centerZoom=!0;var O=mxUtils.parseXml(f),t=b.editor.extractGraphModel(O.documentElement,!0),z=0,L=null,C=I.getGlobalVariable;I.getGlobalVariable=function(G){return"page"==
-G&&null!=L&&null!=L[z]?L[z].getAttribute("name"):"pagenumber"==G?z+1:"pagecount"==G?null!=L?L.length:1:C.apply(this,arguments)};I.getLinkForCell=function(){return null};f=mxUtils.button("",function(){I.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){I.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
-mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){I.maxFitScale=8;I.fit(8);I.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);x=mxUtils.button("",function(){I.zoomActual();I.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
-x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";
-E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function G(H){if(null!=H){var S=H.getAttribute("background");if(null==S||""==S||S==mxConstants.NONE)S=Editor.isDarkMode()?"transparent":"#ffffff";B.style.backgroundColor=S;(new mxCodec(H.ownerDocument)).decode(H,I.getModel());I.maxFitScale=1;I.fit(8);I.center()}return H}function P(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(E,"change",function(H){z=parseInt(E.value);P(L[z]);mxEvent.consume(H)});if("mxfile"==t.nodeName){var J=t.getElementsByTagName("diagram");
-L=[];for(var F=0;F<J.length;F++)L.push(J[F]);0<L.length&&P(L[z]);E.innerHTML="";if(1<L.length)for(E.style.display="",F=0;F<L.length;F++)J=document.createElement("option"),mxUtils.write(J,L[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),J.setAttribute("value",F),F==z&&J.setAttribute("selected","selected"),E.appendChild(J);else E.style.display="none"}else G(t)};A.appendChild(E);A.appendChild(f);A.appendChild(l);A.appendChild(x);A.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(A);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,u,D){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var K=0;K<X.length;K++)if("label"!=X[K].nodeName){var T=mxUtils.trim(X[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(D&&0<=T.indexOf(u)||!D&&T.substring(0,u.length)===u)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&L.value?(S.removeAttribute("disabled"),V.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));L.value&&z.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")}function g(U,
-X,u){F.innerHTML="";var D=l.model.getDescendants(l.model.getRoot()),K=z.value.toLowerCase(),T=C.checked?new RegExp(K):null,N=null;A=null;p!=K&&(p=K,q=null,y=!1);var Q=null==q;if(0<K.length){if(y){y=!1;for(var R,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){R=Y;break}U=(R+1)%b.pages.length;q=null;do y=!1,D=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(D),l.model.setRoot(D.root),U=(U+1)%b.pages.length;while(!g(!0,X,u)&&U!=R);q&&(q=null,u?b.editor.graph.model.execute(new SelectPage(b,
-D)):b.selectPage(D));y=!1;l=b.editor.graph;return g(!0,X,u)}for(Y=0;Y<D.length;Y++){R=l.view.getState(D[Y]);X&&null!=T&&(Q=Q||R==q);if(null!=R&&null!=R.cell.value&&(Q||null==N)&&(l.model.isVertex(R.cell)||l.model.isEdge(R.cell))){null!=R.style&&"1"==R.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(R.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(R.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;X&&n&&null!=T&&R==q&&(label=label.substr(B),
-ba=B);var ea=""==L.value,Z=ea;if(null==T&&(Z&&0<=label.indexOf(K)||!Z&&label.substring(0,K.length)===K||ea&&v(T,R.cell,K,Z))||null!=T&&(T.test(label)||ea&&v(T,R.cell,K,Z)))if(n&&(null!=T?(ea=label.match(T),A=ea[0].toLowerCase(),B=ba+ea.index+A.length):(A=K,B=A.length)),Q){N=R;break}else null==N&&(N=R)}Q=Q||R==q}}if(null!=N){if(Y==D.length&&E.checked)return q=null,y=!0,g(!0,X,u);q=N;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?u||l.getSelectionCell()==q.cell&&1==l.getSelectionCount()||
-l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&E.checked)return y=!0,g(!0,X,u);l.isEnabled()&&!u&&l.clearSelection()}x=null!=N;n&&!U&&d();return 0==K.length||null!=N}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,A=null,B=0,I=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var t=n?"260px":"200px",z=document.createElement("input");z.setAttribute("placeholder",mxResources.get("find"));
-z.setAttribute("type","text");z.style.marginTop="4px";z.style.marginBottom="6px";z.style.width=t;z.style.fontSize="12px";z.style.borderRadius="4px";z.style.padding="6px";O.appendChild(z);mxUtils.br(O);if(n){var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("replaceWith"));L.setAttribute("type","text");L.style.marginTop="4px";L.style.marginBottom="6px";L.style.width=t;L.style.fontSize="12px";L.style.borderRadius="4px";L.style.padding="6px";O.appendChild(L);mxUtils.br(O);
-mxEvent.addListener(L,"input",d)}var C=document.createElement("input");C.setAttribute("id","geFindWinRegExChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";O.appendChild(C);t=document.createElement("label");t.setAttribute("for","geFindWinRegExChck");O.appendChild(t);mxUtils.write(t,mxResources.get("regularExpression"));O.appendChild(t);t=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");t.style.position="relative";t.style.marginLeft="6px";t.style.top="-1px";O.appendChild(t);
-mxUtils.br(O);var E=document.createElement("input");E.setAttribute("id","geFindWinAllPagesChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";O.appendChild(E);t=document.createElement("label");t.setAttribute("for","geFindWinAllPagesChck");O.appendChild(t);mxUtils.write(t,mxResources.get("allPages"));O.appendChild(t);var G=document.createElement("div");mxUtils.br(O);t=document.createElement("div");t.style.left="0px";t.style.right="0px";t.style.marginTop="6px";t.style.padding="0 6px 0 6px";
-t.style.textAlign="center";O.appendChild(t);var P=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";z.value="";z.style.backgroundColor="";n&&(L.value="",d());p=q=null;y=!1;z.focus()});P.setAttribute("title",mxResources.get("reset"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";n||t.appendChild(P);var J=mxUtils.button(mxResources.get("find"),function(){try{z.style.backgroundColor=
-g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";t.appendChild(J);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,u,D,K){if(null==K||"1"!=K.html)return D=U.toLowerCase().indexOf(X,D),0>D?U:U.substr(0,
-D)+u+U.substr(D+X.length);var T=U;X=mxUtils.htmlEntities(X);K=[];var N=-1;for(U=U.replace(/<br>/ig,"\n");-1<(N=U.indexOf("<",N+1));)K.push(N);N=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");D=U.toLowerCase().indexOf(X,D);if(0>D)return T;T=D+X.length;u=mxUtils.htmlEntities(u);U=U.substr(0,D)+u+U.substr(T);for(var Q=0,R=0;R<K.length;R++){if(K[R]-Q<D)U=U.substr(0,K[R])+N[R]+U.substr(K[R]);else{var Y=K[R]-Q<T?D+Q:K[R]+(u.length-X.length);U=U.substr(0,Y)+N[R]+U.substr(Y)}Q+=N[R].length}return U.replace(/\n/g,
-"<br>")},S=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=q&&L.value){var U=q.cell,X=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,H(X,A,L.value,B-A.length,l.getCurrentCellStyle(U)));z.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(u){b.handleError(u)}});S.setAttribute("title",mxResources.get("replFind"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow=
-"ellipsis";S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");t.appendChild(S);mxUtils.br(t);var V=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=q&&L.value){var U=q.cell,X=l.getLabel(U);l.model.setValue(U,H(X,A,L.value,B-A.length,l.getCurrentCellStyle(U)));S.setAttribute("disabled","disabled");V.setAttribute("disabled","disabled")}}catch(u){b.handleError(u)}});V.setAttribute("title",mxResources.get("replace"));V.style.float="none";V.style.width="120px";
-V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn gePrimaryBtn";V.setAttribute("disabled","disabled");t.appendChild(V);var M=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(L.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var u=0,D={};g(!1,!0,!0)&&100>u;){var K=q.cell,T=l.getLabel(K),N=D[K.id];if(N&&N.replAllMrk==
-I&&N.replAllPos>=B)break;D[K.id]={replAllMrk:I,replAllPos:B};l.isCellEditable(K)&&(l.model.setValue(K,H(T,A,L.value,B-A.length,l.getCurrentCellStyle(K))),u++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[u]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}I++}});M.setAttribute("title",mxResources.get("replaceAll"));M.style.float="none";M.style.width="120px";
-M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");t.appendChild(M);mxUtils.br(t);t.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
-"ellipsis";P.className="geBtn";t.appendChild(P);mxUtils.br(t);t.appendChild(F)}else P.style.width="90px",J.style.width="90px";mxEvent.addListener(z,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=z.value.toLowerCase()||13==U.keyCode)try{z.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){z.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(U){70==
-U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),O,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?E.removeAttribute("disabled"):(E.checked=!1,E.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var u=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,u-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
+d.getGlobalVariable=function(S){return"page"==S&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==S?l+1:"pagecount"==S?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
+hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},x=new Spinner(q),y=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(q=0;q<z.length;q++)A[z[q].getAttribute("id")]=z[q];var K=null,P=null,L=null,u=null,D=mxUtils.button("",function(){null!=L&&d.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
+mxUtils.setOpacity(D,20);var B=mxUtils.button("",function(){null!=L&&d.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=L&&(d.maxFitScale=8,d.fit(8),d.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border=
+"none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var G=mxUtils.button("",function(){null!=L&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var N=mxUtils.button("",function(){});N.className="geSprite geSprite-middle";N.setAttribute("title",mxResources.get("compare"));
+N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var I=n.cloneNode(!1);I.style.pointerEvent="none";n.parentNode.appendChild(I);var F=new Graph(I);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(N,function(S){S=A[k[g].getAttribute("id")];mxUtils.setOpacity(N,20);v.innerHTML="";null==S?mxUtils.write(v,
+mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",I.style.display="",I.style.backgroundColor=n.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position=
+"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=L){var S=mxUtils.getXml(L.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(S,Y,"text/xml"):(S="undefined"===typeof pako?"&xml="+encodeURIComponent(S):"&data="+encodeURIComponent(Graph.compress(S)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+S)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(S){null!=L&&null!=u&&(mxEvent.isShiftDown(S)?null!=L&&(S=b.getPagesForNode(L.documentElement),S=b.diffPages(b.pages,S),S=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(S,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+W.className="geBtn";W.setAttribute("disabled","disabled");W.setAttribute("title","Shift+Click for Diff");var J=document.createElement("select");J.setAttribute("disabled","disabled");J.style.maxWidth="80px";J.style.position="relative";J.style.top="-2px";J.style.verticalAlign="bottom";J.style.marginRight="6px";J.style.display="none";var V=null;mxEvent.addListener(J,"change",function(S){null!=V&&(V(S),mxEvent.consume(S))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=L&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(L.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=f&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=P&&b.openLink(P.getUrl(J.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=f&&(X.style.display="none",W.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var t=document.createElement("div");t.className="geToolbarContainer";t.style.backgroundColor="transparent";t.style.padding="2px";t.style.border="none";t.style.left="199px";t.style.top="442px";var E=null;if(null!=e&&0<e.length){n.style.cursor="move";var M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";
+var T=document.createElement("tbody"),O=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(S){var Y=new Date(S.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Da){null!=Da&&(Da=Ba(Editor.parseDiagramNode(Da)));return Da},Ba=function(Da){var qa=Da.getAttribute("background");
+if(null==qa||""==qa||qa==mxConstants.NONE)qa=d.defaultPageBackgroundColor;n.style.backgroundColor=qa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};J.style.display="none";J.innerHTML="";L=aa;u=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
+"",fa=0;fa<k.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,k[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==l&&aa.setAttribute("selected","selected"),J.appendChild(aa);V=function(){try{var Da=parseInt(J.value);l=g=Da;ja(k[Da])}catch(qa){J.value=g,b.handleError(qa)}}}else Ba(va);fa=S.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());H.setAttribute("title",ba.getAttribute("title"));D.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(N,60)}else J.style.display="none",J.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";S==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===O?mxUtils.write(Z,Y.toLocaleTimeString()):
+mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(fa){P!=S&&(x.stop(),null!=K&&(K.style.backgroundColor=""),P=S,K=ba,K.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=L=null,H.removeAttribute("title"),H.innerHTML=
+mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerHTML="",d.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),J.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),x.spin(n),S.getXml(function(aa){if(P==S)try{ea(aa)}catch(va){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){x.stop();J.style.display="none";J.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ba,
+"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);T.appendChild(ba)}return ba}(e[q]);null!=Q&&q==e.length-1&&(E=Q)}M.appendChild(T);m.appendChild(M)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",t.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",t.style.display=
+"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=E&&E.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";t.appendChild(J);t.appendChild(D);t.appendChild(B);t.appendChild(G);t.appendChild(C);t.appendChild(N);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X),z.appendChild(m));c.appendChild(z);
+c.appendChild(t);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){P=mxUtils.parseXml(g[p.value].data);L=b.editor.extractGraphModel(P.documentElement,!0);u=0;this.init()});if(null!=g){p.style.marginLeft=
+"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),z=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
+A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);k.appendChild(A);var K=new Graph(A);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;var P=mxUtils.parseXml(f),L=b.editor.extractGraphModel(P.documentElement,!0),u=0,D=null,B=K.getGlobalVariable;K.getGlobalVariable=function(G){return"page"==
+G&&null!=D&&null!=D[u]?D[u].getAttribute("name"):"pagenumber"==G?u+1:"pagecount"==G?null!=D?D.length:1:B.apply(this,arguments)};K.getLinkForCell=function(){return null};f=mxUtils.button("",function(){K.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){K.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
+mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){K.maxFitScale=8;K.fit(8);K.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);x=mxUtils.button("",function(){K.zoomActual();K.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
+x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";
+C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function G(H){if(null!=H){var R=H.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=R;(new mxCodec(H.ownerDocument)).decode(H,K.getModel());K.maxFitScale=1;K.fit(8);K.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(C,"change",function(H){u=parseInt(C.value);N(D[u]);mxEvent.consume(H)});if("mxfile"==L.nodeName){var I=L.getElementsByTagName("diagram");
+D=[];for(var F=0;F<I.length;F++)D.push(I[F]);0<D.length&&N(D[u]);C.innerHTML="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)I=document.createElement("option"),mxUtils.write(I,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),I.setAttribute("value",F),F==u&&I.setAttribute("selected","selected"),C.appendChild(I);else C.style.display="none"}else G(L)};z.appendChild(C);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,t,E){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var M=0;M<X.length;M++)if("label"!=X[M].nodeName){var T=mxUtils.trim(X[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=T.indexOf(t)||!E&&T.substring(0,t.length)===t)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&D.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));D.value&&u.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function g(U,
+X,t){F.innerHTML="";var E=l.model.getDescendants(l.model.getRoot()),M=u.value.toLowerCase(),T=B.checked?new RegExp(M):null,O=null;z=null;p!=M&&(p=M,q=null,y=!1);var Q=null==q;if(0<M.length){if(y){y=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;q=null;do y=!1,E=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(E),l.model.setRoot(E.root),U=(U+1)%b.pages.length;while(!g(!0,X,t)&&U!=S);q&&(q=null,t?b.editor.graph.model.execute(new SelectPage(b,
+E)):b.selectPage(E));y=!1;l=b.editor.graph;return g(!0,X,t)}for(Y=0;Y<E.length;Y++){S=l.view.getState(E[Y]);X&&null!=T&&(Q=Q||S==q);if(null!=S&&null!=S.cell.value&&(Q||null==O)&&(l.model.isVertex(S.cell)||l.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;X&&n&&null!=T&&S==q&&(label=label.substr(A),
+ba=A);var ea=""==D.value,Z=ea;if(null==T&&(Z&&0<=label.indexOf(M)||!Z&&label.substring(0,M.length)===M||ea&&v(T,S.cell,M,Z))||null!=T&&(T.test(label)||ea&&v(T,S.cell,M,Z)))if(n&&(null!=T?(ea=label.match(T),z=ea[0].toLowerCase(),A=ba+ea.index+z.length):(z=M,A=z.length)),Q){O=S;break}else null==O&&(O=S)}Q=Q||S==q}}if(null!=O){if(Y==E.length&&C.checked)return q=null,y=!0,g(!0,X,t);q=O;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?t||l.getSelectionCell()==q.cell&&1==l.getSelectionCount()||
+l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&C.checked)return y=!0,g(!0,X,t);l.isEnabled()&&!t&&l.clearSelection()}x=null!=O;n&&!U&&d();return 0==M.length||null!=O}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,K=1,P=document.createElement("div");P.style.userSelect="none";P.style.overflow="hidden";P.style.padding="10px";P.style.height="100%";var L=n?"260px":"200px",u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));
+u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=L;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";P.appendChild(u);mxUtils.br(P);if(n){var D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("replaceWith"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=L;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";P.appendChild(D);mxUtils.br(P);
+mxEvent.addListener(D,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";P.appendChild(B);L=document.createElement("label");L.setAttribute("for","geFindWinRegExChck");P.appendChild(L);mxUtils.write(L,mxResources.get("regularExpression"));P.appendChild(L);L=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");L.style.position="relative";L.style.marginLeft="6px";L.style.top="-1px";P.appendChild(L);
+mxUtils.br(P);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";P.appendChild(C);L=document.createElement("label");L.setAttribute("for","geFindWinAllPagesChck");P.appendChild(L);mxUtils.write(L,mxResources.get("allPages"));P.appendChild(L);var G=document.createElement("div");mxUtils.br(P);L=document.createElement("div");L.style.left="0px";L.style.right="0px";L.style.marginTop="6px";L.style.padding="0 6px 0 6px";
+L.style.textAlign="center";P.appendChild(L);var N=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";u.value="";u.style.backgroundColor="";n&&(D.value="",d());p=q=null;y=!1;u.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";n||L.appendChild(N);var I=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});I.setAttribute("title",mxResources.get("find")+" (Enter)");I.style.float="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";L.appendChild(I);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,t,E,M){if(null==M||"1"!=M.html)return E=U.toLowerCase().indexOf(X,E),0>E?U:U.substr(0,
+E)+t+U.substr(E+X.length);var T=U;X=mxUtils.htmlEntities(X);M=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)M.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");E=U.toLowerCase().indexOf(X,E);if(0>E)return T;T=E+X.length;t=mxUtils.htmlEntities(t);U=U.substr(0,E)+t+U.substr(T);for(var Q=0,S=0;S<M.length;S++){if(M[S]-Q<E)U=U.substr(0,M[S])+O[S]+U.substr(M[S]);else{var Y=M[S]-Q<T?E+Q:M[S]+(t.length-X.length);U=U.substr(0,Y)+O[S]+U.substr(Y)}Q+=O[S].length}return U.replace(/\n/g,
+"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));u.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
+"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");L.appendChild(R);mxUtils.br(L);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
+W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");L.appendChild(W);var J=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(D.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var t=0,E={};g(!1,!0,!0)&&100>t;){var M=q.cell,T=l.getLabel(M),O=E[M.id];if(O&&O.replAllMrk==
+K&&O.replAllPos>=A)break;E[M.id]={replAllMrk:K,replAllPos:A};l.isCellEditable(M)&&(l.model.setValue(M,H(T,z,D.value,A-z.length,l.getCurrentCellStyle(M))),t++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[t]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}K++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style.float="none";J.style.width="120px";
+J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");L.appendChild(J);mxUtils.br(L);L.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
+"ellipsis";N.className="geBtn";L.appendChild(N);mxUtils.br(L);L.appendChild(F)}else N.style.width="90px",I.style.width="90px";mxEvent.addListener(u,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==U.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(P,"keydown",function(U){70==
+U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),P,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?C.removeAttribute("disabled"):(C.checked=!1,C.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,t-this.table.clientHeight-("1"==
+urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
"hidden";b.style.height="100%";if(n){var d=document.createElement("input");d.setAttribute("id","geFreehandBrush");d.setAttribute("type","checkbox");d.style.margin="10px 5px 0px 10px";d.style.float="left";b.appendChild(d);var g=document.createElement("label");g.setAttribute("for","geFreehandBrush");g.style.float="left";g.style.marginTop="10px";b.appendChild(g);mxUtils.write(g,mxResources.get("brush"));b.appendChild(g);mxUtils.br(b);var k=document.createElement("input");k.setAttribute("type","range");
k.setAttribute("min","2");k.setAttribute("max","30");k.setAttribute("value",v.freehand.getBrushSize());k.style.width="90%";k.style.visibility="hidden";b.appendChild(k);mxUtils.br(b);mxEvent.addListener(d,"change",function(){v.freehand.setPerfectFreehandMode(this.checked);k.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(k,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var l=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?
v.freehand.stopDrawing():v.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop=n?"5px":"10px";l.style.width="90%";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";b.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),b,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
v.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.className="geBtn"+(v.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&v.freehand.stopDrawing()}));
this.window.setLocation=function(q,x){var y=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;q=Math.max(0,Math.min(q,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));x=Math.max(0,Math.min(x,y-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==q&&this.getY()==x||mxWindow.prototype.setLocation.apply(this,arguments)};var p=mxUtils.bind(this,function(){var q=this.window.getX(),x=this.window.getY();
-this.window.setLocation(q,x)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(k,l){if(n.isEnabled()){var p=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var x=[],y=0;y<q.length;y++){var A=
-mxUtils.trim(q[y]);""!=A&&0>mxUtils.indexOf(k,A)&&x.push(A)}0<x.length&&(n.isSelectionEmpty()?l(k.concat(x)):n.addTagsForCells(n.getSelectionCells(),x))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(p.container,300,80,!0,!0);p.init()}}),d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.setLocation(q,x)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(k,l){if(n.isEnabled()){var p=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var x=[],y=0;y<q.length;y++){var z=
+mxUtils.trim(q[y]);""!=z&&0>mxUtils.indexOf(k,z)&&x.push(z)}0<x.length&&(n.isSelectionEmpty()?l(k.concat(x)):n.addTagsForCells(n.getSelectionCells(),x))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(p.container,300,80,!0,!0);p.init()}}),d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));this.window.setLocation=function(k,l){var p=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;k=Math.max(0,Math.min(k,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));l=Math.max(0,Math.min(l,p-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==k&&this.getY()==l||mxWindow.prototype.setLocation.apply(this,
arguments)};var g=mxUtils.bind(this,function(){var k=this.window.getX(),l=this.window.getY();this.window.setLocation(k,l)});mxEvent.addListener(window,"resize",g);this.destroy=function(){mxEvent.removeListener(window,"resize",g);this.window.destroy()}},AuthDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));
var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[v]));var g=document.createElement("input");g.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(g.checked)});v.insertBefore(d,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize=
"18px";v.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),m.appendChild(f),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(n,"click",function(k){g.checked=!g.checked;mxEvent.consume(k)}));this.container=m},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),
m=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var v=b.sidebar.customEntries[n],d={title:b.getResource(v.title),entries:[]},g=0;g<v.entries.length;g++){var k=v.entries[g];d.entries.push({id:k.id,title:b.getResource(k.title),desc:b.getResource(k.desc),image:k.preview})}m.push(d)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)m.push(f[n]);else{d={title:f[n].title,entries:[]};for(g=0;g<f[n].entries.length;g++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(C){for(var E=0;E<C.length;E++)(function(G){var P=y.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,G.title);l.appendChild(P);for(var J=0;J<G.entries.length;J++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=b.sidebar.isEntryVisible(F.id);S.defaultChecked=S.checked;H.appendChild(S);mxUtils.write(H," "+F.title);l.appendChild(H);var V=function(M){if(null==M||"INPUT"!=mxEvent.getSource(M).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var W=document.createElement("pre");
-W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,F.desc);p.appendChild(W)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-M&&mxEvent.consume(M)}};mxEvent.addListener(H,"click",V);mxEvent.addListener(H,"dblclick",function(M){S.checked=!S.checked;mxEvent.consume(M)});x.push(function(){return S.checked?F.id:null});0==E&&0==J&&V()})(G.entries[J])})(C[E])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
+f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var C=0;C<B.length;C++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);l.appendChild(N);for(var I=0;I<G.entries.length;I++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
+"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
+V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);p.appendChild(V)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
+J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,x=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(f);c.style.padding=
-"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;f.appendChild(A);n=
-document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(C){A.checked=!A.checked;mxEvent.consume(C)});var B=document.createElement("input");B.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(B),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),B.style.position="relative",B.style.top="1px",
-B.checked=!0,B.defaultChecked=!0,mxEvent.addListener(n,"click",function(C){mxEvent.getSource(C)!=B&&(B.checked=!B.checked,mxEvent.consume(C))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var C=[],E=0;E<x.length;E++){var G=x[E].apply(this,arguments);null!=G&&C.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(E=mxUtils.indexOf(C,".scratchpad"),null!=b.scratchpad!=
-(0<=E&&0<C.splice(E,1).length)&&b.toggleScratchpad(),E=mxUtils.indexOf(C,"search"),mxSettings.settings.search=0<=E&&0<C.splice(E,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),B.checked&&mxSettings.save());b.sidebar.showEntries(C.join(";"),B.checked,!0);b.setSidebarTitles(A.checked,B.checked)});g.className="geBtn gePrimaryBtn"}else{var I=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
-I.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(C,E,G){var P=document.createElement("input");P.type="checkbox";I.appendChild(P);P.checked=b.sidebar.isEntryVisible(G);var J=document.createElement("span");mxUtils.write(J,E);E=document.createElement("div");E.style.display="block";E.appendChild(P);E.appendChild(J);mxEvent.addListener(J,"click",function(F){P.checked=!P.checked;mxEvent.consume(F)});C.appendChild(E);
-return function(){return P.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);I.appendChild(n);x=[];var t=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)t++;var z=[e,m,v],L=0;for(n=0;n<f.length;n++)(function(C){for(var E=0;E<C.entries.length;E++){var G=C.entries[E];x.push(O(z[Math.floor(L/(t/3))],G.title,G.id));L++}})(f[n]);c.appendChild(I);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";B=document.createElement("input");
-isLocalStorage&&(B.setAttribute("type","checkbox"),B.checked=!0,B.defaultChecked=!0,f.appendChild(B),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(C){B.checked=!B.checked;mxEvent.consume(C)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var C=["search"],E=0;E<x.length;E++){var G=
-x[E].apply(this,arguments);null!=G&&C.push(G)}b.sidebar.showEntries(0<C.length?C.join(";"):"",B.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML=
-"";for(var y=0;y<d.length;y++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var B=document.createElement("span");B.className="geSprite geSprite-delete";B.style.position="relative";B.style.cursor="pointer";B.style.top="5px";B.style.marginRight="4px";B.style.display="inline-block";A.appendChild(B);mxUtils.write(A,d[y]);v.appendChild(A);mxUtils.br(v);mxEvent.addListener(B,"click",function(I){return function(){b.confirm(mxResources.get("delete")+' "'+d[I]+'"?',function(){null!=f&&
-f(d[I]);d.splice(I,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");
-y.appendChild(A);var B=document.createElement("select");B.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var I=document.createElement("option");mxUtils.write(I,App.publicPlugin[A]);I.value=App.publicPlugin[A];B.appendChild(I)}y.appendChild(B);mxUtils.br(y);mxUtils.br(y);A=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(t){b.hideDialog();if(null!=t&&0<t.length){t=t.split(";");for(var z=0;z<t.length;z++){var L=t[z],
-C=App.pluginRegistry[L];null!=C&&(L=C);0<L.length&&0>mxUtils.indexOf(d,L)&&d.push(L)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(O.container,300,80,!0,!0);O.init()});A.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[B.value];0>mxUtils.indexOf(d,O)&&(d.push(O),m())}),null,null,null,A);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;f.appendChild(z);n=
+document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(A),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",
+A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(n,"click",function(B){mxEvent.getSource(B)!=A&&(A.checked=!A.checked,mxEvent.consume(B))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],C=0;C<x.length;C++){var G=x[C].apply(this,arguments);null!=G&&B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(C=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=
+(0<=C&&0<B.splice(C,1).length)&&b.toggleScratchpad(),C=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=C&&0<B.splice(C,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),A.checked,!0);b.setSidebarTitles(z.checked,A.checked)});g.className="geBtn gePrimaryBtn"}else{var K=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
+K.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var P=mxUtils.bind(this,function(B,C,G){var N=document.createElement("input");N.type="checkbox";K.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var I=document.createElement("span");mxUtils.write(I,C);C=document.createElement("div");C.style.display="block";C.appendChild(N);C.appendChild(I);mxEvent.addListener(I,"click",function(F){N.checked=!N.checked;mxEvent.consume(F)});B.appendChild(C);
+return function(){return N.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);K.appendChild(n);x=[];var L=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)L++;var u=[e,m,v],D=0;for(n=0;n<f.length;n++)(function(B){for(var C=0;C<B.entries.length;C++){var G=B.entries[C];x.push(P(u[Math.floor(D/(L/3))],G.title,G.id));D++}})(f[n]);c.appendChild(K);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");
+isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],C=0;C<x.length;C++){var G=
+x[C].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",A.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML=
+"";for(var y=0;y<d.length;y++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";z.appendChild(A);mxUtils.write(z,d[y]);v.appendChild(z);mxUtils.br(v);mxEvent.addListener(A,"click",function(K){return function(){b.confirm(mxResources.get("delete")+' "'+d[K]+'"?',function(){null!=f&&
+f(d[K]);d.splice(K,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
+y.appendChild(z);var A=document.createElement("select");A.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var K=document.createElement("option");mxUtils.write(K,App.publicPlugin[z]);K.value=App.publicPlugin[z];A.appendChild(K)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var P=new FilenameDialog(b,"",mxResources.get("add"),function(L){b.hideDialog();if(null!=L&&0<L.length){L=L.split(";");for(var u=0;u<L.length;u++){var D=L[u],
+B=App.pluginRegistry[D];null!=B&&(D=B);0<D.length&&0>mxUtils.indexOf(d,D)&&d.push(D)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(P.container,300,80,!0,!0);P.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var P=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,P)&&(d.push(P),m())}),null,null,null,z);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
l.className="geBtn";var p=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){g?(mxSettings.setPlugins(d),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});p.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});x.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var C=B.checked,E=I.checked,G=x.geometry,P=g.width,J=g.height,F=(300-P)/2,H=(300-J)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+P&&(G.width=F+P-G.x,G.x=Math.min(G.x,F+P));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+J&&
-(G.height=H+J-G.y,G.y=Math.min(G.y,H+J));var S=(G.x-F)/P*100;P=100-(G.x+G.width-F)/P*100;F=(G.y-H)/J*100;G=100-(G.y+G.height-H)/J*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(P)+"% "+mxUtils.format(G)+"% "+mxUtils.format(S)+"%"+(C?" round "+q+"%":E?" round 50%":"")+")"}function n(C){null!=l&&(!0!==C&&(l.model.setGeometry(x,p.clone()),q=5,t.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=B.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
-d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function C(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var E=l.createVertexHandler;l.createVertexHandler=function(){var K=
-E.apply(this,arguments);K.livePreview=!1;return K};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,P=g.width,J=g.height,F=(300-P)/2,H=(300-J)/2,S=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(S[0]),M=parseFloat(S[1]),W=parseFloat(S[2]),U=parseFloat(S[3]);isFinite(V)&&isFinite(M)&&isFinite(W)&&isFinite(U)?(G.x=U/100*P+F,G.y=V/100*J+H,G.width=(100-M)/100*P+F-G.x,G.height=(100-W)/100*J+H-G.y,"round"==S[4]?"50%"==S[5]?I.setAttribute("checked","checked"):(q=parseInt(S[5]),t.value=
-q,B.setAttribute("checked","checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(K){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=
-""};l.dblClick=function(){};var D=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){D.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
-100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
-var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id","croppingRounded");B.setAttribute("name","croppingShape");B.style.margin="5px";v.appendChild(B);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var I=document.createElement("input");I.setAttribute("type","radio");I.setAttribute("id","croppingEllipse");I.setAttribute("name","croppingShape");I.style.margin="5px";v.appendChild(I);
-e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(A,"change",n);mxEvent.addListener(B,"change",n);mxEvent.addListener(I,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var t=document.createElement("input");t.setAttribute("type","range");t.setAttribute("min","1");t.setAttribute("max","49");t.setAttribute("value",q);t.setAttribute("title",mxResources.get("arcSize"));
-O.appendChild(t);v.appendChild(O);mxEvent.addListener(t,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var z=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});z.className="geBtn";var L=document.createElement("div");L.style.marginTop=
-"10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(e),L.appendChild(z),L.appendChild(d)):(L.appendChild(z),L.appendChild(d),L.appendChild(e));v.appendChild(L);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");n.style.paddingLeft=
+!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,C=K.checked,G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+N&&(G.width=F+N-G.x,G.x=Math.min(G.x,F+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+I&&
+(G.height=H+I-G.y,G.y=Math.min(G.y,H+I));var R=(G.x-F)/N*100;N=100-(G.x+G.width-F)/N*100;F=(G.y-H)/I*100;G=100-(G.y+G.height-H)/I*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(B?" round "+q+"%":C?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,L.value=q),l.model.setStyle(x,y+m()),l.selectAll(),P.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
+d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function B(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var C=l.createVertexHandler;l.createVertexHandler=function(){var M=
+C.apply(this,arguments);M.livePreview=!1;return M};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2,R=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),J=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(J)&&isFinite(V)&&isFinite(U)?(G.x=U/100*N+F,G.y=W/100*I+H,G.width=(100-J)/100*N+F-G.x,G.height=(100-V)/100*I+H-G.y,"round"==R[4]?"50%"==R[5]?K.setAttribute("checked","checked"):(q=parseInt(R[5]),L.value=
+q,A.setAttribute("checked","checked"),P.style.visibility="visible"):z.setAttribute("checked","checked")):f=null}else f=null}catch(M){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,B);l.addListener(mxEvent.CELLS_RESIZED,B);var X=l.graphHandler.mouseUp,t=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){t.apply(this,arguments);k.style.backgroundColor=
+""};l.dblClick=function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
+100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";v.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
+var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var K=document.createElement("input");K.setAttribute("type","radio");K.setAttribute("id","croppingEllipse");K.setAttribute("name","croppingShape");K.style.margin="5px";v.appendChild(K);
+e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(z,"change",n);mxEvent.addListener(A,"change",n);mxEvent.addListener(K,"change",n);var P=document.createElement("div");P.style.textAlign="center";P.style.visibility="hidden";var L=document.createElement("input");L.setAttribute("type","range");L.setAttribute("min","1");L.setAttribute("max","49");L.setAttribute("value",q);L.setAttribute("title",mxResources.get("arcSize"));
+P.appendChild(L);v.appendChild(P);mxEvent.addListener(L,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});u.className="geBtn";var D=document.createElement("div");D.style.marginTop=
+"10px";D.style.textAlign="right";b.editor.cancelFirst?(D.appendChild(e),D.appendChild(u),D.appendChild(d)):(D.appendChild(u),D.appendChild(d),D.appendChild(e));v.appendChild(D);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");n.style.paddingLeft=
"6px";mxUtils.write(g,mxResources.get("relative")+":");var l=document.createElement("input");l.setAttribute("type","checkbox");null!=c&&c.relative&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);this.init=function(){l.focus()};k.appendChild(l);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type",
"text");p.style.width="100px";p.value=null!=c?c.x:"";k.appendChild(p);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.y:"";k.appendChild(q);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
k=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c&&null!=c.offset?c.offset.x:"";k.appendChild(x);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
-y.value=null!=c&&null!=c.offset?c.offset.y:"";k.appendChild(y);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=
-document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="100px";B.value=null!=c?c.height:"";k.appendChild(B);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.width="100px";I.value=
-1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(I);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var O=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var z=f.getCellGeometry(e[t]);null!=z&&(z=z.clone(),f.isCellMovable(e[t])&&(z.relative=l.checked,
-0<mxUtils.trim(p.value).length&&(z.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(z.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==z.offset&&(z.offset=new mxPoint),z.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==z.offset&&(z.offset=new mxPoint),z.offset.y=Number(y.value))),f.isCellResizable(e[t])&&(0<mxUtils.trim(A.value).length&&(z.width=Number(A.value)),0<mxUtils.trim(B.value).length&&(z.height=Number(B.value))),f.getModel().setGeometry(e[t],z));0<mxUtils.trim(I.value).length&&
-f.setCellStyles(mxConstants.STYLE_ROTATION,Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(E){for(E=document.elementFromPoint(E.clientX,
-E.clientY);null!=E&&E.parentNode!=x;)E=E.parentNode;var G=null;if(null!=E){var P=x.firstChild;for(G=0;null!=P&&P!=E;)P=P.nextSibling,G++}return G}function d(E,G,P,J,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==E&&null!=S||null==A[E]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==
-R.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=F,X=H;if(F>b.maxImageSize||H>b.maxImageSize){var u=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=u;H*=u}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display="inline-block";D.style.position="relative";D.style.padding="0 12px";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition",
-"transform .1s ease-in-out");if(null!=E){var K=document.createElement("img");K.setAttribute("src",t.convert(E));K.style.width=U+"px";K.style.height=X+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-X)/2)+"px";K.style.paddingLeft=Math.floor((100-U)/2)+"px";D.appendChild(K)}else if(null!=S){var T=b.stringToCells(Graph.decompress(S.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,D,null,!0,!1),D.firstChild.style.display="inline-block",D.firstChild.style.cursor="")}var N=document.createElement("img");
-N.setAttribute("src",Editor.closeBlackImage);N.setAttribute("border","0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.position="absolute";N.style.marginLeft="-12px";N.style.zIndex="1";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,fa,aa){mxEvent.addListener(N,"click",function(va){A[fa]=null;for(var ja=0;ja<l.length;ja++)if(null!=l[ja].data&&l[ja].data==fa||null!=l[ja].xml&&
-null!=aa&&l[ja].xml==aa.xml){l.splice(ja,1);break}D.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(va)});mxEvent.addListener(N,"dblclick",function(va){mxEvent.consume(va)})})(D,E,S);D.appendChild(N);D.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var R=null;null!=E?(R={data:E,w:F,h:H,title:M},null!=V&&(R.aspect=V),A[E]=K,l.push(R)):null!=S&&(S.aspect="fixed",l.push(S),R=S);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(Z))});W();D.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
-!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,R.title||"",mxResources.get("ok"),function(aa){null!=aa&&(R.title=aa,W())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==R.title||0==R.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";R.title=Q.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(D,"dblclick",T);x.appendChild(D);mxEvent.addListener(D,"dragstart",function(Z){null==E&&null!=S&&(N.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",
-S.xml);B=v(Z);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);N.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(Z){"hidden"==N.style.visibility&&(N.style.visibility="",Q.style.visibility="");B=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else z||(z=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
-!1;try{if(U=mxUtils.parseXml(E),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);
-d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(E){E.dataTransfer.dropEffect=null!=B?"move":"copy";E.stopPropagation();E.preventDefault()}function k(E){E.stopPropagation();E.preventDefault();z=!1;I=v(E);if(null!=B)null!=I&&I<x.children.length?(l.splice(I>B?I-1:I,0,l.splice(B,1)[0]),x.insertBefore(x.children[B],x.children[I])):(l.push(l.splice(B,1)[0]),x.appendChild(x.children[B]));
-else if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,0,0,b.maxImageSize,L(E));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(E.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(P){d(G,null,0,0,P.width,P.height);x.scrollTop=x.scrollHeight})}E.stopPropagation();E.preventDefault()}var l=[];f=document.createElement("div");
+y.value=null!=c&&null!=c.offset?c.offset.y:"";k.appendChild(y);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.width:"";k.appendChild(z);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=
+document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=
+1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(K);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var P=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var L=0;L<e.length;L++){var u=f.getCellGeometry(e[L]);null!=u&&(u=u.clone(),f.isCellMovable(e[L])&&(u.relative=l.checked,
+0<mxUtils.trim(p.value).length&&(u.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(u.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.y=Number(y.value))),f.isCellResizable(e[L])&&(0<mxUtils.trim(z.value).length&&(u.width=Number(z.value)),0<mxUtils.trim(A.value).length&&(u.height=Number(A.value))),f.getModel().setGeometry(e[L],u));0<mxUtils.trim(K.value).length&&
+f.setCellStyles(mxConstants.STYLE_ROTATION,Number(K.value),[e[L]])}}finally{f.getModel().endUpdate()}});P.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(L){13==L.keyCode&&P.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(P)):(n.appendChild(P),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(C){for(C=document.elementFromPoint(C.clientX,
+C.clientY);null!=C&&C.parentNode!=x;)C=C.parentNode;var G=null;if(null!=C){var N=x.firstChild;for(G=0;null!=N&&N!=C;)N=N.nextSibling,G++}return G}function d(C,G,N,I,F,H,R,W,J){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=R||null==z[C]){var V=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));Q.style.color=null==S.title||0==
+S.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=F,X=H;if(F>b.maxImageSize||H>b.maxImageSize){var t=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=t;H*=t}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display="inline-block";E.style.position="relative";E.style.padding="0 12px";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition",
+"transform .1s ease-in-out");if(null!=C){var M=document.createElement("img");M.setAttribute("src",L.convert(C));M.style.width=U+"px";M.style.height=X+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-X)/2)+"px";M.style.paddingLeft=Math.floor((100-U)/2)+"px";E.appendChild(M)}else if(null!=R){var T=b.stringToCells(Graph.decompress(R.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,E,null,!0,!1),E.firstChild.style.display="inline-block",E.firstChild.style.cursor="")}var O=document.createElement("img");
+O.setAttribute("src",Editor.closeBlackImage);O.setAttribute("border","0");O.setAttribute("title",mxResources.get("delete"));O.setAttribute("align","top");O.style.paddingTop="4px";O.style.position="absolute";O.style.marginLeft="-12px";O.style.zIndex="1";O.style.cursor="pointer";mxEvent.addListener(O,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,fa,aa){mxEvent.addListener(O,"click",function(va){z[fa]=null;for(var ja=0;ja<l.length;ja++)if(null!=l[ja].data&&l[ja].data==fa||null!=l[ja].xml&&
+null!=aa&&l[ja].xml==aa.xml){l.splice(ja,1);break}E.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(va)});mxEvent.addListener(O,"dblclick",function(va){mxEvent.consume(va)})})(E,C,R);E.appendChild(O);E.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var S=null;null!=C?(S={data:C,w:F,h:H,title:J},null!=W&&(S.aspect=W),z[C]=M,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=P&&(P(),P=null,mxEvent.consume(Z))});V();E.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(aa){null!=aa&&(S.title=aa,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=P&&(P(),P=null);if(null==S.title||0==S.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);P=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";S.title=Q.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==C&&null!=R&&(O.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);A=v(Z);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);O.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==O.style.visibility&&(O.style.visibility="",Q.style.visibility="");A=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(U=mxUtils.parseXml(C),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);
+d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(C){C.dataTransfer.dropEffect=null!=A?"move":"copy";C.stopPropagation();C.preventDefault()}function k(C){C.stopPropagation();C.preventDefault();u=!1;K=v(C);if(null!=A)null!=K&&K<x.children.length?(l.splice(K>A?K-1:K,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[K])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
+else if(0<C.dataTransfer.files.length)b.importFiles(C.dataTransfer.files,0,0,b.maxImageSize,D(C));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(C.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){d(G,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}C.stopPropagation();C.preventDefault()}var l=[];f=document.createElement("div");
f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",e);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==m||m.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==m||m.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");
-y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var A={},B=null,I=null,O=null;e=function(E){"true"!=mxEvent.getSource(E).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(E))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var t=new mxUrlConverter,z=
-!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(E){y.style.cursor="";for(var G=mxEvent.getSource(E);null!=G;){if(G==x||G==y){E.stopPropagation();E.preventDefault();break}G=G.parentNode}});var L=function(E){return function(G,P,J,F,H,S,V,M,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(U){d(U,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?
-null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(d(G,P,J,F,H,S,V,"fixed",mxEvent.isAltDown(E)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
-c.appendChild(e);"draw.io"!=b.getServiceName()||null==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(E){b.spinner.stop();if(null!=E){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(E);E=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(E.container,450,240,!0);E.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
-function(){var E=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(E,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(E))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");
-C.setAttribute("type","file");mxEvent.addListener(C,"change",function(E){z=!1;b.importFiles(C.files,0,0,b.maxImageSize,function(G,P,J,F,H,S,V,M,W){null!=C.files&&(L(E)(G,P,J,F,H,S,V,M,W),C.type="",C.type="file",C.value="")});x.scrollTop=x.scrollHeight});C.style.display="none";document.body.appendChild(C);b.libDlgFileInputElt=C}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
-mxUtils.button(mxResources.get("addImages"),function(){null!=O&&(O(),O=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(E,G,P){z=!1;if(null!=E){if("data:image/"==E.substring(0,11)){var J=E.indexOf(",");0<J&&(E=E.substring(0,J)+";base64,"+E.substring(J+1))}d(E,null,0,0,G,P);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(E,G,P,J){b.saveLibrary(E,G,P,J)};p=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=O&&(O(),O=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
+y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var z={},A=null,K=null,P=null;e=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=P&&(P(),P=null,mxEvent.consume(C))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var L=new mxUrlConverter,u=
+!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(C){y.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==x||G==y){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,N,I,F,H,R,W,J,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){d(U,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?
+null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(d(G,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
+c.appendChild(e);"draw.io"!=b.getServiceName()||null==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(C){b.spinner.stop();if(null!=C){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(C);C=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(C.container,450,240,!0);C.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
+function(){var C=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(C,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(C))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");
+B.setAttribute("type","file");mxEvent.addListener(B,"change",function(C){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,I,F,H,R,W,J,V){null!=B.files&&(D(C)(G,N,I,F,H,R,W,J,V),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=P&&(P(),P=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
+mxUtils.button(mxResources.get("addImages"),function(){null!=P&&(P(),P=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(C,G,N){u=!1;if(null!=C){if("data:image/"==C.substring(0,11)){var I=C.indexOf(",");0<I&&(C=C.substring(0,I)+";base64,"+C.substring(I+1))}d(C,null,0,0,G,N);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(C,G,N,I){b.saveLibrary(C,G,N,I)};p=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=P&&(P(),P=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
"2");g.style.fontSize="10pt";mxUtils.write(g,f);d.appendChild(g);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");var k=document.createElement("textarea");k.style.outline="none";k.style.resize="none";k.style.width=c-200+"px";k.style.height=m+"px";this.textarea=k;this.init=function(){k.focus();k.scrollTop=0};g.appendChild(k);d.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
"6px";f.style.width="200px";f.style.height=m+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var l=new Graph(f);l.setEnabled(!1);var p=b.editor.graph.cloneCell(e);l.addCells([p]);f=l.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(k,q||"");f=l.getGraphBounds();m=Math.min(160/f.width,(m-40)/f.height);l.view.scaleAndTranslate(m,20/m-f.x,20/m-f.y);d.appendChild(g);
v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),m.className="geBtn",g.appendChild(m));m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&g.appendChild(m);
-var x=function(y,A,B){var I=k.value,O=mxUtils.parseXml(I);I=mxUtils.getPrettyXml(O.documentElement);O=O.documentElement.getElementsByTagName("parsererror");if(null!=O&&0<O.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
+var x=function(y,z,A){var K=k.value,P=mxUtils.parseXml(K);K=mxUtils.getPrettyXml(P.documentElement);P=P.documentElement.getElementsByTagName("parsererror");if(null!=P&&0<P.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),P=!y.model.contains(z),!A||P||K!=q){K=Graph.compress(K);y.getModel().beginUpdate();try{if(P){var L=b.editor.graph.getFreeInsertPoint();z.geometry.x=L.x;z.geometry.y=L.y;y.addCell(z)}y.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+K+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}P&&(y.setSelectionCell(z),y.scrollCellToVisible(z))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||
-mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,A){x=mxUtils.button(x,function(B){y(B)});null!=A&&x.setAttribute("title",A);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
-p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function A(ha){Ga.innerHTML=mxUtils.htmlEntities(ha);Ga.style.display="block";setTimeout(function(){Ga.style.display="none"},4E3)}function B(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",u=X,X=null)}function I(ha,da,ca,la,ia,ma,ra){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";M.querySelector(".geTempDlgRadioBtn[data-id="+
-la+"]").className="geTempDlgRadioBtn "+(ra?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");M.querySelector("."+da).src="/images/"+ca+"-sel.svg";M.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function O(ha,da,ca,la){function ia(na,Ka){null==ra?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(ra=Ia.getText());Ka(ra)}))):Ka(ra)}
+mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,z){x=mxUtils.button(x,function(A){y(A)});null!=z&&x.setAttribute("title",z);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
+p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(ha){Ga.innerHTML=mxUtils.htmlEntities(ha);Ga.style.display="block";setTimeout(function(){Ga.style.display="none"},4E3)}function A(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",t=X,X=null)}function K(ha,da,ca,la,ia,ma,ra){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
+la+"]").className="geTempDlgRadioBtn "+(ra?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+da).src="/images/"+ca+"-sel.svg";J.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function P(ha,da,ca,la){function ia(na,Ka){null==ra?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(ra=Ia.getText());Ka(ra)}))):Ka(ra)}
function ma(na,Ka,Ia){if(null!=na&&mxUtils.isAncestorNode(document.body,da)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(da,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka,Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";M.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(M.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var ra=null;if(Ea||b.sidebar.currentElt==
-da)b.sidebar.hideTooltip();else{var pa=function(na){Ea&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Ea=!1;ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;Ea=!0;ca.src="/images/aui-wait.gif";ha.isExt?g(ha,pa,function(){A(mxResources.get("cantLoadPrev"));Ea=!1;ca.src="/images/icon-search.svg"}):ia(ha.url,pa)}}function t(ha,da,ca){if(null!=D){for(var la=D.className.split(" "),ia=0;ia<la.length;ia++)if(-1<la[ia].indexOf("Active")){la.splice(ia,
-1);break}D.className=la.join(" ")}null!=ha?(D=ha,D.className+=" "+da,K=ca,Aa.className="geTempDlgCreateBtn"):(K=D=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=K){var ca=function(pa){ra.isExternal?g(ra,function(na){la(na,pa)},ia):ra.url?mxUtils.get(TEMPLATE_PATH+"/"+ra.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,ra,da)},ia=function(){A(mxResources.get("cannotLoad"));
-ma()},ma=function(){K=ra;Aa.className="geTempDlgCreateBtn";da&&(Ha.className="geTempDlgOpenBtn")},ra=K;K=null;"boolean"!==typeof da&&(da=ra.isExternal&&p);1==ha?k(ra.url,ra):da?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1):na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function L(ha){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ha.style.display=ha);for(var da=M.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function C(ha,da,ca,la,ia){ia||(aa.innerHTML="",t(),R=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka,Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";J.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(J.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var ra=null;if(Ea||b.sidebar.currentElt==
+da)b.sidebar.hideTooltip();else{var pa=function(na){Ea&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Ea=!1;ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;Ea=!0;ca.src="/images/aui-wait.gif";ha.isExt?g(ha,pa,function(){z(mxResources.get("cantLoadPrev"));Ea=!1;ca.src="/images/icon-search.svg"}):ia(ha.url,pa)}}function L(ha,da,ca){if(null!=E){for(var la=E.className.split(" "),ia=0;ia<la.length;ia++)if(-1<la[ia].indexOf("Active")){la.splice(ia,
+1);break}E.className=la.join(" ")}null!=ha?(E=ha,E.className+=" "+da,M=ca,Aa.className="geTempDlgCreateBtn"):(M=E=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ha,da){if(null!=M){var ca=function(pa){ra.isExternal?g(ra,function(na){la(na,pa)},ia):ra.url?mxUtils.get(TEMPLATE_PATH+"/"+ra.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,ra,da)},ia=function(){z(mxResources.get("cannotLoad"));
+ma()},ma=function(){M=ra;Aa.className="geTempDlgCreateBtn";da&&(Ha.className="geTempDlgOpenBtn")},ra=M;M=null;"boolean"!==typeof da&&(da=ra.isExternal&&p);1==ha?k(ra.url,ra):da?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1):na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function D(ha){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ha.style.display=ha);for(var da=J.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function B(ha,da,ca,la,ia){ia||(aa.innerHTML="",L(),S=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");
ma.className="geTempDlgDiagramsListGrid";var ra=document.createElement("tr"),pa=document.createElement("th");pa.style.width="50%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));ra.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));ra.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));ra.appendChild(pa);ma.appendChild(ra);
aa.appendChild(ma)}for(ra=0;ra<ha.length;ra++){ha[ra].isExternal=!da;var na=ha[ra].url,Ka=(pa=mxUtils.htmlEntities(da?mxResources.get(ha[ra].title,null,ha[ra].title):ha[ra].title))||ha[ra].url,Ia=ha[ra].imgUrl,Ra=mxUtils.htmlEntities(ha[ra].changedBy||""),Sa="";ha[ra].lastModifiedOn&&(Sa=b.timeSince(new Date(ha[ra].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ia||(Ia=TEMPLATE_PATH+"/"+na.substring(0,na.length-
4)+".png");na=ca?50:15;null!=pa&&pa.length>na&&(pa=pa.substring(0,na)+"&hellip;");if(ca){var Ja=document.createElement("tr");Ia=document.createElement("td");var Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramListPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Ia.appendChild(Oa);Ka=document.createElement("span");Ka.className="geTempDlgDiagramTitle";Ka.innerHTML=pa;Ia.appendChild(Ka);Ja.appendChild(Ia);Ia=document.createElement("td");
-Ia.innerHTML=Ra;Ja.appendChild(Ia);Ia=document.createElement("td");Ia.innerHTML=Sa;Ja.appendChild(Ia);ma.appendChild(Ja);null==D&&(L(da),t(Ja,"geTempDlgDiagramsListGridActive",ha[ra]));(function(Ma,Ta,Ua){mxEvent.addListener(Ja,"click",function(){D!=Ta&&(L(da),t(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ja,"dblclick",z);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ha[ra],Ja,Oa)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
-Ka);null==D&&(L(da),t(Pa,"geTempDlgDiagramTileActive",ha[ra]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=pa?pa:"";Pa.appendChild(Ra);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Oa);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){D!=Ta&&(L(da),t(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
-"dblclick",z);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ha[ra],Pa,Oa);aa.appendChild(Pa)}}for(var Ya in la)ha=la[Ya],0<ha.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),C(ha,da,ca,null,!0))}function E(ha,da){Ca.innerHTML="";t();var ca=Math.floor(Ca.offsetWidth/150)-1;da=!da&&ha.length>ca?ca:ha.length;for(var la=0;la<da;la++){var ia=ha[la];ia.isCategory=!0;var ma=document.createElement("div"),
-ra=mxResources.get(ia.title);null==ra&&(ra=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",ra);ra=mxUtils.htmlEntities(ra);15<ra.length&&(ra=ra.substring(0,15)+"&hellip;");null==D&&(L(!0),t(ma,"geTempDlgNewDiagramCatItemActive",ia));var pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;pa.appendChild(na);ma.appendChild(pa);
-pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);(function(Ka,Ia){mxEvent.addListener(ma,"click",function(){D!=Ia&&(L(!0),t(Ia,"geTempDlgNewDiagramCatItemActive",Ka))});mxEvent.addListener(ma,"dblclick",z)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";ra=mxResources.get("showAllTemps");ma.setAttribute("title",ra);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";
-pa.innerHTML="...";pa.style.fontSize="32px";ma.appendChild(pa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=M.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=
+Ia.innerHTML=Ra;Ja.appendChild(Ia);Ia=document.createElement("td");Ia.innerHTML=Sa;Ja.appendChild(Ia);ma.appendChild(Ja);null==E&&(D(da),L(Ja,"geTempDlgDiagramsListGridActive",ha[ra]));(function(Ma,Ta,Ua){mxEvent.addListener(Ja,"click",function(){E!=Ta&&(D(da),L(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ja,"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){P(Ma,Ta,Ua,Za)})})(ha[ra],Ja,Oa)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ka);null==E&&(D(da),L(Pa,"geTempDlgDiagramTileActive",ha[ra]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=pa?pa:"";Pa.appendChild(Ra);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Oa);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){E!=Ta&&(D(da),L(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
+"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){P(Ma,Ta,Ua,Za)})})(ha[ra],Pa,Oa);aa.appendChild(Pa)}}for(var Ya in la)ha=la[Ya],0<ha.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),B(ha,da,ca,null,!0))}function C(ha,da){Ca.innerHTML="";L();var ca=Math.floor(Ca.offsetWidth/150)-1;da=!da&&ha.length>ca?ca:ha.length;for(var la=0;la<da;la++){var ia=ha[la];ia.isCategory=!0;var ma=document.createElement("div"),
+ra=mxResources.get(ia.title);null==ra&&(ra=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",ra);ra=mxUtils.htmlEntities(ra);15<ra.length&&(ra=ra.substring(0,15)+"&hellip;");null==E&&(D(!0),L(ma,"geTempDlgNewDiagramCatItemActive",ia));var pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;pa.appendChild(na);ma.appendChild(pa);
+pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);(function(Ka,Ia){mxEvent.addListener(ma,"click",function(){E!=Ia&&(D(!0),L(Ia,"geTempDlgNewDiagramCatItemActive",Ka))});mxEvent.addListener(ma,"dblclick",u)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";ra=mxResources.get("showAllTemps");ma.setAttribute("title",ra);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";
+pa.innerHTML="...";pa.style.fontSize="32px";ma.appendChild(pa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=ra;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=J.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=
ca?"none":""}function G(ha,da,ca){function la(Qa,Ya){var Ma=mxResources.get(Qa);null==Ma&&(Ma=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Ma+" ("+Ya.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(qa.style.display="none",Da.style.minHeight="100%"),
-X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ba.scrollTop=0,W&&(U=!0),va.innerHTML=Ya,ja.style.display="none",C(Ua?da[Qa]:Ta?ka[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var ma=M.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var ra in da){ca=document.createElement("div");var pa=da[ra];
+X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ba.scrollTop=0,V&&(U=!0),va.innerHTML=Ya,ja.style.display="none",B(Ua?da[Qa]:Ta?ka[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var ma=J.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var ra in da){ca=document.createElement("div");var pa=da[ra];
pa=la(ra,pa);ca.className="geTemplateCatLink";ca.setAttribute("title",pa.fullLbl);ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,ca,null,!0)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(ra in ha){var na=ka[ra],Ka=ca=document.createElement(na?"ul":"div");pa=ha[ra];pa=la(ra,pa);if(null!=na){var Ia=document.createElement("li"),Ra=document.createElement("div");
Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",pa.fullLbl);Ra.innerHTML=pa.lbl;Ka=Ra;Ia.appendChild(Ra);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ja in na){var Oa=document.createElement("li"),Pa=la(Ja,na[Ja]);Oa.setAttribute("title",Pa.fullLbl);Oa.innerHTML=Pa.lbl;Oa.className="geTemplateCatLink";Oa.style.padding="0";Oa.style.margin="0";ia(ra,Pa.lblOnly,Oa,Ja);Sa.appendChild(Oa)}Ia.appendChild(Sa);
ca.className="geTempTree";ca.appendChild(Ia);(function(Qa,Ya){mxEvent.addListener(Ya,"click",function(){for(var Ma=Qa.querySelectorAll("li"),Ta=0;Ta<Ma.length;Ta++)Ma[Ta].style.margin="";Qa.style.visibility="visible";Qa.classList.toggle("geTempTreeActive");Qa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ma.length;Ua++)Ma[Ua].style.margin="0";Qa.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Sa,Ra)}else ca.className="geTemplateCatLink geTemplateDrawioCatLink",
-ca.setAttribute("title",pa.fullLbl),ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,Ka)}}function P(){mxUtils.get(c,function(ha){if(!La){La=!0;ha=ha.getXml().documentElement.firstChild;for(var da={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var ca=ha.getAttribute("name"),la=ha.getElementsByTagName("add"),ia=[],ma=0;ma<la.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(la[ma])));null!=ca&&0<ia.length&&(da[ca]=ia.join(";"))}else if(ia=ha.getAttribute("url"),
+ca.setAttribute("title",pa.fullLbl),ca.innerHTML=pa.lbl;ma.appendChild(ca);ia(ra,pa.lblOnly,Ka)}}function N(){mxUtils.get(c,function(ha){if(!La){La=!0;ha=ha.getXml().documentElement.firstChild;for(var da={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var ca=ha.getAttribute("name"),la=ha.getElementsByTagName("add"),ia=[],ma=0;ma<la.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(la[ma])));null!=ca&&0<ia.length&&(da[ca]=ia.join(";"))}else if(ia=ha.getAttribute("url"),
null!=ia){la=ha.getAttribute("section");ca=ha.getAttribute("subsection");if(null==la&&(ma=ia.indexOf("/"),la=ia.substring(0,ma),null==ca)){var ra=ia.indexOf("/",ma+1);-1<ra&&(ca=ia.substring(ma+1,ra))}ma=ta[la];null==ma&&(ya++,ma=[],ta[la]=ma);ia=ha.getAttribute("clibs");null!=da[ia]&&(ia=da[ia]);ia={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:ia,tags:ha.getAttribute("tags")};ma.push(ia);null!=
-ca&&(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function J(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
+ca&&(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function I(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,V=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
ca[la];if(null!=ia.tags)for(var ma=ia.tags.toLowerCase().split(";"),ra=0;ra<ma.length;ra++)null==da[ma[ra]]&&(da[ma[ra]]=[]),da[ma[ra]].push(ia)}TemplatesDialog.tagsList[c]=da}var pa=ha.toLowerCase().split(" ");da=TemplatesDialog.tagsList[c];if(0<wa&&null==da.__tagsList__){for(Ka in oa)for(ca=oa[Ka],la=0;la<ca.length;la++)for(ia=ca[la],ma=ia.title.split(" "),ma.push(Ka),ra=0;ra<ma.length;ra++){var na=ma[ra].toLowerCase();null==da[na]&&(da[na]=[]);da[na].push(ia)}da.__tagsList__=!0}var Ka=[];ca={};
-for(la=ma=0;la<pa.length;la++)if(0<pa[la].length){na=da[pa[la]];var Ia={};Ka=[];if(null!=na)for(ra=0;ra<na.length;ra++)ia=na[ra],0==ma==(null==ca[ia.url])&&(Ia[ia.url]=!0,Ka.push(ia));ca=Ia;ma++}0==Ka.length?va.innerHTML=mxResources.get("noResultsFor",[ha]):C(Ka,!0)}}function H(ha){if(ba!=ha||N!=ea)B(),Ba.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',xa=null,Z?F(ha):d&&(ha?(Fa.spin(aa),U=!1,W=!0,d(ha,ua,function(){A(mxResources.get("searchFailed"));
-ua([])},N?null:n)):J(N)),ba=ha,ea=N}function S(ha){null!=xa&&clearTimeout(xa);13==ha.keyCode?H(Na.value):xa=setTimeout(function(){H(Na.value)},1E3)}var V='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+for(la=ma=0;la<pa.length;la++)if(0<pa[la].length){na=da[pa[la]];var Ia={};Ka=[];if(null!=na)for(ra=0;ra<na.length;ra++)ia=na[ra],0==ma==(null==ca[ia.url])&&(Ia[ia.url]=!0,Ka.push(ia));ca=Ia;ma++}0==Ka.length?va.innerHTML=mxResources.get("noResultsFor",[ha]):B(Ka,!0)}}function H(ha){if(ba!=ha||O!=ea)A(),Ba.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',xa=null,Z?F(ha):d&&(ha?(Fa.spin(aa),U=!1,V=!0,d(ha,ua,function(){z(mxResources.get("searchFailed"));
+ua([])},O?null:n)):I(O)),ba=ha,ea=O}function R(ha){null!=xa&&clearTimeout(xa);13==ha.keyCode?H(Na.value):xa=setTimeout(function(){H(Na.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",M=document.createElement("div");M.innerHTML=V;M.className=
-"geTemplateDlg";this.container=M;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,U=!1,X=null,u=null,D=null,K=null,T=!1,N=!0,Q=!1,R=[],Y=null,ba,ea,Z=!1,fa=M.querySelector(".geTempDlgShowAllBtn"),aa=M.querySelector(".geTempDlgDiagramsTiles"),va=M.querySelector(".geTempDlgDiagramsListTitle"),ja=M.querySelector(".geTempDlgDiagramsListBtns"),Ba=M.querySelector(".geTempDlgContent"),Da=M.querySelector(".geTempDlgDiagramsList"),qa=M.querySelector(".geTempDlgNewDiagramCat"),
-Ca=M.querySelector(".geTempDlgNewDiagramCatList"),Aa=M.querySelector(".geTempDlgCreateBtn"),Ha=M.querySelector(".geTempDlgOpenBtn"),Na=M.querySelector(".geTempDlgSearchBox"),Ga=M.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(M.querySelector(".geTempDlgBack"),"click",function(){B();Z=!1;M.querySelector(".geTemplatesList").style.display="none";Ba.style.width=
-"100%";qa.style.display="";Da.style.minHeight="calc(100% - 280px)";Na.style.display=d?"":"none";Na.value="";ba=null;J(N)});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){I(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(N=!0,null==ba?J(N):H(ba))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){I(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(N=!1,null==ba?J(N):H(ba))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){I(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,C(R,!1,Q,Y))});mxEvent.addListener(M.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){I(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,C(R,!1,Q,Y))});
-var Ea=!1;mxEvent.addListener(fa,"click",function(){T?(qa.style.height="280px",Ca.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),E(sa)):(qa.style.height="440px",Ca.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),E(sa,!0));T=!T});var La=!1,za=!1,ta={},ka={},oa={},sa=[],ya=1,wa=0;null!=l?l(function(ha,da){oa=ha;wa=da;P()},P):P();mxUtils.get(m,function(ha){if(!za){za=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==
-typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;E(sa)}});var ua=function(ha,da,ca){ja.style.display="";Fa.stop();W=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):C(ha,!1,Q,0==da?null:ca)}};J(N);var xa=null;mxEvent.addListener(Na,
-"keyup",S);mxEvent.addListener(Na,"search",S);mxEvent.addListener(Na,"input",S);mxEvent.addListener(Aa,"click",function(ha){z(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ha){z(!1,!0)});q&&mxEvent.addListener(M.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){z(!0)});mxEvent.addListener(M.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",J=document.createElement("div");J.innerHTML=W;J.className=
+"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,t=null,E=null,M=null,T=!1,O=!0,Q=!1,S=[],Y=null,ba,ea,Z=!1,fa=J.querySelector(".geTempDlgShowAllBtn"),aa=J.querySelector(".geTempDlgDiagramsTiles"),va=J.querySelector(".geTempDlgDiagramsListTitle"),ja=J.querySelector(".geTempDlgDiagramsListBtns"),Ba=J.querySelector(".geTempDlgContent"),Da=J.querySelector(".geTempDlgDiagramsList"),qa=J.querySelector(".geTempDlgNewDiagramCat"),
+Ca=J.querySelector(".geTempDlgNewDiagramCatList"),Aa=J.querySelector(".geTempDlgCreateBtn"),Ha=J.querySelector(".geTempDlgOpenBtn"),Na=J.querySelector(".geTempDlgSearchBox"),Ga=J.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(J.querySelector(".geTempDlgBack"),"click",function(){A();Z=!1;J.querySelector(".geTemplatesList").style.display="none";Ba.style.width=
+"100%";qa.style.display="";Da.style.minHeight="calc(100% - 280px)";Na.style.display=d?"":"none";Na.value="";ba=null;I(O)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){K(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(O=!0,null==ba?I(O):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){K(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(O=!1,null==ba?I(O):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){K(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,B(S,!1,Q,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){K(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,B(S,!1,Q,Y))});
+var Ea=!1;mxEvent.addListener(fa,"click",function(){T?(qa.style.height="280px",Ca.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(sa)):(qa.style.height="440px",Ca.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(sa,!0));T=!T});var La=!1,za=!1,ta={},ka={},oa={},sa=[],ya=1,wa=0;null!=l?l(function(ha,da){oa=ha;wa=da;N()},N):N();mxUtils.get(m,function(ha){if(!za){za=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==
+typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;C(sa)}});var ua=function(ha,da,ca){ja.style.display="";Fa.stop();V=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ha,!1,Q,0==da?null:ca)}};I(O);var xa=null;mxEvent.addListener(Na,
+"keyup",R);mxEvent.addListener(Na,"search",R);mxEvent.addListener(Na,"input",R);mxEvent.addListener(Aa,"click",function(ha){u(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ha){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){u(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
-f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(t){this.style.border="";13==t.keyCode&&O.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
+f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(L){this.style.border="";13==L.keyCode&&P.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
"nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","sysfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-sysfonts");k.appendChild(l);var p=document.createElement("label");p.setAttribute("for","fontdialog-sysfonts");mxUtils.write(p,mxResources.get("sysFonts",null,"System Fonts"));k.appendChild(p);g.appendChild(k);
d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var q=document.createElement("input");"s"==c&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";k=document.createElement("td");k.appendChild(q);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","googlefonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-googlefonts");k.appendChild(x);p=document.createElement("label");p.setAttribute("for","fontdialog-googlefonts");mxUtils.write(p,mxResources.get("googleFonts",
null,"Google Fonts"));k.appendChild(p);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(p=b.menus.createHelpLink("https://fonts.google.com/"),p.getElementsByTagName("img")[0].setAttribute("valign","middle"),k.appendChild(p));g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");
-g.appendChild(k);var y=document.createElement("input");"g"==c&&y.setAttribute("value",e);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";k=document.createElement("td");k.appendChild(y);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
-"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");k.appendChild(A);p=document.createElement("label");p.setAttribute("for","fontdialog-webfonts");mxUtils.write(p,mxResources.get("webfonts",null,"Web Fonts"));k.appendChild(p);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft=
-"15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var B=document.createElement("input");"w"==c&&(Editor.enableWebFonts?B.setAttribute("value",e):q.setAttribute("value",e));B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontName_w";k=document.createElement("td");k.appendChild(B);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";
-k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var I=document.createElement("input");I.setAttribute("value",f||"");I.style.marginLeft="4px";I.style.width="250px";I.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(I);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var t=q;"g"==c?t=y:"w"==c&&Editor.enableWebFonts&&(t=B);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-t.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
-var O=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var t=q.value;var z="s"}else if(x.checked){t=y.value;var L=Editor.GOOGLE_FONTS+encodeURIComponent(t).replace(/%20/g,"+");z="g"}else A.checked&&(t=B.value,L=I.value,z="w");var C=L;var E=z,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==t||0==t.length?(v.querySelector(".dlg_fontName_"+E).style.border="1px solid red",C=!1):"w"!=E||G.test(C)?C=!0:(v.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",C=!1);C&&(m(t,L,z),b.hideDialog())});O.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(B,"keypress",n);mxEvent.addListener(I,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){A.setAttribute("checked","checked");A.checked=
-!0});mxEvent.addListener(I,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});k.appendChild(O);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
+g.appendChild(k);var y=document.createElement("input");"g"==c&&y.setAttribute("value",e);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";k=document.createElement("td");k.appendChild(y);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");k.appendChild(z);p=document.createElement("label");p.setAttribute("for","fontdialog-webfonts");mxUtils.write(p,mxResources.get("webfonts",null,"Web Fonts"));k.appendChild(p);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft=
+"15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):q.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";k=document.createElement("td");k.appendChild(A);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";
+k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("value",f||"");K.style.marginLeft="4px";K.style.width="250px";K.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(K);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var L=q;"g"==c?L=y:"w"==c&&Editor.enableWebFonts&&(L=A);L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+L.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
+var P=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var L=q.value;var u="s"}else if(x.checked){L=y.value;var D=Editor.GOOGLE_FONTS+encodeURIComponent(L).replace(/%20/g,"+");u="g"}else z.checked&&(L=A.value,D=K.value,u="w");var B=D;var C=u,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==L||0==L.length?(v.querySelector(".dlg_fontName_"+C).style.border="1px solid red",B=!1):"w"!=C||G.test(B)?B=!0:(v.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",B=!1);B&&(m(L,D,u),b.hideDialog())});P.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(A,"keypress",n);mxEvent.addListener(K,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(K,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});k.appendChild(P);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
function AspectDialog(b,e,f,c,m){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";
e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||f.appendChild(n);v.setAttribute("disabled","disabled");this.okBtn=v;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -11400,22 +11401,22 @@ l&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);d=document.createEl
d.style.width="120px";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");m.appendChild(d);var q=document.createElement("input");q.setAttribute("type","checkbox");var x=c.isRealtimeEnabled();if(x="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=n;n=function(){prevApply();b.hideDialog();q.checked!=x&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(q.checked,mxUtils.bind(this,
function(y){b.spinner.stop()}),mxUtils.bind(this,function(y){b.spinner.stop();b.showError(mxResources.get("error"),null!=y&&null!=y.error?y.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(q);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));m.appendChild(d);f.appendChild(m)}this.init=null!=this.init?this.init:
function(){};n=mxUtils.button(mxResources.get("apply"),n);n.className="geBtn gePrimaryBtn";m=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);d.appendChild(n);b.editor.cancelFirst||d.appendChild(v);m.appendChild(d);f.appendChild(m);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(E.value)||0;F=0>F?0:100<F?100:F;
-E.value=F;var H=parseInt(P.value)||0;H=0>H?0:100<H?100:H;P.value=H;var S=parseInt(G.value)||0,V=parseInt(J.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,S,V));H=p.getSelectionCell();if(null!=H){S=H.geometry.clone();V=p.view.scale;var M=p.view.translate;S.x=(F.x-3*V)/V-M.x;S.y=(F.y-3*V)/V-M.y;p.model.setGeometry(H,S)}}function g(F){var H=0,S=0,V=q.geometry,M=mxUtils.format((F.geometry.x+3-V.x)/V.width);F=mxUtils.format((F.geometry.y+3-V.y)/V.height);
-0>M?(H=M*V.width,M=0):1<M&&(H=(M-1)*V.width,M=1);0>F?(S=F*V.height,F=0):1<F&&(S=(F-1)*V.height,F=1);return{x:M,y:F,dx:parseInt(H),dy:parseInt(S)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);E.value=100*F.x;P.value=100*F.y;G.value=F.dx;J.value=F.dy;C.style.visibility=""}else C.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
+e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(C.value)||0;F=0>F?0:100<F?100:F;
+C.value=F;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseInt(G.value)||0,W=parseInt(I.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,R,W));H=p.getSelectionCell();if(null!=H){R=H.geometry.clone();W=p.view.scale;var J=p.view.translate;R.x=(F.x-3*W)/W-J.x;R.y=(F.y-3*W)/W-J.y;p.model.setGeometry(H,R)}}function g(F){var H=0,R=0,W=q.geometry,J=mxUtils.format((F.geometry.x+3-W.x)/W.width);F=mxUtils.format((F.geometry.y+3-W.y)/W.height);
+0>J?(H=J*W.width,J=0):1<J&&(H=(J-1)*W.width,J=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:J,y:F,dx:parseInt(H),dy:parseInt(R)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);C.value=100*F.x;N.value=100*F.y;G.value=F.dx;I.value=F.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(F,H){if(null!=H&&H!=q)p.setSelectionCell(H);else{H=
-mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var S=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-S.x,(H.y-3*F)/F-S.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
-x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var A=0;null!=l&&A<l.length;A++){var B=p.getConnectionPoint(y,l[A]);n(B.x-3,B.y-3)}p.fit(8);p.center();A=mxUtils.button("",function(){p.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(A,60);B=mxUtils.button("",function(){p.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,60);var I=mxUtils.button("",function(){p.fit(8);p.center()});I.className="geSprite geSprite-fit";I.setAttribute("title",mxResources.get("fit"));I.style.position=
-"relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.cursor="pointer";I.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(I,60);var O=mxUtils.button("",function(){p.zoomActual();p.center()});O.className="geSprite geSprite-actualsize";O.setAttribute("title",mxResources.get("actualSize"));O.style.position="relative";O.style.outline="none";O.style.border="none";O.style.margin="2px";O.style.cursor="pointer";O.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(O,
-60);var t=mxUtils.button("",v);t.className="geSprite geSprite-delete";t.setAttribute("title",mxResources.get("delete"));t.style.position="relative";t.style.outline="none";t.style.border="none";t.style.margin="2px";t.style.float="right";t.style.cursor="pointer";mxUtils.setOpacity(t,10);l=document.createElement("div");l.appendChild(A);l.appendChild(B);l.appendChild(O);l.appendChild(I);l.appendChild(t);c.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("min",
-"1");z.setAttribute("value","1");z.style.width="45px";z.style.position="relative";z.style.top=mxClient.IS_FF?"0px":"-4px";z.style.margin="0 4px 0 4px";l.appendChild(z);var L=document.createElement("select");L.style.position="relative";L.style.top=mxClient.IS_FF?"0px":"-4px";B=["left","right","top","bottom"];for(A=0;A<B.length;A++)I=B[A],O=document.createElement("option"),mxUtils.write(O,mxResources.get(I)),O.value=I,L.appendChild(O);l.appendChild(L);A=mxUtils.button(mxResources.get("add"),function(){var F=
-parseInt(z.value);F=1>F?1:100<F?100:F;z.value=F;for(var H=L.value,S=q.geometry,V=[],M=0;M<F;M++){switch(H){case "left":var W=S.x;var U=S.y+(M+1)*S.height/(F+1);break;case "right":W=S.x+S.width;U=S.y+(M+1)*S.height/(F+1);break;case "top":W=S.x+(M+1)*S.width/(F+1);U=S.y;break;case "bottom":W=S.x+(M+1)*S.width/(F+1),U=S.y+S.height}V.push(n(W-3,U-3))}p.setSelectionCells(V)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(A);var C=document.createElement("div");
-C.style.margin="4px 0px 8px 0px";C.style.whiteSpace="nowrap";C.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));C.appendChild(l);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","0");E.setAttribute("max","100");E.style.width="45px";E.style.margin="0 4px 0 4px";C.appendChild(E);mxUtils.write(C,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-C.appendChild(G);mxUtils.write(C,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";C.appendChild(l);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";C.appendChild(P);mxUtils.write(C,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";C.appendChild(J);
-mxUtils.write(C,"pt");c.appendChild(C);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(t,60):mxUtils.setOpacity(t,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(E,"change",d);mxEvent.addListener(P,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(J,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var F=
-p.model.cells,H=[],S=[],V;for(V in F){var M=F[V];M.cp&&S.push(g(M))}S.sort(function(W,U){return W.x!=U.x?W.x-U.x:W.y!=U.y?W.y-U.y:W.dx!=U.dx?W.dx-U.dx:W.dy-U.dy});for(F=0;F<S.length;F++)0<F&&S[F].x==S[F-1].x&&S[F].y==S[F-1].y&&S[F].dx==S[F-1].dx&&S[F].dy==S[F-1].dy||H.push("["+S[F].x+","+S[F].y+",0,"+S[F].dx+","+S[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});A.className="geBtn gePrimaryBtn";B=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[e]);f();b.hideDialog()});B.className="geBtn";I=document.createElement("div");I.style.marginTop="10px";I.style.textAlign="right";b.editor.cancelFirst?(I.appendChild(l),I.appendChild(B),I.appendChild(A)):(I.appendChild(B),I.appendChild(A),I.appendChild(l));c.appendChild(I)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var R=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-R.x,(H.y-3*F)/F-R.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
+x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var z=0;null!=l&&z<l.length;z++){var A=p.getConnectionPoint(y,l[z]);n(A.x-3,A.y-3)}p.fit(8);p.center();z=mxUtils.button("",function(){p.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(z,60);A=mxUtils.button("",function(){p.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var K=mxUtils.button("",function(){p.fit(8);p.center()});K.className="geSprite geSprite-fit";K.setAttribute("title",mxResources.get("fit"));K.style.position=
+"relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.cursor="pointer";K.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(K,60);var P=mxUtils.button("",function(){p.zoomActual();p.center()});P.className="geSprite geSprite-actualsize";P.setAttribute("title",mxResources.get("actualSize"));P.style.position="relative";P.style.outline="none";P.style.border="none";P.style.margin="2px";P.style.cursor="pointer";P.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(P,
+60);var L=mxUtils.button("",v);L.className="geSprite geSprite-delete";L.setAttribute("title",mxResources.get("delete"));L.style.position="relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.float="right";L.style.cursor="pointer";mxUtils.setOpacity(L,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(P);l.appendChild(K);l.appendChild(L);c.appendChild(l);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min",
+"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)K=A[z],P=document.createElement("option"),mxUtils.write(P,mxResources.get(K)),P.value=K,D.appendChild(P);l.appendChild(D);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(u.value);F=1>F?1:100<F?100:F;u.value=F;for(var H=D.value,R=q.geometry,W=[],J=0;J<F;J++){switch(H){case "left":var V=R.x;var U=R.y+(J+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(J+1)*R.height/(F+1);break;case "top":V=R.x+(J+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(J+1)*R.width/(F+1),U=R.y+R.height}W.push(n(V-3,U-3))}p.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
+B.style.margin="4px 0px 8px 0px";B.style.whiteSpace="nowrap";B.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));B.appendChild(l);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min","0");C.setAttribute("max","100");C.style.width="45px";C.style.margin="0 4px 0 4px";B.appendChild(C);mxUtils.write(B,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
+B.appendChild(G);mxUtils.write(B,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";B.appendChild(l);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);mxUtils.write(B,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";B.appendChild(I);
+mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(L,60):mxUtils.setOpacity(L,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(C,"change",d);mxEvent.addListener(N,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(I,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+p.model.cells,H=[],R=[],W;for(W in F){var J=F[W];J.cp&&R.push(g(J))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||H.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[e]);f();b.hideDialog()});A.className="geBtn";K=document.createElement("div");K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(l),K.appendChild(A),K.appendChild(z)):(K.appendChild(A),K.appendChild(z),K.appendChild(l));c.appendChild(K)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11441,111 +11442,111 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,D){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
-D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,D){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,E){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,
+E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
-dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(u){return"orthogonalEdgeStyle"==mxUtils.getValue(u.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
+dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
-D){u=D.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,D){u=D.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
-"0")},isVisible:function(u,D){D=D.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&D.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,
+E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast",
+"0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,D){return D.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,D){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,E){return E.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,E){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,D){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;D=D.editorUi.editor.graph;return null!=u&&(D.isSwimlane(u)||0<D.model.getChildCount(u))},isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,D){var K=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;D=D.editorUi.editor.graph;return null!=K&&(D.isContainer(K)&&
-"0"!=u.style.collapsible||!D.isContainer(K)&&"1"==u.style.collapsible)},isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,D){return 1==u.vertices.length&&0==u.edges.length&&!D.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(u,D){D=D.editorUi.editor.graph.model;return 0<u.vertices.length?D.isVertex(D.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,D){u=0<u.vertices.length?
-D.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,D){var K=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,D){return 0<u.vertices.length&&D.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var D=rough.canvas({getContext:function(){return u}});D.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=K.stroke&&this._drawToContext(u,Q,K);break;case "fillPath":this._drawToContext(u,Q,K);break;case "fillSketch":this.fillSketch(u,Q,K)}}};D.fillSketch=function(K,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight;
-0>ea&&(ea=N.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(N.fill||"");u.setStrokeWidth(ea);u.setDashed(!1);this._drawToContext(K,T,N);u.setDashed(ba);u.setStrokeWidth(R);u.setStrokeColor(Q);u.setStrokeAlpha(Y)};D._drawToContext=function(K,T,N){K.begin();for(var Q=0;Q<T.ops.length;Q++){var R=T.ops[Q],Y=R.data;switch(R.op){case "move":K.moveTo(Y[0],Y[1]);break;case "bcurveTo":K.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":K.lineTo(Y[0],Y[1])}}K.end();"fillPath"===
-T.type&&N.filled?K.fill():K.stroke()};return D};(function(){function u(Q,R,Y){this.canvas=Q;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,u.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,R){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ea=0;ea<ba.length;ea++)Y=(Y<<5)-Y+ba.charCodeAt(ea)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=R)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ba.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==R?-1:R;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);Y.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",R);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=Y.fill&&(null!=Q||null!=R&&Y.fill==R)?"solid":ba.fillStyle);Y.fillStyle=R;return Y};u.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=function(Q,R){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,Q,R),this.lastX=Q,this.lastY=R)};u.prototype.moveTo=function(Q,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,R),this.lastX=Q,this.lastY=R,this.firstX=Q,this.firstY=R)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,R,Y,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
-R,Y,ba),this.lastX=Y,this.lastY=ba)};u.prototype.curveTo=function(Q,R,Y,ba,ea,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,R,Y,ba,ea,Z),this.lastX=ea,this.lastY=Z)};u.prototype.arcTo=function(Q,R,Y,ba,ea,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,R,Y,ba,ea,Z,fa);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
-aa[va+5]);this.lastX=Z;this.lastY=fa}};u.prototype.rect=function(Q,R,Y,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,R,Y,ba,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,R,Y,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,R+ba/2,Y,ba,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,R,Y,ba,ea,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(Q+ea,R),this.lineTo(Q+Y-ea,R),this.quadTo(Q+Y,R,Q+Y,R+Z),this.lineTo(Q+Y,R+ba-Z),this.quadTo(Q+Y,R+ba,Q+Y-ea,R+ba),this.lineTo(Q+ea,R+ba),this.quadTo(Q,R+ba,Q,R+ba-Z),this.lineTo(Q,R+Z),this.quadTo(Q,R,Q+ea,R))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in Q)this.nextShape.options[R]=Q[R];Q.stroke!=mxConstants.NONE&&null!=
-Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,R,Y,ba,ea){null!=Q.handJiggle&&Q.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var R=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,E){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=t&&(E.isSwimlane(t)||0<E.model.getChildCount(t))},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,E){var M=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=M&&(E.isContainer(M)&&
+"0"!=t.style.collapsible||!E.isContainer(M)&&"1"==t.style.collapsible)},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length&&!E.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(t,E){E=E.editorUi.editor.graph.model;return 0<t.vertices.length?E.isVertex(E.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,E){t=0<t.vertices.length?
+E.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,E){var M=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,E){return 0<t.vertices.length&&E.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(t){var E=rough.canvas({getContext:function(){return t}});E.draw=function(M){var T=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var Q=T[O];switch(Q.type){case "path":null!=M.stroke&&this._drawToContext(t,Q,M);break;case "fillPath":this._drawToContext(t,Q,M);break;case "fillSketch":this.fillSketch(t,Q,M)}}};E.fillSketch=function(M,T,O){var Q=t.state.strokeColor,S=t.state.strokeWidth,Y=t.state.strokeAlpha,ba=t.state.dashed,ea=O.fillWeight;
+0>ea&&(ea=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(ea);t.setDashed(!1);this._drawToContext(M,T,O);t.setDashed(ba);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(Y)};E._drawToContext=function(M,T,O){M.begin();for(var Q=0;Q<T.ops.length;Q++){var S=T.ops[Q],Y=S.data;switch(S.op){case "move":M.moveTo(Y[0],Y[1]);break;case "bcurveTo":M.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":M.lineTo(Y[0],Y[1])}}M.end();"fillPath"===
+T.type&&O.filled?M.fill():M.stroke()};return E};(function(){function t(Q,S,Y){this.canvas=Q;this.rc=S;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(Q,S){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ea=0;ea<ba.length;ea++)Y=(Y<<5)-Y+ba.charCodeAt(ea)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=S)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ba.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==S?-1:S;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);Y.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",S);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=Y.fill&&(null!=Q||null!=S&&Y.fill==S)?"solid":ba.fillStyle);Y.fillStyle=S;return Y};t.prototype.begin=function(){this.passThrough?
+this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,
+arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};t.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(Q,S,Y,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
+S,Y,ba),this.lastX=Y,this.lastY=ba)};t.prototype.curveTo=function(Q,S,Y,ba,ea,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,Y,ba,ea,Z),this.lastX=ea,this.lastY=Z)};t.prototype.arcTo=function(Q,S,Y,ba,ea,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,Y,ba,ea,Z,fa);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
+aa[va+5]);this.lastX=Z;this.lastY=fa}};t.prototype.rect=function(Q,S,Y,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,Y,ba,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,Y,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,S+ba/2,Y,ba,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,Y,ba,ea,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(Q+ea,S),this.lineTo(Q+Y-ea,S),this.quadTo(Q+Y,S,Q+Y,S+Z),this.lineTo(Q+Y,S+ba-Z),this.quadTo(Q+Y,S+ba,Q+Y-ea,S+ba),this.lineTo(Q+ea,S+ba),this.quadTo(Q,S+ba,Q,S+ba-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+ea,S))};t.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=
+Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new t(Q,Editor.createRoughCanvas(Q),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,Y,ba,ea){null!=Q.handJiggle&&Q.handJiggle.passThrough||M.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==t&&!this.outline){Q.save();
var ba=this.fill,ea=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,fa=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};Y||null==ba||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=fa;this.configurePointerEvents=Z;this.stroke=ea;this.fill=ba;Q.restore();Y&&null!=ba&&(Q.addTolerance=function(){})}T.apply(this,arguments);
-Q.addTolerance=R};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,R,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
-u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,D,K){if(null!=u&&"undefined"!==typeof pako){var T=u.ownerDocument.getElementsByTagName("div"),N=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){N.push(T[Q]);break}0<N.length&&(T=N[0].getAttribute("data-mxgraph"),null!=T?(N=JSON.parse(T),null!=N&&null!=N.xml&&(u=mxUtils.parseXml(N.xml),u=u.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&
-(T=mxUtils.getTextContent(N[0]),T=Graph.decompress(T,null,K),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||D||(N=null,"diagram"==u.nodeName?N=u:"mxfile"==
-u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,K)));null==u||"mxGraphModel"==u.nodeName||D&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,D){var K=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<K.length?(u=Graph.decompress(K,null,D),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),
-T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var D=mxUtils.getTextContent(u),K=null;0<D.length?K=Graph.decompress(D):null!=u.firstChild&&(K=mxUtils.getXml(u.firstChild));return K};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var D=u.indexOf("EmbeddedFile");if(-1<D){var K=u.indexOf("stream",D)+9;if(0<u.substring(D,K).indexOf("application#2Fvnd.jgraph.mxfile"))return D=
-u.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(K,D)),{to:"string"})}return null}K=null;D="";for(var T=0,N=0,Q=[],R=null;N<u.length;){var Y=u.charCodeAt(N);N+=1;10!=Y&&(D+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=u.indexOf("%3C%2Fmxfile%3E)",N)+15;N-=9;if(ba>N){K=u.substring(N,ba);break}}10==Y&&("endobj"==D?R=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(R=[],Q[D.split(" ")[0]]=R):null!=R&&R.push(D),
-D="")}null==K&&(K=Editor.extractGraphModelFromXref(Q));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(u){var D=u.trailer,K=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=u[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(u=u[D[1]],null!=u&&(u=u.join("\n"),K=u.substring(1,u.length-1))))));return K};Editor.extractParserError=function(u,D){var K=
-null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(K=D||mxResources.get("invalidChars"),D=u[0].getElementsByTagName("div"),0<D.length&&(K=mxUtils.getTextContent(D[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(u,D){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=D))};Editor.configure=function(u,D){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(u.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(K,T)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);
-null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=u.zoomFactor&&(K=parseFloat(u.zoomFactor),!isNaN(K)&&1<K?Graph.prototype.zoomFactor=K:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(K=parseInt(u.gridSteps),!isNaN(K)&&0<K?mxGraphView.prototype.gridSteps=K:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=u.pageFormat&&(K=parseInt(u.pageFormat.width),T=parseInt(u.pageFormat.height),!isNaN(K)&&0<K&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,K,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(K=parseInt(u.sidebarTitleSize),!isNaN(K)&&0<K?Sidebar.prototype.sidebarTitleSize=K:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=u.autosaveDelay&&(K=parseInt(u.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!D)for(App.initPluginCallback(),D=0;D<u.plugins.length;D++)mxscript(u.plugins[D]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);
-null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(u));D.parentNode.insertBefore(K,D);u=u.split("url(");for(K=1;K<u.length;K++){var T=u[K].indexOf(")");T=Editor.trimCssUrl(u[K].substring(0,T));var N=
-document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",T);N.setAttribute("as","font");N.setAttribute("crossorigin","");D.parentNode.insertBefore(N,D)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=
-u?u:Editor.GUID_LENGTH;for(var D=[],K=0;K<u;K++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):
-null;if(null!=u){var D=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==u.nodeName){D=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),
-T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");D=u.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(D=u.getAttribute("extFonts"))try{for(D=D.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),K=0;K<D.length;K++)this.graph.addExtFont(D[K].name,D[K].url)}catch(N){console.log("ExtFonts format error: "+
-N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,D){u=null!=u?u:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
-D);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(u){try{var D=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=
-D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var K=mxUtils.parseXml(D).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(u,D,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+Q.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
+t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,E,M){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){O.push(T[Q]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
+(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,M),0<T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||E||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==
+t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,M)));null==t||"mxGraphModel"==t.nodeName||E&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,E){var M=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<M.length?(t=Graph.decompress(M,null,E),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),
+T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(t){var E=mxUtils.getTextContent(t),M=null;0<E.length?M=Graph.decompress(E):null!=t.firstChild&&(M=mxUtils.getXml(t.firstChild));return M};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var E=t.indexOf("EmbeddedFile");if(-1<E){var M=t.indexOf("stream",E)+9;if(0<t.substring(E,M).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
+t.indexOf("endstream",M-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(M,E)),{to:"string"})}return null}M=null;E="";for(var T=0,O=0,Q=[],S=null;O<t.length;){var Y=t.charCodeAt(O);O+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(ba>O){M=t.substring(O,ba);break}}10==Y&&("endobj"==E?S=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(S=[],Q[E.split(" ")[0]]=S):null!=S&&S.push(E),
+E="")}null==M&&(M=Editor.extractGraphModelFromXref(Q));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(t){var E=t.trailer,M=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=t[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(t=t[E[1]],null!=t&&(t=t.join("\n"),M=t.substring(1,t.length-1))))));return M};Editor.extractParserError=function(t,E){var M=
+null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(M=E||mxResources.get("invalidChars"),E=t[0].getElementsByTagName("div"),0<E.length&&(M=mxUtils.getTextContent(E[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(t,E){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=E))};Editor.configure=function(t,E){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(M,T)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
+null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(M=parseFloat(t.zoomFactor),!isNaN(M)&&1<M?Graph.prototype.zoomFactor=M:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(M=parseInt(t.gridSteps),!isNaN(M)&&0<M?mxGraphView.prototype.gridSteps=M:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=t.pageFormat&&(M=parseInt(t.pageFormat.width),T=parseInt(t.pageFormat.height),!isNaN(M)&&0<M&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,M,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(M=parseInt(t.sidebarTitleSize),!isNaN(M)&&0<M?Sidebar.prototype.sidebarTitleSize=M:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=t.autosaveDelay&&(M=parseInt(t.autosaveDelay),!isNaN(M)&&0<M?DrawioFile.prototype.autosaveDelay=M:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!E)for(App.initPluginCallback(),E=0;E<t.plugins.length;E++)mxscript(t.plugins[E]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
+null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t));E.parentNode.insertBefore(M,E);t=t.split("url(");for(M=1;M<t.length;M++){var T=t[M].indexOf(")");T=Editor.trimCssUrl(t[M].substring(0,T));var O=
+document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);O.setAttribute("as","font");O.setAttribute("crossorigin","");E.parentNode.insertBefore(O,E)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
+t?t:Editor.GUID_LENGTH;for(var E=[],M=0;M<t;M++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):
+null;if(null!=t){var E=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==t.nodeName){E=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=E)E!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=M&&(T=new mxCodec(M.ownerDocument),
+T.decode(M,this.graph.getStylesheet())));else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=M){var T=new mxCodec(M.ownerDocument);T.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");E=t.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(E=t.getAttribute("extFonts"))try{for(E=E.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<E.length;M++)this.graph.addExtFont(E[M].name,E[M].url)}catch(O){console.log("ExtFonts format error: "+
+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,E){t=null!=t?t:!0;var M=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+E);null!=T&&M.setAttribute("backgroundImage",JSON.stringify(T));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",T.join("|")));return M};Editor.prototype.isDataSvg=function(t){try{var E=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=
+E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var M=mxUtils.parseXml(E).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,E,M){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
-!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(u,D){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
-[];Editor.doMathJaxRender=function(R){window.setTimeout(function(){"hidden"!=R.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,R])},0)};var K=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";D=null!=D?D:{"HTML-CSS":{availableFonts:[K],imageFont:null},SVG:{font:K,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(D);
-MathJax.Hub.Register.StartupHook("Begin",function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])})}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,
-Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};K=document.getElementsByTagName("script");if(null!=K&&0<K.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",u);K[0].parentNode.appendChild(N)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(R){}}};
-Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var D=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,T,N,Q){void 0!==T?D.push(T.replace(/\\'/g,"'")):void 0!==N?D.push(N.replace(/\\"/g,
-'"')):void 0!==Q&&D.push(Q);return""});/,\s*$/.test(u)&&D.push("");return D};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===
-u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var D=u.convert,K=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,
-arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,D){try{var K=!0,T=window.setTimeout(mxUtils.bind(this,function(){K=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);K&&D(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
-K&&D(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);D(Q.toDataURL())}catch(Y){D(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);K&&D(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,D,K,
-T){null==T&&(T=this.createImageUrlConverter());var N=0,Q=K||{};K=mxUtils.bind(this,function(R,Y){R=u.getElementsByTagName(R);for(var ba=0;ba<R.length;ba++)mxUtils.bind(this,function(ea){try{if(null!=ea){var Z=T.convert(ea.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=Q[Z];null==fa?(N++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,ea.setAttribute(Y,aa));N--;0==N&&D(u)})):ea.setAttribute(Y,fa)}else null!=Z&&ea.setAttribute(Y,Z)}}catch(aa){}})(R[ba])});K("image","xlink:href");
-K("img","src");0==N&&D(u)};Editor.base64Encode=function(u){for(var D="",K=0,T=u.length,N,Q,R;K<T;){N=u.charCodeAt(K++)&255;if(K==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);D+="==";break}Q=u.charCodeAt(K++);if(K==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);D+="=";break}R=u.charCodeAt(K++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(R&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return D};
-Editor.prototype.loadUrl=function(u,D,K,T,N,Q,R,Y){try{var ba=!R&&(T||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));N=null!=N?N:!0;var ea=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=D){var fa=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
-fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}D(fa)}}else null!=K&&(0==Z.getStatus()?K({message:mxResources.get("accessDenied")},Z):K({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=K&&K({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){N&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=K&&K(Z)}};
-Editor.prototype.absoluteCssFonts=function(u){var D=null;if(null!=u){var K=u.split("url(");if(0<K.length){D=[K[0]];u=window.location.pathname;var T=null!=u?u.lastIndexOf("/"):-1;0<=T&&(u=u.substring(0,T+1));T=document.getElementsByTagName("base");var N=null;null!=T&&0<T.length&&(N=T[0].getAttribute("href"));for(var Q=1;Q<K.length;Q++)if(T=K[Q].indexOf(")"),0<T){var R=Editor.trimCssUrl(K[Q].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=N?N+R:window.location.protocol+"//"+window.location.hostname+
-("/"==R.charAt(0)?"":u)+R);D.push('url("'+R+'"'+K[Q].substring(T))}else D.push(K[Q])}else D=[u]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(u,D,K){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));K(u,D)};Editor.prototype.embedCssFonts=function(u,D){var K=u.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==T){for(var ba=[K[0]],ea=1;ea<K.length;ea++){var Z=K[ea].indexOf(")");
-ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(K[ea].substring(0,Z))]);ba.push('"'+K[ea].substring(Z))}D(ba.join(""))}});if(0<K.length){for(u=1;u<K.length;u++){var Q=K[u].indexOf(")"),R=null,Y=K[u].indexOf("format(",Q);0<Y&&(R=Editor.trimCssUrl(K[u].substring(Y+7,K[u].indexOf(")",Y))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;T++;var ea="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(ba))ea="image/svg+xml";else if("otf"==R||"embedded-opentype"==
-R||/(\.otf)($|\?)/i.test(ba))ea="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(ba))ea="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(ba))ea="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(ba))ea="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(ba))ea="application/font-sfnt";this.mapFontUrl(ea,ba,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ba]=aa;T--;N()}),mxUtils.bind(this,
-function(aa){T--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[u].substring(0,Q)),R)}N()}else D(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(u[D]=Graph.fontMapping[D]);return u};Editor.prototype.embedExtFonts=
-function(u){var D=this.graph.getCustomFonts();if(0<D.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),u)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(R,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;K.push(ba+"\n");T--;N()}),mxUtils.bind(this,function(ba){T--;K.push("@import url("+
-Y+");\n");N()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(D[Q].name,D[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var D=document.getElementsByTagName("style"),K=0;K<D.length;K++){var T=mxUtils.getTextContent(D[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(D[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,D){D=null!=
-D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var K=u.getElementsByTagName("defs"),T=u.ownerDocument;0==K.length?(K=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(K,u.firstChild):u.appendChild(K)):K=K[0];u=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,D);K.appendChild(u)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,D,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/u,T/D))};Editor.prototype.exportToCanvas=function(u,D,K,T,N,Q,R,Y,ba,ea,Z,fa,aa,va,ja,Ba,Da,qa){try{Q=null!=Q?Q:!0;R=null!=R?R:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(fa.getSvg(null,null,aa,va,null,R,null,null,null,ea,null,Ba,Da,qa),mxUtils.bind(this,function(Aa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ha,0,0);u(Fa,Aa)},0):(za.drawImage(Ha,0,0),u(Fa,Aa))},Fa=document.createElement("canvas"),Ea=parseInt(Aa.getAttribute("width")),La=parseInt(Aa.getAttribute("height"));Y=null!=Y?Y:1;null!=D&&(Y=Q?Math.min(1,Math.min(3*D/(4*La),D/Ea)):D/Ea);Y=this.getMaxCanvasScale(Ea,
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(t,E){if("undefined"===typeof window.MathJax){t=(null!=t?t:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
+[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var M=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"HTML-CSS":{availableFonts:[M],imageFont:null},SVG:{font:M,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(E);
+MathJax.Hub.Register.StartupHook("Begin",function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])})}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,
+Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};M=document.getElementsByTagName("script");if(null!=M&&0<M.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",t);M[0].parentNode.appendChild(O)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(S){}}};
+Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;var E=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(M,T,O,Q){void 0!==T?E.push(T.replace(/\\'/g,"'")):void 0!==O?E.push(O.replace(/\\"/g,
+'"')):void 0!==Q&&E.push(Q);return""});/,\s*$/.test(t)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===
+t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var E=t.convert,M=this;t.convert=function(T){if(null!=T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,t.baseUrl.length)==t.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this,
+arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,E){try{var M=!0,T=window.setTimeout(mxUtils.bind(this,function(){M=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(T);M&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
+M&&E(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(M)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=O.height;Q.width=O.width;S.drawImage(O,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);M&&E(Editor.svgBrokenImage.src)};O.src=t}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,E,M,
+T){null==T&&(T=this.createImageUrlConverter());var O=0,Q=M||{};M=mxUtils.bind(this,function(S,Y){S=t.getElementsByTagName(S);for(var ba=0;ba<S.length;ba++)mxUtils.bind(this,function(ea){try{if(null!=ea){var Z=T.convert(ea.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=Q[Z];null==fa?(O++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,ea.setAttribute(Y,aa));O--;0==O&&E(t)})):ea.setAttribute(Y,fa)}else null!=Z&&ea.setAttribute(Y,Z)}}catch(aa){}})(S[ba])});M("image","xlink:href");
+M("img","src");0==O&&E(t)};Editor.base64Encode=function(t){for(var E="",M=0,T=t.length,O,Q,S;M<T;){O=t.charCodeAt(M++)&255;if(M==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);E+="==";break}Q=t.charCodeAt(M++);if(M==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);E+="=";break}S=t.charCodeAt(M++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return E};
+Editor.prototype.loadUrl=function(t,E,M,T,O,Q,S,Y){try{var ba=!S&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var ea=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=E){var fa=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}E(fa)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):M({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=M&&M(Z)}};
+Editor.prototype.absoluteCssFonts=function(t){var E=null;if(null!=t){var M=t.split("url(");if(0<M.length){E=[M[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var Q=1;Q<M.length;Q++)if(T=M[Q].indexOf(")"),0<T){var S=Editor.trimCssUrl(M[Q].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+
+("/"==S.charAt(0)?"":t)+S);E.push('url("'+S+'"'+M[Q].substring(T))}else E.push(M[Q])}else E=[t]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(t,E,M){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));M(t,E)};Editor.prototype.embedCssFonts=function(t,E){var M=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var ba=[M[0]],ea=1;ea<M.length;ea++){var Z=M[ea].indexOf(")");
+ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(M[ea].substring(0,Z))]);ba.push('"'+M[ea].substring(Z))}E(ba.join(""))}});if(0<M.length){for(t=1;t<M.length;t++){var Q=M[t].indexOf(")"),S=null,Y=M[t].indexOf("format(",Q);0<Y&&(S=Editor.trimCssUrl(M[t].substring(Y+7,M[t].indexOf(")",Y))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;T++;var ea="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(ba))ea="image/svg+xml";else if("otf"==S||"embedded-opentype"==
+S||/(\.otf)($|\?)/i.test(ba))ea="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(ba))ea="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(ba))ea="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(ba))ea="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(ba))ea="application/font-sfnt";this.mapFontUrl(ea,ba,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ba]=aa;T--;O()}),mxUtils.bind(this,
+function(aa){T--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[t].substring(0,Q)),S)}O()}else E(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(t[E]=Graph.fontMapping[E]);return t};Editor.prototype.embedExtFonts=
+function(t){var E=this.graph.getCustomFonts();if(0<E.length){var M=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(M.join(""),t)}),Q=0;Q<E.length;Q++)mxUtils.bind(this,function(S,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;M.push(ba+"\n");T--;O()}),mxUtils.bind(this,function(ba){T--;M.push("@import url("+
+Y+");\n");O()}))):M.push(this.cachedGoogleFonts[Y]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var E=document.getElementsByTagName("style"),M=0;M<E.length;M++){var T=mxUtils.getTextContent(E[M]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(E[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,E){E=null!=
+E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var M=t.getElementsByTagName("defs"),T=t.ownerDocument;0==M.length?(M=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(M,t.firstChild):t.appendChild(M)):M=M[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,E);M.appendChild(t)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,E,M){var T=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(T/t,T/E))};Editor.prototype.exportToCanvas=function(t,E,M,T,O,Q,S,Y,ba,ea,Z,fa,aa,va,ja,Ba,Da,qa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(fa.getSvg(null,null,aa,va,null,S,null,null,null,ea,null,Ba,Da,qa),mxUtils.bind(this,function(Aa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ha,0,0);t(Fa,Aa)},0):(za.drawImage(Ha,0,0),t(Fa,Aa))},Fa=document.createElement("canvas"),Ea=parseInt(Aa.getAttribute("width")),La=parseInt(Aa.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=Q?Math.min(1,Math.min(3*E/(4*La),E/Ea)):E/Ea);Y=this.getMaxCanvasScale(Ea,
La,Y);Ea=Math.ceil(Y*Ea);La=Math.ceil(Y*La);Fa.setAttribute("width",Ea);Fa.setAttribute("height",La);var za=Fa.getContext("2d");null!=Ca&&(za.beginPath(),za.rect(0,0,Ea,La),za.fillStyle=Ca,za.fill());1!=Y&&za.scale(Y,Y);if(ja){var ta=fa.view,ka=ta.scale;ta.scale=1;var oa=btoa(unescape(encodeURIComponent(ta.createSvgGrid(ta.gridColor))));ta.scale=ka;oa="data:image/svg+xml;base64,"+oa;var sa=fa.gridSize*ta.gridSteps*Y,ya=fa.getGraphBounds(),wa=ta.translate.x*ka,ua=ta.translate.y*ka,xa=wa+(ya.x-wa)/
-ka-aa,ha=ua+(ya.y-ua)/ka-aa,da=new Image;da.onload=function(){try{for(var ca=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),la=-Math.round(sa-mxUtils.mod((ua-ha)*Y,sa));ca<Ea;ca+=sa)for(var ia=la;ia<La;ia+=sa)za.drawImage(da,ca/Y,ia/Y);Ga()}catch(ma){null!=N&&N(ma)}};da.onerror=function(ca){null!=N&&N(ca)};da.src=oa}else Ga()}catch(ca){null!=N&&N(ca)}});Ha.onerror=function(Ga){null!=N&&N(Ga)};ea&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Na=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Ga){null!=N&&N(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Na)}catch(Fa){null!=N&&N(Fa)}}))}catch(Ga){null!=N&&N(Ga)}}),K,Z)}catch(Aa){null!=N&&N(Aa)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(u,D,K,T){for(var N=
-0;N<T;N++)u=Editor.crcTable[(u^D.charCodeAt(K+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var D=-1,K=0;K<u.length;K++)D=D>>>8^Editor.crcTable[(D^u.charCodeAt(K))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(u,D,K,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+
-1);u=window.atob?atob(u):Base64.decode(u,!0);var ba=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(Q(u,4),"IHDR"!=Q(u,4))null!=N&&N();else{Q(u,17);N=u.substring(0,ba);do{var ea=R(u);if("IDAT"==Q(u,4)){N=u.substring(0,ba-8);"pHYs"==D&&"dpi"==K?(K=Math.round(T/.0254),K=Y(K)+Y(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);T=Editor.updateCRC(T,K,0,K.length);N+=Y(K.length)+
-D+K+Y(T^4294967295);N+=u.substring(ba-8,u.length);break}N+=u.substring(ba-8,ba-4+ea);Q(u,ea);Q(u,4)}while(ea);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,D){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,D){var K=null;null!=u.editor.graph.getModel().getParent(D)?K=D.getId():null!=u.currentPage&&(K=u.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
-Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=p.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,K=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(N){var Q=new ChangePageSetup(D);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;K.model.execute(Q)},{install:function(N){this.listener=function(){N(K.shadowVisible)};D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||
-(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));u.appendChild(T)}return u};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=q.apply(this,arguments);var D=this.editorUi,K=D.editor.graph;if(K.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var N=this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(R){D.editor.setAutosave(R);D.editor.autosave&&
-T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});u.appendChild(N)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(R){D.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=
-function(){R(K.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});N.style.paddingTop="5px";u.appendChild(N);var Q=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";N.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+ka-aa,ha=ua+(ya.y-ua)/ka-aa,da=new Image;da.onload=function(){try{for(var ca=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),la=-Math.round(sa-mxUtils.mod((ua-ha)*Y,sa));ca<Ea;ca+=sa)for(var ia=la;ia<La;ia+=sa)za.drawImage(da,ca/Y,ia/Y);Ga()}catch(ma){null!=O&&O(ma)}};da.onerror=function(ca){null!=O&&O(ca)};da.src=oa}else Ga()}catch(ca){null!=O&&O(ca)}});Ha.onerror=function(Ga){null!=O&&O(Ga)};ea&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Na=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Ga){null!=O&&O(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Na)}catch(Fa){null!=O&&O(Fa)}}))}catch(Ga){null!=O&&O(Ga)}}),M,Z)}catch(Aa){null!=O&&O(Aa)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,E,M,T){for(var O=
+0;O<T;O++)t=Editor.crcTable[(t^E.charCodeAt(M+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var E=-1,M=0;M<t.length;M++)E=E>>>8^Editor.crcTable[(E^t.charCodeAt(M))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(t,E,M,T,O){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+
+1);t=window.atob?atob(t):Base64.decode(t,!0);var ba=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(t,4),"IHDR"!=Q(t,4))null!=O&&O();else{Q(t,17);O=t.substring(0,ba);do{var ea=S(t);if("IDAT"==Q(t,4)){O=t.substring(0,ba-8);"pHYs"==E&&"dpi"==M?(M=Math.round(T/.0254),M=Y(M)+Y(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,E,0,4);T=Editor.updateCRC(T,M,0,M.length);O+=Y(M.length)+
+E+M+Y(T^4294967295);O+=t.substring(ba-8,t.length);break}O+=t.substring(ba-8,ba-4+ea);Q(t,ea);Q(t,4)}while(ea);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,E){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,E){var M=null;null!=t.editor.graph.getModel().getParent(E)?M=E.getId():null!=t.currentPage&&(M=t.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
+Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(t){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=p.apply(this,arguments);
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,M=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=O;M.model.execute(Q)},{install:function(O){this.listener=function(){O(M.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
+(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var E=this.editorUi,M=E.editor.graph;if(M.isEnabled()){var T=E.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(S){E.editor.setAutosave(S);E.editor.autosave&&
+T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return M.mathEnabled},function(S){E.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(M.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var Q=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";O.appendChild(Q)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
@@ -11568,93 +11569,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(u,D,K){if(null!=D){var T=function(Q){if(null!=Q)if(K)for(var R=0;R<Q.length;R++)D[Q[R].name]=Q[R];else for(var Y in D){var ba=!1;for(R=0;R<Q.length;R++)if(Q[R].name==Y&&Q[R].type==D[Y].type){ba=!0;break}ba||delete D[Y]}},N=this.editorUi.editor.graph.view.getState(u);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),T(N.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
-{},K=u.vertices,T=u.edges,N=0;N<K.length;N++)this.findCommonProperties(K[N],D,0==N);for(N=0;N<T.length;N++)this.findCommonProperties(T[N],D,0==K.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,u))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(u,D,K){function T(za,ta,ka,oa){fa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ua=ka.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==za;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;ka.index<wa.length?null!=oa?wa.splice(oa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(fa.setCellStyles(ka.countProperty,wa.length,
+function(t,E,M){if(null!=E){var T=function(Q){if(null!=Q)if(M)for(var S=0;S<Q.length;S++)E[Q[S].name]=Q[S];else for(var Y in E){var ba=!1;for(S=0;S<Q.length;S++)if(Q[S].name==Y&&Q[S].type==E[Y].type){ba=!0;break}ba||delete E[Y]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},M=t.vertices,T=t.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],E,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],E,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(t,E,M){function T(za,ta,ka,oa){fa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ua=ka.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==za;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;ka.index<wa.length?null!=oa?wa.splice(oa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(fa.setCellStyles(ka.countProperty,wa.length,
fa.getSelectionCells()),sa.push(ka.countProperty),ya.push(wa.length))}fa.setCellStyles(za,ta,fa.getSelectionCells());sa.push(za);ya.push(ta);if(null!=ka.dependentProps)for(za=0;za<ka.dependentProps.length;za++){var xa=ka.dependentPropsDefVal[za],ha=ka.dependentPropsVals[za];if(ha.length>ta)ha=ha.slice(0,ta);else for(var da=ha.length;da<ta;da++)ha.push(xa);ha=ha.join(",");fa.setCellStyles(ka.dependentProps[za],ha,fa.getSelectionCells());sa.push(ka.dependentProps[za]);ya.push(ha)}if("function"==typeof ka.onChange)ka.onChange(fa,
-ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(za,ta,ka){var oa=mxUtils.getOffset(u,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(za,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height=
-"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function R(za,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
+ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function O(za,ta,ka){var oa=mxUtils.getOffset(t,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(za,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height=
+"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function S(za,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
aa.push({name:za,values:ta,type:ka,defVal:oa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ua){for(var xa=ya,ha=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==za)xa=xa.nextSibling,ha++;else break;var da={type:ka,parentRow:ya,index:ha,isDeletable:!0,defVal:oa,countProperty:sa};ha=ea(za,"",da,0==ha%2,wa);T(za,oa,da);xa.parentNode.insertBefore(ha,xa.nextSibling);mxEvent.consume(ua)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,oa,sa,ya,wa){if(0<sa){var ua=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ua[xa]=null!=ta[xa]?ta[xa]:null!=oa?oa:"";aa.push({name:za,values:ua,type:ka,defVal:oa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(za,ta,ka){var oa=document.createElement("input");oa.type="checkbox";oa.checked="1"==ta;mxEvent.addListener(oa,"change",function(){T(za,oa.checked?"1":"0",ka)});return oa}function ea(za,
ta,ka,oa,sa){var ya=ka.dispName,wa=ka.type,ua=document.createElement("tr");ua.className="gePropRow"+(sa?"Dark":"")+(oa?"Alt":"")+" gePropNonHeaderRow";ua.setAttribute("data-pName",za);ua.setAttribute("data-pValue",ta);oa=!1;null!=ka.index&&(ua.setAttribute("data-index",ka.index),ya=(null!=ya?ya:"")+"["+ka.index+"]",oa=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(xa,ya);xa.setAttribute("title",ya);oa&&(xa.style.textAlign="right");
-ua.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(Q(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(ba(za,ta,ka));else if("enum"==wa){var ha=ka.enumList;for(sa=0;sa<ha.length;sa++)if(ya=ha[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");N(xa,da);for(var ca=0;ca<ha.length;ca++){var la=ha[ca],ia=
-document.createElement("option");ia.value=mxUtils.htmlEntities(la.val);mxUtils.write(ia,mxResources.get(la.dispName,null,la.dispName));da.appendChild(ia)}da.value=ta;u.appendChild(da);mxEvent.addListener(da,"change",function(){var ma=mxUtils.htmlEntities(da.value);T(za,ma,ka)});da.focus();mxEvent.addListener(da,"blur",function(){u.removeChild(da)})}))}else"dynamicArr"==wa?xa.appendChild(R(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ua,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
+ua.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(Q(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(ba(za,ta,ka));else if("enum"==wa){var ha=ka.enumList;for(sa=0;sa<ha.length;sa++)if(ya=ha[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(xa,da);for(var ca=0;ca<ha.length;ca++){var la=ha[ca],ia=
+document.createElement("option");ia.value=mxUtils.htmlEntities(la.val);mxUtils.write(ia,mxResources.get(la.dispName,null,la.dispName));da.appendChild(ia)}da.value=ta;t.appendChild(da);mxEvent.addListener(da,"change",function(){var ma=mxUtils.htmlEntities(da.value);T(za,ma,ka)});da.focus();mxEvent.addListener(da,"blur",function(){t.removeChild(da)})}))}else"dynamicArr"==wa?xa.appendChild(S(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ua,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
ka.size,ua,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ta,sa.style.width="96px",sa.style.borderWidth="0px",xa.appendChild(sa)):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ta)),mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){function da(){var la=ca.value;la=0==la.length&&"string"!=wa?0:la;ka.allowAuto&&(null!=la.trim&&"auto"==la.trim().toLowerCase()?(la="auto",wa="string"):(la=parseFloat(la),la=isNaN(la)?0:la));null!=ka.min&&la<
-ka.min?la=ka.min:null!=ka.max&&la>ka.max&&(la=ka.max);la=encodeURIComponent(("int"==wa?parseInt(la):la)+"");T(za,la,ka)}var ca=document.createElement("input");N(xa,ca,!0);ca.value=decodeURIComponent(ta);ca.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ca.type="number",ca.step="int"==wa?"1":"any",null!=ka.min&&(ca.min=parseFloat(ka.min)),null!=ka.max&&(ca.max=parseFloat(ka.max)));u.appendChild(ca);mxEvent.addListener(ca,"keypress",function(la){13==la.keyCode&&da()});ca.focus();mxEvent.addListener(ca,
-"blur",function(){da()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(da){T(za,"",ka,ka.index);mxEvent.consume(da)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ua.appendChild(xa);return ua}var Z=this,fa=this.editorUi.editor.graph,aa=[];u.style.position="relative";u.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var ja=
-document.createElement("tr");ja.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ba.appendChild(Da);mxUtils.write(Ba,mxResources.get("property"));ja.style.cursor="pointer";var qa=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=u.childNodes.length-
-1;0<=ka;ka--)try{var oa=u.childNodes[ka],sa=oa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||u.removeChild(oa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(ja,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;qa()});ja.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");ja.appendChild(Ba);va.appendChild(ja);var Ca=
-!1,Aa=!1;ja=null;1==K.vertices.length&&0==K.edges.length?ja=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(ja=K.edges[0].id);null!=ja&&va.appendChild(ea("id",mxUtils.htmlEntities(ja),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in D)if(ja=D[Ha],"function"!=typeof ja.isVisible||ja.isVisible(K,this)){var Na=null!=K.style[Ha]?mxUtils.htmlEntities(K.style[Ha]+""):null!=ja.getDefaultValue?ja.getDefaultValue(K,this):ja.defVal;if("separator"==ja.type)Aa=!Aa;else{if("staticArr"==ja.type)ja.size=
-parseInt(K.style[ja.sizeProperty]||D[ja.sizeProperty].defVal)||0;else if(null!=ja.dependentProps){var Ga=ja.dependentProps,Fa=[],Ea=[];for(Ba=0;Ba<Ga.length;Ba++){var La=K.style[Ga[Ba]];Ea.push(D[Ga[Ba]].subDefVal);Fa.push(null!=La?La.split(","):[])}ja.dependentPropsDefVal=Ea;ja.dependentPropsVals=Fa}va.appendChild(ea(Ha,Na,ja,Ca,Aa));Ca=!Ca}}for(Ba=0;Ba<aa.length;Ba++)for(ja=aa[Ba],D=ja.parentRow,K=0;K<ja.values.length;K++)Ha=ea(ja.name,ja.values[K],{type:ja.type,parentRow:ja.parentRow,isDeletable:ja.isDeletable,
-index:K,defVal:ja.defVal,countProperty:ja.countProperty,size:ja.size},0==K%2,ja.flipBkg),D.parentNode.insertBefore(Ha,D.nextSibling),D=Ha;u.appendChild(va);qa();return u};StyleFormatPanel.prototype.addStyles=function(u){function D(ja){mxEvent.addListener(ja,"mouseenter",function(){ja.style.opacity="1"});mxEvent.addListener(ja,"mouseleave",function(){ja.style.opacity="0.5"})}var K=this.editorUi,T=K.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";
-N.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(N);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var Y=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ea=
-document.createElement("div");ea.style.display="inline-block";ea.style.width="6px";ea.style.height="6px";ea.style.marginLeft="4px";ea.style.marginRight="3px";ea.style.borderRadius="3px";ea.style.cursor="pointer";ea.style.background="transparent";ea.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ja){mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(ja)}))})(ba);Y.push(ea);R.appendChild(ea)}var Z=mxUtils.bind(this,function(ja){null!=Y[ja]&&(null!=this.format.currentScheme&&
-null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ja,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(ja){var Ba=mxUtils.bind(this,function(qa){var Ca=mxUtils.button("",mxUtils.bind(this,function(Na){T.getModel().beginUpdate();try{for(var Ga=K.getSelectionState().cells,Fa=0;Fa<Ga.length;Fa++){for(var Ea=T.getModel().getStyle(Ga[Fa]),
+ka.min?la=ka.min:null!=ka.max&&la>ka.max&&(la=ka.max);la=encodeURIComponent(("int"==wa?parseInt(la):la)+"");T(za,la,ka)}var ca=document.createElement("input");O(xa,ca,!0);ca.value=decodeURIComponent(ta);ca.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ca.type="number",ca.step="int"==wa?"1":"any",null!=ka.min&&(ca.min=parseFloat(ka.min)),null!=ka.max&&(ca.max=parseFloat(ka.max)));t.appendChild(ca);mxEvent.addListener(ca,"keypress",function(la){13==la.keyCode&&da()});ca.focus();mxEvent.addListener(ca,
+"blur",function(){da()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(da){T(za,"",ka,ka.index);mxEvent.consume(da)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ua.appendChild(xa);return ua}var Z=this,fa=this.editorUi.editor.graph,aa=[];t.style.position="relative";t.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var ja=
+document.createElement("tr");ja.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ba.appendChild(Da);mxUtils.write(Ba,mxResources.get("property"));ja.style.cursor="pointer";var qa=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=t.childNodes.length-
+1;0<=ka;ka--)try{var oa=t.childNodes[ka],sa=oa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||t.removeChild(oa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(ja,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;qa()});ja.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");ja.appendChild(Ba);va.appendChild(ja);var Ca=
+!1,Aa=!1;ja=null;1==M.vertices.length&&0==M.edges.length?ja=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ja=M.edges[0].id);null!=ja&&va.appendChild(ea("id",mxUtils.htmlEntities(ja),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in E)if(ja=E[Ha],"function"!=typeof ja.isVisible||ja.isVisible(M,this)){var Na=null!=M.style[Ha]?mxUtils.htmlEntities(M.style[Ha]+""):null!=ja.getDefaultValue?ja.getDefaultValue(M,this):ja.defVal;if("separator"==ja.type)Aa=!Aa;else{if("staticArr"==ja.type)ja.size=
+parseInt(M.style[ja.sizeProperty]||E[ja.sizeProperty].defVal)||0;else if(null!=ja.dependentProps){var Ga=ja.dependentProps,Fa=[],Ea=[];for(Ba=0;Ba<Ga.length;Ba++){var La=M.style[Ga[Ba]];Ea.push(E[Ga[Ba]].subDefVal);Fa.push(null!=La?La.split(","):[])}ja.dependentPropsDefVal=Ea;ja.dependentPropsVals=Fa}va.appendChild(ea(Ha,Na,ja,Ca,Aa));Ca=!Ca}}for(Ba=0;Ba<aa.length;Ba++)for(ja=aa[Ba],E=ja.parentRow,M=0;M<ja.values.length;M++)Ha=ea(ja.name,ja.values[M],{type:ja.type,parentRow:ja.parentRow,isDeletable:ja.isDeletable,
+index:M,defVal:ja.defVal,countProperty:ja.countProperty,size:ja.size},0==M%2,ja.flipBkg),E.parentNode.insertBefore(Ha,E.nextSibling),E=Ha;t.appendChild(va);qa();return t};StyleFormatPanel.prototype.addStyles=function(t){function E(ja){mxEvent.addListener(ja,"mouseenter",function(){ja.style.opacity="1"});mxEvent.addListener(ja,"mouseleave",function(){ja.style.opacity="0.5"})}var M=this.editorUi,T=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
+O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var Y=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ea=
+document.createElement("div");ea.style.display="inline-block";ea.style.width="6px";ea.style.height="6px";ea.style.marginLeft="4px";ea.style.marginRight="3px";ea.style.borderRadius="3px";ea.style.cursor="pointer";ea.style.background="transparent";ea.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ja){mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(ja)}))})(ba);Y.push(ea);S.appendChild(ea)}var Z=mxUtils.bind(this,function(ja){null!=Y[ja]&&(null!=this.format.currentScheme&&
+null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ja,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(ja){var Ba=mxUtils.bind(this,function(qa){var Ca=mxUtils.button("",mxUtils.bind(this,function(Na){T.getModel().beginUpdate();try{for(var Ga=M.getSelectionState().cells,Fa=0;Fa<Ga.length;Fa++){for(var Ea=T.getModel().getStyle(Ga[Fa]),
La=0;La<Q.length;La++)Ea=mxUtils.removeStylename(Ea,Q[La]);var za=T.getModel().isVertex(Ga[Fa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=qa?(mxEvent.isShiftDown(Na)||(Ea=""==qa.fill?mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,qa.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,qa.gradient||mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||
mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!T.getModel().isVertex(Ga[Fa])||(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,qa.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(Ea=""==qa.stroke?mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,qa.stroke||mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,null)))):(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
"#ffffff")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ga[Fa])&&(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ga[Fa],Ea)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";
Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=qa){var Aa="1"==urlParams.sketch?"2px solid":"1px solid";null!=qa.gradient?mxClient.IS_IE&&10>document.documentMode?Ca.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+qa.fill+"', EndColorStr='"+qa.gradient+"', GradientType=0)":Ca.style.backgroundImage="linear-gradient("+qa.fill+" 0px,"+qa.gradient+" 100%)":qa.fill==mxConstants.NONE?Ca.style.background="url('"+Dialog.prototype.noColorImage+
"')":Ca.style.backgroundColor=""==qa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):qa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ca.style.border=qa.stroke==mxConstants.NONE?Aa+" transparent":""==qa.stroke?Aa+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Aa+" "+(qa.stroke||mxUtils.getValue(T.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=qa.title&&Ca.setAttribute("title",qa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ca.style.backgroundColor=Aa;Ca.style.border="1px solid "+Ha}Ca.style.borderRadius="0";N.appendChild(Ca)});N.innerHTML="";for(var Da=0;Da<ja.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(N),Ba(ja[Da])});
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=qa.title&&Ca.setAttribute("title",qa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ca.style.backgroundColor=Aa;Ca.style.border="1px solid "+Ha}Ca.style.borderRadius="0";O.appendChild(Ca)});O.innerHTML="";for(var Da=0;Da<ja.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(O),Ba(ja[Da])});
null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var va=document.createElement("div");va.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(u.appendChild(aa),u.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(aa);D(va);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(R);return u};StyleFormatPanel.prototype.addEditOps=function(u){var D=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(N){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",u.appendChild(T));K=1==D.cells.length?K.view.getState(D.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(N){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
-mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),u.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(N){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
-u.appendChild(D));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-D){var K=Graph.fontMapping[D];null==K&&Graph.isCssFontUrl(D)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",D)):(null==K&&(K='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+D+'");\n}'),u=document.createElement("style"),mxUtils.write(u,K));return u};Graph.addFont=function(u,D,K){if(null!=u&&0<u.length&&null!=D&&0<D.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!=
-T){var N=Graph.customFontElements[T];null!=N&&N.url!=D&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=D,"http:"==D.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(D)),N={name:u,url:D,elt:Graph.createFontElement(u,N)},Graph.customFontElements[T]=N,Graph.recentCustomFonts[T]=N,D=document.getElementsByTagName("head")[0],null!=K&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=K,N.elt.onerror=K):K()),null!=D&&D.appendChild(N.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
-return u};Graph.getFontUrl=function(u,D){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(D=u.url);return D};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var D=0;D<u.length;D++){var K=u[D].getAttribute("data-font-src");if(null!=K){var T="FONT"==u[D].nodeName?u[D].getAttribute("face"):u[D].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(u){if(null!=u){var D=mxUtils.getValue(u,"fontSource",null);if(null!=D){var K=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=K&&Graph.addFont(K,decodeURIComponent(D))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function u(N){D=N}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(N){D=null});this.isMouseInsertPoint=function(){return null!=D};var K=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom=
-Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,D){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,D,K,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
-var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,D,K){function T(){for(var ja=R.getSelectionCells(),Ba=[],Da=0;Da<ja.length;Da++)R.isCellVisible(ja[Da])&&Ba.push(ja[Da]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Da=document.createElement("table");
-Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var qa=document.createElement("tbody");if(null!=ja&&0<ja.length)for(var Ca=0;Ca<ja.length;Ca++)(function(Aa){var Ha=0>mxUtils.indexOf(R.hiddenTags,Aa),Na=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
-mxResources.get(Ha?"hideIt":"show",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ga.appendChild(Fa);mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(R.hiddenTags,Aa);mxEvent.isShiftDown(La)?N(0<=mxUtils.indexOf(R.hiddenTags,Aa)):(0>za?R.hiddenTags.push(Aa):0<=za&&R.hiddenTags.splice(za,1),T(),R.refresh());mxEvent.consume(La)});Na.appendChild(Ga);Ga=document.createElement("td");
-Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap";Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(La){if(mxEvent.isShiftDown(La)){N(!0);var za=R.getCellsForTags([Aa],null,null,!0);R.isEnabled()?R.setSelectionCells(za):R.highlightCells(za)}else if(Ha&&
-0<R.hiddenTags.length)N(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Aa);za.splice(ta,1);R.hiddenTags=za;T();R.refresh()}mxEvent.consume(La)});Na.appendChild(Ga);if(R.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==Ba){Ga.style.align="center";Ga.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.crossImage);Fa.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Fa,
-Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(Y,Aa);0<=za&&Y.splice(za,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[Aa]);R.refresh();mxEvent.consume(La)});Ga.appendChild(Fa)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,
-Aa);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(Ea,"change",function(La){Ea.checked?R.addTagsForCells(R.getSelectionCells(),[Aa]):R.removeTagsForCells(R.getSelectionCells(),[Aa]);mxEvent.consume(La)});Ga.appendChild(Ea)}Na.appendChild(Ga)}qa.appendChild(Na)})(ja[Ca]);Da.appendChild(qa);ea.appendChild(Da)}}var R=this,Y=R.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect=
-"none";ba.style.overflow="hidden";ba.style.padding="10px";ba.style.height="100%";var ea=document.createElement("div");ea.style.boxSizing="border-box";ea.style.borderRadius="4px";ea.style.userSelect="none";ea.style.overflow="auto";ea.style.position="absolute";ea.style.left="10px";ea.style.right="10px";ea.style.top="10px";ea.style.border=R.isEnabled()?"1px solid #808080":"none";ea.style.bottom=R.isEnabled()?"48px":"10px";ba.appendChild(ea);var Z=mxUtils.button(mxResources.get("reset"),function(ja){R.hiddenTags=
-[];mxEvent.isShiftDown(ja)||(Y=R.hiddenTags.slice());T();R.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(Y,function(ja){Y=ja;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";R.addListener(mxEvent.ROOT,function(){Y=R.hiddenTags.slice()});var aa=mxUtils.bind(this,function(ja,Ba){if(u()){ja=R.getAllTags();for(Ba=0;Ba<ja.length;Ba++)0>
-mxUtils.indexOf(Y,ja[Ba])&&Y.push(ja[Ba]);Y.sort();R.isSelectionEmpty()?Q(Y):Q(Y,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,aa);R.model.addListener(mxEvent.CHANGE,aa);R.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";R.isEnabled()&&
-(va.appendChild(Z),va.appendChild(fa),ba.appendChild(va));return{div:ba,refresh:aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var D in Graph.customFontElements){var K=Graph.customFontElements[D];u.push({name:K.name,url:K.url})}return u};Graph.prototype.setFont=function(u,D){Graph.addFont(u,D);document.execCommand("fontname",!1,u);if(null!=D){var K=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(u,D);for(var T=0;T<K.length;T++)K[T].getAttribute("face")==
-u&&K[T].getAttribute("data-font-src")!=D&&K[T].setAttribute("data-font-src",D)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var D in u)this.globalVars[D]=
-u[D]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var D=z.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[u]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,D,K,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Da=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var qa=L.apply(this,arguments),Ca=this.getCustomFonts();if(Z&&0<Ca.length){var Aa=qa.ownerDocument,Ha=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Na="",Ga="",Fa=0;Fa<Ca.length;Fa++){var Ea=Ca[Fa].name,La=Ca[Fa].url;Graph.isCssFontUrl(La)?
-Na+="@import url("+La+");\n":Ga+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+La+'");\n}\n'}Ha.appendChild(Aa.createTextNode(Na+Ga));qa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=ja&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return qa};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=C.apply(this,arguments);if(this.mathEnabled){var D=u.drawText;u.drawText=function(K,T){if(null!=K.text&&
-null!=K.text.value&&K.text.checkBounds()&&(mxUtils.isNode(K.text.value)||K.text.dialect==mxConstants.DIALECT_STRICTHTML)){var N=K.text.getContentNode();if(null!=N){N=N.cloneNode(!0);if(N.getElementsByTagNameNS)for(var Q=N.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=N.innerHTML&&(Q=K.text.value,K.text.value=N.innerHTML,D.apply(this,arguments),K.text.value=Q)}}else D.apply(this,arguments)}}return u};var E=mxCellRenderer.prototype.destroy;
-mxCellRenderer.prototype.destroy=function(u){E.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var P=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);
-return P.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var D="1"==mxUtils.getValue(u.style,"enumerate",0);D&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):D||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);D=u.secondLabel;if(null!=D){var K=u.view.scale,T=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*K,u.y+4*K,0,0):mxRectangle.fromPoint(u.view.getPoint(u));D.bounds.equals(u)&&D.value==T&&D.scale==K||(D.bounds=
-u,D.value=T,D.scale=K,D.redraw())}};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
-u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,D){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 K=!1,T=0,N=0,Q=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,
-function(){K&&(K=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ba()}),ba=mxUtils.bind(this,function(){if(N<u.length){var ea=this.stoppingCustomActions,Z=u[N++],fa=[];if(null!=Z.open)if(R(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ea||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),R());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ea?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ea?0:Z.fadeOut.delay));null!=Z.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+1<this.defaultColorSchemes.length&&(t.appendChild(aa),t.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(aa);E(va);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var E=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,T=null;1==E.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));M=1==E.cells.length?M.view.getState(E.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
+mxResources.get("editShape")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),t.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
+t.appendChild(E));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
+E){var M=Graph.fontMapping[E];null==M&&Graph.isCssFontUrl(E)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",E)):(null==M&&(M='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+E+'");\n}'),t=document.createElement("style"),mxUtils.write(t,M));return t};Graph.addFont=function(t,E,M){if(null!=t&&0<t.length&&null!=E&&0<E.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
+T){var O=Graph.customFontElements[T];null!=O&&O.url!=E&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=E,"http:"==E.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(E)),O={name:t,url:E,elt:Graph.createFontElement(t,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,E=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=E&&E.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
+return t};Graph.getFontUrl=function(t,E){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(E=t.url);return E};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var E=0;E<t.length;E++){var M=t[E].getAttribute("data-font-src");if(null!=M){var T="FONT"==t[E].nodeName?t[E].getAttribute("face"):t[E].style.fontFamily;null!=T&&Graph.addFont(T,M)}}};Graph.processFontStyle=function(t){if(null!=t){var E=mxUtils.getValue(t,"fontSource",null);if(null!=E){var M=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+null);null!=M&&Graph.addFont(M,decodeURIComponent(E))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function t(O){E=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){E=null});this.isMouseInsertPoint=function(){return null!=E};var M=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):M.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=
+Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,E){return Graph.processFontStyle(A.apply(this,arguments))};var K=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,E,M,T,O,Q,S,Y,ba,ea,Z){K.apply(this,arguments);Graph.processFontAttributes(Z)};
+var P=mxText.prototype.redraw;mxText.prototype.redraw=function(){P.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,M){function T(){for(var ja=S.getSelectionCells(),Ba=[],Da=0;Da<ja.length;Da++)S.isCellVisible(ja[Da])&&Ba.push(ja[Da]);S.setSelectionCells(Ba)}function O(ja){S.hiddenTags=ja?[]:Y.slice();T();S.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Da=document.createElement("table");
+Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var qa=document.createElement("tbody");if(null!=ja&&0<ja.length)for(var Ca=0;Ca<ja.length;Ca++)(function(Aa){var Ha=0>mxUtils.indexOf(S.hiddenTags,Aa),Na=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
+mxResources.get(Ha?"hideIt":"show",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(E||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ga.appendChild(Fa);mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(S.hiddenTags,Aa);mxEvent.isShiftDown(La)?O(0<=mxUtils.indexOf(S.hiddenTags,Aa)):(0>za?S.hiddenTags.push(Aa):0<=za&&S.hiddenTags.splice(za,1),T(),S.refresh());mxEvent.consume(La)});Na.appendChild(Ga);Ga=document.createElement("td");
+Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap";Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(La){if(mxEvent.isShiftDown(La)){O(!0);var za=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ha&&
+0<S.hiddenTags.length)O(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Aa);za.splice(ta,1);S.hiddenTags=za;T();S.refresh()}mxEvent.consume(La)});Na.appendChild(Ga);if(S.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==Ba){Ga.style.align="center";Ga.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.crossImage);Fa.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Fa,
+Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(E||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(La){var za=mxUtils.indexOf(Y,Aa);0<=za&&Y.splice(za,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Aa]);S.refresh();mxEvent.consume(La)});Ga.appendChild(Fa)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,
+Aa);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(Ea,"change",function(La){Ea.checked?S.addTagsForCells(S.getSelectionCells(),[Aa]):S.removeTagsForCells(S.getSelectionCells(),[Aa]);mxEvent.consume(La)});Ga.appendChild(Ea)}Na.appendChild(Ga)}qa.appendChild(Na)})(ja[Ca]);Da.appendChild(qa);ea.appendChild(Da)}}var S=this,Y=S.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect=
+"none";ba.style.overflow="hidden";ba.style.padding="10px";ba.style.height="100%";var ea=document.createElement("div");ea.style.boxSizing="border-box";ea.style.borderRadius="4px";ea.style.userSelect="none";ea.style.overflow="auto";ea.style.position="absolute";ea.style.left="10px";ea.style.right="10px";ea.style.top="10px";ea.style.border=S.isEnabled()?"1px solid #808080":"none";ea.style.bottom=S.isEnabled()?"48px":"10px";ba.appendChild(ea);var Z=mxUtils.button(mxResources.get("reset"),function(ja){S.hiddenTags=
+[];mxEvent.isShiftDown(ja)||(Y=S.hiddenTags.slice());T();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(Y,function(ja){Y=ja;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var aa=mxUtils.bind(this,function(ja,Ba){if(t()){ja=S.getAllTags();for(Ba=0;Ba<ja.length;Ba++)0>
+mxUtils.indexOf(Y,ja[Ba])&&Y.push(ja[Ba]);Y.sort();S.isSelectionEmpty()?Q(Y):Q(Y,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,aa);S.model.addListener(mxEvent.CHANGE,aa);S.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";S.isEnabled()&&
+(va.appendChild(Z),va.appendChild(fa),ba.appendChild(va));return{div:ba,refresh:aa}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var E in Graph.customFontElements){var M=Graph.customFontElements[E];t.push({name:M.name,url:M.url})}return t};Graph.prototype.setFont=function(t,E){Graph.addFont(t,E);document.execCommand("fontname",!1,t);if(null!=E){var M=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(t,E);for(var T=0;T<M.length;T++)M[T].getAttribute("face")==
+t&&M[T].getAttribute("data-font-src")!=E&&M[T].setAttribute("data-font-src",E)}};var L=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return L.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var E in t)this.globalVars[E]=
+t[E]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var E=u.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[t]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,E,M,T,O,Q,S,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Da=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var qa=D.apply(this,arguments),Ca=this.getCustomFonts();if(Z&&0<Ca.length){var Aa=qa.ownerDocument,Ha=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Na="",Ga="",Fa=0;Fa<Ca.length;Fa++){var Ea=Ca[Fa].name,La=Ca[Fa].url;Graph.isCssFontUrl(La)?
+Na+="@import url("+La+");\n":Ga+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+La+'");\n}\n'}Ha.appendChild(Aa.createTextNode(Na+Ga));qa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=ja&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return qa};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var t=B.apply(this,arguments);if(this.mathEnabled){var E=t.drawText;t.drawText=function(M,T){if(null!=M.text&&
+null!=M.text.value&&M.text.checkBounds()&&(mxUtils.isNode(M.text.value)||M.text.dialect==mxConstants.DIALECT_STRICTHTML)){var O=M.text.getContentNode();if(null!=O){O=O.cloneNode(!0);if(O.getElementsByTagNameNS)for(var Q=O.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=O.innerHTML&&(Q=M.text.value,M.text.value=O.innerHTML,E.apply(this,arguments),M.text.value=Q)}}else E.apply(this,arguments)}}return t};var C=mxCellRenderer.prototype.destroy;
+mxCellRenderer.prototype.destroy=function(t){C.apply(this,arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var N=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);
+return N.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var E="1"==mxUtils.getValue(t.style,"enumerate",0);E&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
+mxConstants.ALIGN_BOTTOM),t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):E||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);E=t.secondLabel;if(null!=E){var M=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*M,t.y+4*M,0,0):mxRectangle.fromPoint(t.view.getPoint(t));E.bounds.equals(t)&&E.value==T&&E.scale==M||(E.bounds=
+t,E.value=T,E.scale=M,E.redraw())}};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=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;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
+t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,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 M=!1,T=0,O=0,Q=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){M&&(M=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ba()}),ba=mxUtils.bind(this,function(){if(O<t.length){var ea=this.stoppingCustomActions,Z=t[O++],fa=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ea||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ea?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ea?0:Z.fadeOut.delay));null!=Z.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
!0),!0)));null!=Z.wipeOut&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(Q(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));aa=[];null!=Z.select&&this.isEnabled()&&(aa=this.getCellsForAction(Z.select),this.setSelectionCells(aa));null!=Z.highlight&&(aa=this.getCellsForAction(Z.highlight),this.highlightCells(aa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
null!=Z.scroll&&(aa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);if(null!=Z.tags){aa=[];null!=Z.tags.hidden&&(aa=aa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var va=this.getAllTags(),ja=0;ja<va.length;ja++)0>mxUtils.indexOf(Z.tags.visible,va[ja])&&0>mxUtils.indexOf(aa,va[ja])&&aa.push(va[ja]);this.hiddenTags=aa;this.refresh()}0<fa.length&&(T++,this.executeAnimations(fa,Y,ea?1:Z.steps,ea?0:Z.delay));
-0==T?ba():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=D&&D()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,D){var K=this.getLinkForCell(D);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(u,K));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var N=T.getElementsByTagName("a"),Q=!1,R=0;R<N.length;R++)K=N[R].getAttribute("href"),null!=K&&"data:action/json,"==
-K.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,K)),Q=!0);Q&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,D){if("data:action/json,"==D.substring(0,17))try{var K=JSON.parse(D.substring(17));null!=K.actions&&(this.updateCustomLinkActions(u,K.actions),D="data:action/json,"+JSON.stringify(K))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(u,D){for(var K=0;K<D.length;K++){var T=D[K],N;for(N in T)this.updateCustomLinkAction(u,
-T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,D,K){if(null!=D&&null!=D[K]){for(var T=[],N=0;N<D[K].length;N++)if("*"==D[K][N])T.push(D[K][N]);else{var Q=u[D[K][N]];null!=Q?""!=Q&&T.push(Q):T.push(D[K][N])}D[K]=T}};Graph.prototype.getCellsForAction=function(u,D){D=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,D));if(null!=u.excludeCells){for(var K=[],T=0;T<D.length;T++)0>u.excludeCells.indexOf(D[T].id)&&K.push(D[T]);
-D=K}return D};Graph.prototype.getCellsById=function(u){var D=[];if(null!=u)for(var K=0;K<u.length;K++)if("*"==u[K]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[K]);null!=N&&D.push(N)}return D};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||
-0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var D=0;D<u.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,u[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,D,K,T){var N=[];if(null!=u){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var Q=0,R={},Y=0;Y<u.length;Y++)0<u[Y].length&&(R[u[Y]]=!0,Q++);for(Y=0;Y<D.length;Y++)if(K&&this.model.getParent(D[Y])==this.model.root||this.model.isVertex(D[Y])||this.model.isEdge(D[Y])){var ba=
-this.getTagsForCell(D[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=u.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=R[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(D[Y]))&&N.push(D[Y])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var D=null,K=[],T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);K=[];if(0<N.length){N=N.split(" ");for(var Q={},
-R=0;R<N.length;R++)if(null==D||null!=D[N[R]])Q[N[R]]=!0,K.push(N[R]);D=Q}else return[]}return K};Graph.prototype.getTagsForCells=function(u){for(var D=[],K={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==K[N[Q]]&&(K[N[Q]]=!0,D.push(N[Q]))}}return D};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,D){if(0<u.length&&0<D.length){this.model.beginUpdate();
-try{for(var K=0;K<u.length;K++){for(var T=this.getTagsForCell(u[K]),N=T.split(" "),Q=!1,R=0;R<D.length;R++){var Y=mxUtils.trim(D[R]);""!=Y&&0>mxUtils.indexOf(N,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(u[K],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,D){if(0<u.length&&0<D.length){this.model.beginUpdate();try{for(var K=0;K<u.length;K++){var T=this.getTagsForCell(u[K]);if(0<T.length){for(var N=T.split(" "),Q=!1,R=0;R<D.length;R++){var Y=
-mxUtils.indexOf(N,D[R]);0<=Y&&(N.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(u[K],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var D=0;D<u.length;D++)this.model.setVisible(u[D],!this.model.isVisible(u[D]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,D){this.model.beginUpdate();try{for(var K=0;K<u.length;K++)this.model.setVisible(u[K],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
-function(u,D,K,T){for(var N=0;N<u.length;N++)this.highlightCell(u[N],D,K,T)};Graph.prototype.highlightCell=function(u,D,K,T,N){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;u=this.view.getState(u);var Q=null;null!=u&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+N),Q=new mxCellHighlight(this,D,N,!1),null!=T&&(Q.opacity=T),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),
-Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},K));return Q};Graph.prototype.addSvgShadow=function(u,D,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var N=u.ownerDocument,Q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");Q.setAttribute("id",this.shadowId);var R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",
-this.svgShadowBlur);R.setAttribute("result","blur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",
-this.svgShadowOpacity);R.setAttribute("result","offsetColor");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2",
-"offsetBlur");Q.appendChild(R);R=u.getElementsByTagName("defs");0==R.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=u.firstChild?u.insertBefore(N,u.firstChild):u.appendChild(N)):N=R[0];N.appendChild(Q);K||(D=null!=D?D:u.getElementsByTagName("g")[0],null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&T&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",
-parseInt(u.getAttribute("height"))+6),D=u.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,u.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=null!=D?D:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),D=0;do var K=this.model.getChildAt(this.model.root,D);while(D++<u&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
+0==T?ba():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=E&&E()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,E){var M=this.getLinkForCell(E);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(t,M));if(this.isHtmlLabel(E)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var O=T.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),null!=M&&"data:action/json,"==
+M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(t,M)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,E){if("data:action/json,"==E.substring(0,17))try{var M=JSON.parse(E.substring(17));null!=M.actions&&(this.updateCustomLinkActions(t,M.actions),E="data:action/json,"+JSON.stringify(M))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(t,E){for(var M=0;M<E.length;M++){var T=E[M],O;for(O in T)this.updateCustomLinkAction(t,
+T[O],"cells"),this.updateCustomLinkAction(t,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,E,M){if(null!=E&&null!=E[M]){for(var T=[],O=0;O<E[M].length;O++)if("*"==E[M][O])T.push(E[M][O]);else{var Q=t[E[M][O]];null!=Q?""!=Q&&T.push(Q):T.push(E[M][O])}E[M]=T}};Graph.prototype.getCellsForAction=function(t,E){E=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,E));if(null!=t.excludeCells){for(var M=[],T=0;T<E.length;T++)0>t.excludeCells.indexOf(E[T].id)&&M.push(E[T]);
+E=M}return E};Graph.prototype.getCellsById=function(t){var E=[];if(null!=t)for(var M=0;M<t.length;M++)if("*"==t[M]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var O=this.model.getCell(t[M]);null!=O&&E.push(O)}return E};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||
+0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var E=0;E<t.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,t[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,E,M,T){var O=[];if(null!=t){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},Y=0;Y<t.length;Y++)0<t[Y].length&&(S[t[Y]]=!0,Q++);for(Y=0;Y<E.length;Y++)if(M&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ba=
+this.getTagsForCell(E[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=t.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=S[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(E[Y]))&&O.push(E[Y])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var E=null,M=[],T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);M=[];if(0<O.length){O=O.split(" ");for(var Q={},
+S=0;S<O.length;S++)if(null==E||null!=E[O[S]])Q[O[S]]=!0,M.push(O[S]);E=Q}else return[]}return M};Graph.prototype.getTagsForCells=function(t){for(var E=[],M={},T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);if(0<O.length){O=O.split(" ");for(var Q=0;Q<O.length;Q++)null==M[O[Q]]&&(M[O[Q]]=!0,E.push(O[Q]))}}return E};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();
+try{for(var M=0;M<t.length;M++){for(var T=this.getTagsForCell(t[M]),O=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=mxUtils.trim(E[S]);""!=Y&&0>mxUtils.indexOf(O,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(t[M],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){var T=this.getTagsForCell(t[M]);if(0<T.length){for(var O=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=
+mxUtils.indexOf(O,E[S]);0<=Y&&(O.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(t[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!this.model.isVisible(t[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,E){this.model.beginUpdate();try{for(var M=0;M<t.length;M++)this.model.setVisible(t[M],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(t,E,M,T){for(var O=0;O<t.length;O++)this.highlightCell(t[O],E,M,T)};Graph.prototype.highlightCell=function(t,E,M,T,O){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;t=this.view.getState(t);var Q=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+O),Q=new mxCellHighlight(this,E,O,!1),null!=T&&(Q.opacity=T),Q.highlight(t),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),
+Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},M));return Q};Graph.prototype.addSvgShadow=function(t,E,M,T){M=null!=M?M:!1;T=null!=T?T:!0;var O=t.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",
+this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",
+this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2",
+"offsetBlur");Q.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=S[0];O.appendChild(Q);M||(E=null!=E?E:t.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",
+parseInt(t.getAttribute("height"))+6),E=t.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,t.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(t,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),E=0;do var M=this.model.getChildAt(this.model.root,E);while(E++<t&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",
STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=
[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];
@@ -11665,41 +11666,41 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var D=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?D="mxgraph.er":"sysML"==u.substring(0,5)&&(D="mxgraph.sysml"));return D};var V=mxMarker.createMarker;mxMarker.createMarker=
-function(u,D,K,T,N,Q,R,Y,ba,ea){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=Z&&mxStencilRegistry.getStencil(Z)}return V.apply(this,arguments)};var M=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,D,K,T,N,Q){"1"==mxUtils.getValue(D.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return M.apply(this,arguments)};PrintDialog.prototype.create=function(u,D){function K(){aa.value=Math.max(1,
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var E=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?E="mxgraph.er":"sysML"==t.substring(0,5)&&(E="mxgraph.sysml"));return E};var W=mxMarker.createMarker;mxMarker.createMarker=
+function(t,E,M,T,O,Q,S,Y,ba,ea){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,E,M,T,O,Q){"1"==mxUtils.getValue(E.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(t,E){function M(){aa.value=Math.max(1,
Math.min(Y,Math.max(parseInt(aa.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(fa.value))))}function T(ya){function wa(Ja,Oa,Pa){var Qa=Ja.useCssTransforms,Ya=Ja.currentTranslate,Ma=Ja.currentScale,Ta=Ja.view.translate,Ua=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Za=Ja.getGraphBounds(),Wa=0,bb=0,Va=oa.get(),ab=1/Ja.pageScale,
$a=qa.checked;if($a){ab=parseInt(ta.value);var hb=parseInt(ka.value);ab=Math.min(Va.height*hb/(Za.height/Ja.view.scale),Va.width*ab/(Za.width/Ja.view.scale))}else ab=parseInt(Da.value)/(100*Ja.pageScale),isNaN(ab)&&(ua=1/Ja.pageScale,Da.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ja.pageVisible?(Za=Ja.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Va,
-0,Wa,bb,$a);Oa.pageSelector=!1;Oa.mathEnabled=!1;va.checked&&(Oa.isCellVisible=function(Xa){return Ja.isCellSelected(Xa)});Wa=u.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var ib=Oa.writeHead;Oa.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
-Xa.writeln("}"),Xa.writeln("</style>"));null!=u.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(u.editor.fontCss),Xa.writeln("</style>"));for(var db=Ja.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
-'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Oa.renderPage;Oa.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=N.shapeForegroundColor;$a=N.shapeBackgroundColor;Va=N.enableFlowAnimation;
-N.enableFlowAnimation=!1;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Wa=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());Oa.open(null,null,Pa,!0);N.enableFlowAnimation=Va;null!=Wa&&(N.shapeForegroundColor=bb,N.shapeBackgroundColor=$a,N.stylesheet=Wa,N.refresh())}else{Va=Ja.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Oa.backgroundColor=Va;Oa.autoOrigin=$a;Oa.appendGraph(Ja,ab,Wa,bb,Pa,!0);Pa=
+0,Wa,bb,$a);Oa.pageSelector=!1;Oa.mathEnabled=!1;va.checked&&(Oa.isCellVisible=function(Xa){return Ja.isCellSelected(Xa)});Wa=t.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var ib=Oa.writeHead;Oa.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
+Xa.writeln("}"),Xa.writeln("</style>"));null!=t.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(t.editor.fontCss),Xa.writeln("</style>"));for(var db=Ja.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Oa.renderPage;Oa.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!t.editor.useForeignObjectForMath?!0:t.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=O.shapeForegroundColor;$a=O.shapeBackgroundColor;Va=O.enableFlowAnimation;
+O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Oa.open(null,null,Pa,!0);O.enableFlowAnimation=Va;null!=Wa&&(O.shapeForegroundColor=bb,O.shapeBackgroundColor=$a,O.stylesheet=Wa,O.refresh())}else{Va=Ja.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Oa.backgroundColor=Va;Oa.autoOrigin=$a;Oa.appendGraph(Ja,ab,Wa,bb,Pa,!0);Pa=
Ja.getCustomFonts();if(null!=Oa.wnd)for(Wa=0;Wa<Pa.length;Wa++)bb=Pa[Wa].name,$a=Pa[Wa].url,Graph.isCssFontUrl($a)?Oa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Oa.wnd.document.writeln('<style type="text/css">'),Oa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Oa.wnd.document.writeln("</style>"))}Qa&&(Ja.useCssTransforms=Qa,Ja.currentTranslate=
-Ya,Ja.currentScale=Ma,Ja.view.translate=Ta,Ja.view.scale=Ua);return Oa}var ua=parseInt(sa.value)/100;isNaN(ua)&&(ua=1,sa.value="100 %");ua*=.75;var xa=null,ha=N.shapeForegroundColor,da=N.shapeBackgroundColor;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(xa=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());var ca=fa.value,la=aa.value,ia=!ea.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,ea.checked,
-ca,la,qa.checked,ta.value,ka.value,parseInt(Da.value)/100,parseInt(sa.value)/100,oa.get());else{ia&&(ia=va.checked||ca==ba&&la==ba);if(!ia&&null!=u.pages&&u.pages.length){var ra=0;ia=u.pages.length-1;ea.checked||(ra=parseInt(ca)-1,ia=parseInt(la)-1);for(var pa=ra;pa<=ia;pa++){var na=u.pages[pa];ca=na==u.currentPage?N:null;if(null==ca){ca=u.createTemporaryGraph(N.stylesheet);ca.shapeForegroundColor=N.shapeForegroundColor;ca.shapeBackgroundColor=N.shapeBackgroundColor;la=!0;ra=!1;var Ka=null,Ia=null;
-null==na.viewState&&null==na.root&&u.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,ra=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=u.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=ra;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja=
-Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=u.pages?u.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);u.updatePageRoot(na);
-ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=N&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(N);null==ma?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(N.shapeForegroundColor=ha,N.shapeBackgroundColor=da,N.stylesheet=
-xa,N.refresh())}}var N=u.editor.graph,Q=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,D||mxResources.get("print"));Q.appendChild(R);var Y=1,ba=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type",
-"radio");ea.setAttribute("name","pages-printdialog");R.appendChild(ea);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));R.appendChild(D);mxUtils.br(R);var Z=ea.cloneNode(!0);ea.setAttribute("checked","checked");Z.setAttribute("value","range");R.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");R.appendChild(D);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type",
-"number");fa.setAttribute("min","1");fa.style.width="50px";R.appendChild(fa);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));R.appendChild(D);var aa=fa.cloneNode(!0);R.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",K);mxEvent.addListener(aa,"change",K);if(null!=u.pages&&(Y=u.pages.length,null!=u.currentPage))for(D=0;D<u.pages.length;D++)if(u.currentPage==u.pages[D]){ba=
-D+1;fa.value=ba;aa.value=ba;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);u.isPagesEnabled()?1<Y&&(Q.appendChild(R),Z.checked=!0):Z.checked=!0;mxUtils.br(R);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";N.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var ja=document.createElement("div");ja.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",ja.appendChild(va)):
-(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",R.appendChild(va));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));va.parentNode.appendChild(D);1==Y&&mxUtils.br(va.parentNode);var Ba=document.createElement("input");Ba.style.marginRight="8px";Ba.setAttribute("value","adjust");Ba.setAttribute("type","radio");Ba.setAttribute("name","printZoom");ja.appendChild(Ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));
-ja.appendChild(D);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width="50px";ja.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ba.checked=!0});Q.appendChild(ja);R=R.cloneNode(!1);var qa=Ba.cloneNode(!0);qa.setAttribute("value","fit");Ba.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(qa);R.appendChild(D);ja=
+Ya,Ja.currentScale=Ma,Ja.view.translate=Ta,Ja.view.scale=Ua);return Oa}var ua=parseInt(sa.value)/100;isNaN(ua)&&(ua=1,sa.value="100 %");ua*=.75;var xa=null,ha=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(xa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ca=fa.value,la=aa.value,ia=!ea.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,ea.checked,
+ca,la,qa.checked,ta.value,ka.value,parseInt(Da.value)/100,parseInt(sa.value)/100,oa.get());else{ia&&(ia=va.checked||ca==ba&&la==ba);if(!ia&&null!=t.pages&&t.pages.length){var ra=0;ia=t.pages.length-1;ea.checked||(ra=parseInt(ca)-1,ia=parseInt(la)-1);for(var pa=ra;pa<=ia;pa++){var na=t.pages[pa];ca=na==t.currentPage?O:null;if(null==ca){ca=t.createTemporaryGraph(O.stylesheet);ca.shapeForegroundColor=O.shapeForegroundColor;ca.shapeBackgroundColor=O.shapeBackgroundColor;la=!0;ra=!1;var Ka=null,Ia=null;
+null==na.viewState&&null==na.root&&t.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,ra=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=t.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=ra;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja=
+Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);t.updatePageRoot(na);
+ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=O&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(O);null==ma?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(O.shapeForegroundColor=ha,O.shapeBackgroundColor=da,O.stylesheet=
+xa,O.refresh())}}var O=t.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,E||mxResources.get("print"));Q.appendChild(S);var Y=1,ba=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type",
+"radio");ea.setAttribute("name","pages-printdialog");S.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));S.appendChild(E);mxUtils.br(S);var Z=ea.cloneNode(!0);ea.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");S.appendChild(E);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type",
+"number");fa.setAttribute("min","1");fa.style.width="50px";S.appendChild(fa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));S.appendChild(E);var aa=fa.cloneNode(!0);S.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",M);mxEvent.addListener(aa,"change",M);if(null!=t.pages&&(Y=t.pages.length,null!=t.currentPage))for(E=0;E<t.pages.length;E++)if(t.currentPage==t.pages[E]){ba=
+E+1;fa.value=ba;aa.value=ba;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);t.isPagesEnabled()?1<Y&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";O.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var ja=document.createElement("div");ja.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",ja.appendChild(va)):
+(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",S.appendChild(va));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));va.parentNode.appendChild(E);1==Y&&mxUtils.br(va.parentNode);var Ba=document.createElement("input");Ba.style.marginRight="8px";Ba.setAttribute("value","adjust");Ba.setAttribute("type","radio");Ba.setAttribute("name","printZoom");ja.appendChild(Ba);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));
+ja.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width="50px";ja.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ba.checked=!0});Q.appendChild(ja);S=S.cloneNode(!1);var qa=Ba.cloneNode(!0);qa.setAttribute("value","fit");Ba.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(qa);S.appendChild(E);ja=
document.createElement("table");ja.style.display="inline-block";var Ca=document.createElement("tbody"),Aa=document.createElement("tr"),Ha=Aa.cloneNode(!0),Na=document.createElement("td"),Ga=Na.cloneNode(!0),Fa=Na.cloneNode(!0),Ea=Na.cloneNode(!0),La=Na.cloneNode(!0),za=Na.cloneNode(!0);Na.style.textAlign="right";Ea.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","1");ta.setAttribute("min",
-"1");ta.setAttribute("type","number");ta.style.width="40px";Ga.appendChild(ta);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Fa.appendChild(D);mxUtils.write(Ea,mxResources.get("fitToBy"));var ka=ta.cloneNode(!0);La.appendChild(ka);mxEvent.addListener(ta,"focus",function(){qa.checked=!0});mxEvent.addListener(ka,"focus",function(){qa.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));za.appendChild(D);Aa.appendChild(Na);
-Aa.appendChild(Ga);Aa.appendChild(Fa);Ha.appendChild(Ea);Ha.appendChild(La);Ha.appendChild(za);Ca.appendChild(Aa);Ca.appendChild(Ha);ja.appendChild(Ca);R.appendChild(ja);Q.appendChild(R);R=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));R.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var oa=PageSetupDialog.addPageFormatPanel(D,"printdialog",u.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));R.appendChild(D);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";R.appendChild(sa);Q.appendChild(R);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});R.className="geBtn";u.editor.cancelFirst&&
-D.appendChild(R);u.isOffline()||(ja=mxUtils.button(mxResources.get("help"),function(){N.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ja.className="geBtn",D.appendChild(ja));PrintDialog.previewEnabled&&(ja=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();T(!1)}),ja.className="geBtn",D.appendChild(ja));ja=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();T(!0)});ja.className="geBtn gePrimaryBtn";D.appendChild(ja);u.editor.cancelFirst||
-D.appendChild(R);Q.appendChild(D);this.container=Q};var W=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 u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}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 W.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 U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var u=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(D){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+"1");ta.setAttribute("type","number");ta.style.width="40px";Ga.appendChild(ta);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Fa.appendChild(E);mxUtils.write(Ea,mxResources.get("fitToBy"));var ka=ta.cloneNode(!0);La.appendChild(ka);mxEvent.addListener(ta,"focus",function(){qa.checked=!0});mxEvent.addListener(ka,"focus",function(){qa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));za.appendChild(E);Aa.appendChild(Na);
+Aa.appendChild(Ga);Aa.appendChild(Fa);Ha.appendChild(Ea);Ha.appendChild(La);Ha.appendChild(za);Ca.appendChild(Aa);Ca.appendChild(Ha);ja.appendChild(Ca);S.appendChild(ja);Q.appendChild(S);S=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));S.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var oa=PageSetupDialog.addPageFormatPanel(E,"printdialog",t.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));S.appendChild(E);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";S.appendChild(sa);Q.appendChild(S);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&
+E.appendChild(S);t.isOffline()||(ja=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ja.className="geBtn",E.appendChild(ja));PrintDialog.previewEnabled&&(ja=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),ja.className="geBtn",E.appendChild(ja));ja=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});ja.className="geBtn gePrimaryBtn";E.appendChild(ja);t.editor.cancelFirst||
+E.appendChild(S);Q.appendChild(E);this.container=Q};var V=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 t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}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 V.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 U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var t=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,l,p,q,x){q=null!=q?q:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var y=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(d);(new Image).src=y+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=l?":colno:"+
-encodeURIComponent(l):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(A){}try{x||null==window.console||console.error(q,d,g,k,l,p)}catch(A){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
+encodeURIComponent(l):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(z){}try{x||null==window.console||console.error(q,d,g,k,l,p)}catch(z){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,
d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
@@ -11708,9 +11709,9 @@ g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.leng
EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,g,k){var l=null==d||null==g;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,A){var B=!1;this.active||(q.call(this,y),this.active=!0,null!=A&&(l&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"),
-B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,d)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),B.innerHTML=A,y.appendChild(B),p.status=B),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(y,A)}));this.stop();return I}),B=!0);return B};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(d,g,k){var l=null==d||null==g;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,z){var A=!1;this.active||(q.call(this,y),this.active=!0,null!=z&&(l&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),A=document.createElement("div"),
+A.style.position="absolute",A.style.whiteSpace="nowrap",A.style.background="#4B4243",A.style.color="white",A.style.fontFamily=Editor.defaultHtmlFont,A.style.fontSize="9pt",A.style.padding="6px",A.style.paddingLeft="10px",A.style.paddingRight="10px",A.style.zIndex=2E9,A.style.left=Math.max(0,d)+"px",A.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(A.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(A.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(A.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),A.innerHTML=z,y.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var K=function(){};this.active&&(K=mxUtils.bind(this,function(){this.spin(y,z)}));this.stop();return K}),A=!0);return A};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
return p};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,l=this.editor.graph,p=this;g.getFunction=function(q){if(l.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var x=p.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<x&&p.movePage(x,x-1)};if(38==q.keyCode)return function(){0<x&&p.movePage(x,0)};if(39==q.keyCode)return function(){x<p.pages.length-1&&p.movePage(x,
@@ -11719,11 +11720,11 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
q?mxUtils.getXml(q):""}}catch(x){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;
g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var p=l.length-1;0<=p;p--){var q=this.updatePageRoot(new DiagramPage(l[p]));null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,q,0==p?q: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])),g.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!=k)for(p=0;p<k.length;p++)g.model.execute(new ChangePage(this,k[p],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,g,k,l,p,q,x,y,A,B,I){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;A=null!=A?A:!0;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var t="_blank";else O=t=l;if(null==d)return"";var z=d;if("mxfile"!=z.nodeName.toLowerCase()){if(I){var L=d.ownerDocument.createElement("diagram");L.setAttribute("id",Editor.guid());L.appendChild(d)}else{L=Graph.zapGremlins(mxUtils.getXml(d));z=Graph.compress(L);if(Graph.decompress(z)!=L)return L;L=d.ownerDocument.createElement("diagram");
-L.setAttribute("id",Editor.guid());mxUtils.setTextContent(L,z)}z=d.ownerDocument.createElement("mxfile");z.appendChild(L)}B?(z=z.cloneNode(!0),z.removeAttribute("modified"),z.removeAttribute("host"),z.removeAttribute("agent"),z.removeAttribute("etag"),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("pages"),z.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?z.setAttribute("host","Chrome"):EditorUi.isElectronApp?z.setAttribute("host","Electron"):z.setAttribute("host",window.location.hostname),z.setAttribute("modified",(new Date).toISOString()),z.setAttribute("agent",navigator.appVersion),z.setAttribute("version",EditorUi.VERSION),z.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,null!=d&&z.setAttribute("type",d),1<z.getElementsByTagName("diagram").length&&null!=this.pages&&z.setAttribute("pages",this.pages.length));
-I=I?mxUtils.getPrettyXml(z):mxUtils.getXml(z);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))I=this.getHtml2(mxUtils.getXml(z),g,null!=k?k.getTitle():null,t,O);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),I=this.getEmbeddedSvg(I,g,l,null,y,A,O);return I};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
-if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(A){var B=A.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&A.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(B)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+function(d,g,k,l,p,q,x,y,z,A,K){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;z=null!=z?z:!0;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var L="_blank";else P=L=l;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(K){var D=d.ownerDocument.createElement("diagram");D.setAttribute("id",Editor.guid());D.appendChild(d)}else{D=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(D);if(Graph.decompress(u)!=D)return D;D=d.ownerDocument.createElement("diagram");
+D.setAttribute("id",Editor.guid());mxUtils.setTextContent(D,u)}u=d.ownerDocument.createElement("mxfile");u.appendChild(D)}A?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));
+K=K?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))K=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,L,P);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),K=this.getEmbeddedSvg(K,g,l,null,y,z,P);return K};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
+if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(z){var A=z.getElementsByTagName("mxGraphModel");A=0<A.length?A[0]:null;null==A&&k?(A=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<A.length&&(A=Graph.decompress(A),null!=A&&0<A.length&&z.appendChild(mxUtils.parseXml(A).documentElement))):null==A||k?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(A)));p.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var q=this.pages[g],x=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,l);EditorUi.removeChildNodes(x);mxUtils.setTextContent(x,Graph.compressNode(y));delete q.needsUpdate}else l&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?
q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,l),x=x.cloneNode(!1),mxUtils.setTextContent(x,
Graph.compressNode(y))));d(x)}return p};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],l=0;l<d.length;l++){var p=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?k.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(p)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=
@@ -11732,10 +11733,10 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");
for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],
g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,
-function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,A,B,I){p=null!=p?p:!0;q=null!=q?q:!1;var O=this.editor.graph;if(g||!d&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var t=null!=O.themes&&"darkTheme"==O.defaultThemeName;B=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var z=O.getGlobalVariable;O=this.createTemporaryGraph(t?O.getDefaultStylesheet():O.getStylesheet());
-O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var L=this.pages[0];this.currentPage==L?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&O.setBackgroundImage(L.viewState.backgroundImage);O.getGlobalVariable=function(C){return"page"==C?L.getName():"pagenumber"==C?1:z.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(L.root)}}x=null!=x?x:this.getXmlFileData(p,q,B,I);A=null!=A?
-A:this.getCurrentFile();d=this.createFileData(x,O,A,window.location.href,d,g,k,l,p,y,B);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,l,p,q){q=null!=q?q:!0;var x=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){x=q?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var A=g.view.scale;q=Math.floor(x.x/A-g.view.translate.x);A=Math.floor(x.y/A-g.view.translate.y);x=g.background;null==p&&(g=this.getBasenames().join(";"),
-0<g.length&&(y=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",q);d.setAttribute("y0",A)}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!=l&&d.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,z,A,K){p=null!=p?p:!0;q=null!=q?q:!1;var P=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var L=null!=P.themes&&"darkTheme"==P.defaultThemeName;A=!1;if(L||null!=this.pages&&this.currentPage!=this.pages[0]){var u=P.getGlobalVariable;P=this.createTemporaryGraph(L?P.getDefaultStylesheet():P.getStylesheet());
+P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&P.setBackgroundImage(D.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B?D.getName():"pagenumber"==B?1:u.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(D.root)}}x=null!=x?x:this.getXmlFileData(p,q,A,K);z=null!=z?
+z:this.getCurrentFile();d=this.createFileData(x,P,z,window.location.href,d,g,k,l,p,y,A);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,l,p,q){q=null!=q?q:!0;var x=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){x=q?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var z=g.view.scale;q=Math.floor(x.x/z-g.view.translate.x);z=Math.floor(x.y/z-g.view.translate.y);x=g.background;null==p&&(g=this.getBasenames().join(";"),
+0<g.length&&(y=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",q);d.setAttribute("y0",z)}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!=l&&d.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=x&&x!=mxConstants.NONE?' style="background-color:'+x+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+l+"</div>\n</div>\n"+
(null==p?'<script type="text/javascript" src="'+y+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,l,p){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
@@ -11743,20 +11744,20 @@ p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),g=new DiagramPage(d[l]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[l+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");g={};for(l=0;l<p.length;l++)g[p[l]]=!0;var q=this.editor.graph.getModel(),
-x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,A,B,I,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==d?!1:!p),z=t+("xml"==d||"pdf"==d&&I?".drawio":"")+"."+d;if("xml"==d){var L=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(z,d,L,"text/xml")}else if("html"==d)L=this.getHtml2(this.getFileData(!0),this.editor.graph,
-t),this.saveData(z,d,L,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)z=t+".png";else if("jpeg"==d)z=t+".jpg";else if("remoteSvg"==d){z=t+".svg";d="svg";var C=parseInt(A);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<C){var E=this.editor.graph,G=E.getGraphBounds();var P=Math.ceil(G.width*y/E.view.scale+2*C);var J=Math.ceil(G.height*y/E.view.scale+2*C)}}this.saveRequest(z,d,mxUtils.bind(this,function(M,W){try{var U=
-this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(M,d,l,W,x,p,y,A,B,I,O,P,J);this.editor.graph.pageVisible=U;return X}catch(u){this.handleError(u)}}))}else{var F=null,H=mxUtils.bind(this,function(M){M.length<=MAX_REQUEST_SIZE?this.saveData(z,"svg",M,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var S=this.editor.graph.background;
-if(x||S==mxConstants.NONE)S=null;var V=this.editor.graph.getSvg(S,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(M){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(M))})))}else z=t+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(M){this.spinner.stop();H(M)}),l)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,A,
-B,I,O,t){var z=this.editor.graph,L=z.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var C="",E="";if(L.width*L.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==g&&(null!=I?E="&from="+I.from+"&to="+I.to:0==q&&(E="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){C=
-"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+C+E+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
-"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,A=null,B=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(t){O===this.currentPage&&(200<=
-t.getStatus()&&300>=t.getStatus()?(this.updateDiagram(t.getText()),I()):this.handleError({message:mxResources.get("error")+" "+t.getStatus()}))}),mxUtils.bind(this,function(t){this.handleError(t)}))}),I=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(B,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){I();B()}));I();B()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
-k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(J){var F=new mxCellOverlay(J.image||p.warningImage,J.tooltip,J.align,J.valign,J.offset);F.addListener(mxEvent.CLICK,function(H,S){l.alert(J.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
-if(null!=y){try{var A=d.getAttribute("value");if(null!=A){var B=mxUtils.parseXml(A).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))q.setValue(y,B);else for(var I=B.attributes,O=0;O<I.length;O++)p.setAttributeForCell(y,I[O].nodeName,0<I[O].nodeValue.length?I[O].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+y.id+": "+J)}try{var t=d.getAttribute("style");null!=t&&p.model.setStyle(y,t)}catch(J){null!=window.console&&console.log("Error in style for "+
-y.id+": "+J)}try{var z=d.getAttribute("icon");if(null!=z){var L=0<z.length?JSON.parse(z):null;null!=L&&L.append||p.removeCellOverlays(y);null!=L&&p.addCellOverlay(y,g(L))}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}try{var C=d.getAttribute("geometry");if(null!=C){C=JSON.parse(C);var E=p.getCellGeometry(y);if(null!=E){E=E.clone();for(key in C){var G=parseFloat(C[key]);"dx"==key?E.x+=G:"dy"==key?E.y+=G:"dw"==key?E.width+=G:"dh"==key?E.height+=G:E[key]=parseFloat(C[key])}p.model.setGeometry(y,
-E)}}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
+x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,z,A,K,P){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var L=this.getBaseFilename("remoteSvg"==d?!1:!p),u=L+("xml"==d||"pdf"==d&&K?".drawio":"")+"."+d;if("xml"==d){var D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(u,d,D,"text/xml")}else if("html"==d)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
+L),this.saveData(u,d,D,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=L+".png";else if("jpeg"==d)u=L+".jpg";else if("remoteSvg"==d){u=L+".svg";d="svg";var B=parseInt(z);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var C=this.editor.graph,G=C.getGraphBounds();var N=Math.ceil(G.width*y/C.view.scale+2*B);var I=Math.ceil(G.height*y/C.view.scale+2*B)}}this.saveRequest(u,d,mxUtils.bind(this,function(J,V){try{var U=
+this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(J,d,l,V,x,p,y,z,A,K,P,N,I);this.editor.graph.pageVisible=U;return X}catch(t){this.handleError(t)}}))}else{var F=null,H=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var R=this.editor.graph.background;
+if(x||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else u=L+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),l)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
+A,K,P,L){var u=this.editor.graph,D=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var B="",C="";if(D.width*D.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==g&&(null!=K?C="&from="+K.from+"&to="+K.to:0==q&&(C="&allPages=1"));"xmlpng"==g&&(A="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
+"&from="+q;break}q=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:u.getExportVariables()};z&&(p.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+B+C+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+A+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(P&&isFinite(P)?"&w="+P:"")+(L&&isFinite(L)?"&h="+L:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(P){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,z=null,A=mxUtils.bind(this,function(){var P=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(L){P===this.currentPage&&(200<=
+L.getStatus()&&300>=L.getStatus()?(this.updateDiagram(L.getText()),K()):this.handleError({message:mxResources.get("error")+" "+L.getStatus()}))}),mxUtils.bind(this,function(L){this.handleError(L)}))}),K=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){K();A()}));K();A()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
+k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(I){var F=new mxCellOverlay(I.image||p.warningImage,I.tooltip,I.align,I.valign,I.offset);F.addListener(mxEvent.CLICK,function(H,R){l.alert(I.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
+if(null!=y){try{var z=d.getAttribute("value");if(null!=z){var A=mxUtils.parseXml(z).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))q.setValue(y,A);else for(var K=A.attributes,P=0;P<K.length;P++)p.setAttributeForCell(y,K[P].nodeName,0<K[P].nodeValue.length?K[P].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+y.id+": "+I)}try{var L=d.getAttribute("style");null!=L&&p.model.setStyle(y,L)}catch(I){null!=window.console&&console.log("Error in style for "+
+y.id+": "+I)}try{var u=d.getAttribute("icon");if(null!=u){var D=0<u.length?JSON.parse(u):null;null!=D&&D.append||p.removeCellOverlays(y);null!=D&&p.addCellOverlay(y,g(D))}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}try{var B=d.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var C=p.getCellGeometry(y);if(null!=C){C=C.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?C.x+=G:"dy"==key?C.y+=G:"dw"==key?C.width+=G:"dh"==key?C.height+=G:C[key]=parseFloat(B[key])}p.model.setGeometry(y,
+C)}}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}}}else if("model"==d.nodeName){for(var N=d.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(d.firstChild)).decode(N,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
d.nodeName&&(x=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{q.endUpdate()}null!=x&&this.chromelessResize&&this.chromelessResize(!0,x)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=k.lastIndexOf(".");0<=l&&(d=k.substring(l),k=k.substring(0,l));if(g){g=k;var p=new Date;k=p.getFullYear();l=p.getMonth()+1;var q=p.getDate(),x=p.getHours(),y=p.getMinutes();p=p.getSeconds();
k=g+(" "+(k+"-"+l+"-"+q+"-"+x+"-"+y+"-"+p))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var l=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
@@ -11765,29 +11766,29 @@ this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxReso
"1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=
d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(null!=d)try{d.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(y){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||p():p()});g?d():this.handleError(x,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else p();return l};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,l=new mxGraphModel,p=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var q=0;q<d.length;q++){this.updatePageRoot(d[q]);var x=d[q].node.cloneNode(!1);x.removeAttribute("name");l.root=d[q].root;
-var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(A,B,I,O){return!O||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?O&&"mxCell"==A.nodeName&&"previous"==B?null:I:Math.round(I)},g)<<0}return k};EditorUi.prototype.hashValue=
+var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(z,A,K,P){return!P||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?P&&"mxCell"==z.nodeName&&"previous"==A?null:K:Math.round(K)},g)<<0}return k};EditorUi.prototype.hashValue=
function(d,g,k){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var p=0;p<d.attributes.length;p++){var q=d.attributes[p].name,x=null!=g?g(d,q,d.attributes[p].value,!0):d.attributes[p].value;null!=x&&(l^=this.hashValue(q,g,k)+this.hashValue(x,g,k))}}if(null!=d.childNodes)for(p=0;p<d.childNodes.length;p++)l=
(l<<5)-l+this.hashValue(d.childNodes[p],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(p=0;p<d.length;p++)g=(g<<5)-g+d.charCodeAt(p)<<0;l^=g}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,l,p,q,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),
d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-
1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var l=k.previousSibling;g.insertBefore(k,d);g.insertBefore(l,k)};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,l,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};
-EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(P,J){0==P.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
-J.appendChild(q)):this.addLibraryEntries(P,J)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(P){x(g,P)}));this.repositionLibrary(p);var A=y.parentNode.previousSibling;l=A.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&A.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var B=document.createElement("div");
-B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";A.style.position="relative";var I=document.createElement("img");I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";Editor.isDarkMode()&&(I.style.filter="invert(100%)");
-var O=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(P){if(!mxEvent.isConsumed(P)){var J=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(P)}}));if(d.isEditable()){var t=this.editor.graph,z=null,L=mxUtils.bind(this,function(P){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
-mxEvent.consume(P)}),C=mxUtils.bind(this,function(P){d.setModified(!0);d.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=I.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",B.insertBefore(z,B.firstChild),A.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),
-A.style.paddingRight=18*B.childNodes.length+"px")})):null==O&&(O=I.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),B.insertBefore(O,B.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(A.style.paddingRight=18*B.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(J)})),A.style.paddingRight=
-18*B.childNodes.length+"px")}),E=mxUtils.bind(this,function(P,J,F,H){P=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(P)));for(var S=0;S<P.length;S++){var V=t.getCellGeometry(P[S]);null!=V&&V.translate(-J.x,-J.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(P,J.width,J.height,H||"",!0,null,!1));P={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(P))),w:J.width,h:J.height};null!=H&&(P.title=H);g.push(P);C(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
-q=null)}),G=mxUtils.bind(this,function(P){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(P),t.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=t.getSelectionCells(),F=t.view.getBounds(J),H=t.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=t.view.translate.x;F.y-=t.view.translate.y;E(J,F)}mxEvent.consume(P)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(P){t.isMouseDown&&
-null!=t.panningManager&&null!=t.graphHandler.first&&(t.graphHandler.suspend(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",t.panningManager.stop(),t.autoScroll=!1,mxEvent.consume(P))}),mxUtils.bind(this,function(P){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=
-!1,t.autoScroll=!0,G(P),mxEvent.consume(P))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(P){t.isMouseDown&&null!=t.graphHandler.first&&(t.graphHandler.resume(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(P){y.style.backgroundColor="#f1f3f4";P.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
-P.stopPropagation();P.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(P){y.style.cursor="";y.style.backgroundColor="";0<P.dataTransfer.files.length&&this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,F,H,S,V,M,W,U,X){if(null!=J&&"image/"==F.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,V,M),J)],J[0].vertex=!0,
-E(J,new mxRectangle(0,0,V,M),P,mxEvent.isAltDown(P)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var u=!1,D=mxUtils.bind(this,function(K,T){null!=K&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(K),null!=T&&0<T.length&&(K=T));if(null!=K)if(K=mxUtils.parseXml(K),"mxlibrary"==K.documentElement.nodeName)try{var N=JSON.parse(mxUtils.getTextContent(K.documentElement));x(N,y);g=g.concat(N);C(P);this.spinner.stop();
-u=!0}catch(ba){}else if("mxfile"==K.documentElement.nodeName)try{var Q=K.documentElement.getElementsByTagName("diagram");for(N=0;N<Q.length;N++){var R=this.stringToCells(Editor.getDiagramNodeXml(Q[N])),Y=this.editor.graph.getBoundingBoxFromGeometry(R);E(R,new mxRectangle(0,0,Y.width,Y.height),P)}u=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
-(q.parentNode.removeChild(q),q=null)});null!=X&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(K){D(K,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,W)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?D(K.responseText,"text/xml"):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):D(J,F)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(y,"dragleave",function(P){y.style.cursor="";y.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));B.insertBefore(I,B.firstChild);mxEvent.addListener(I,"click",L);mxEvent.addListener(y,
-"dblclick",function(P){mxEvent.getSource(P)==y&&L(P)});l=I.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));B.insertBefore(l,B.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
-mxUtils.bind(this,function(P){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(P)})),B.insertBefore(l,B.firstChild))}A.appendChild(B);A.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
+EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(N,I){0==N.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
+I.appendChild(q)):this.addLibraryEntries(N,I)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(N){x(g,N)}));this.repositionLibrary(p);var z=y.parentNode.previousSibling;l=z.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var A=document.createElement("div");
+A.style.position="absolute";A.style.right="0px";A.style.top="0px";A.style.padding="8px";A.style.backgroundColor="inherit";z.style.position="relative";var K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("close"));K.setAttribute("valign","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.top="2px";K.style.width="14px";K.style.cursor="pointer";K.style.margin="0 3px";Editor.isDarkMode()&&(K.style.filter="invert(100%)");
+var P=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var I=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=P?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I();mxEvent.consume(N)}}));if(d.isEditable()){var L=this.editor.graph,u=null,D=mxUtils.bind(this,function(N){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
+mxEvent.consume(N)}),B=mxUtils.bind(this,function(N){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=K.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",A.insertBefore(u,A.firstChild),z.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),
+z.style.paddingRight=18*A.childNodes.length+"px")})):null==P&&(P=K.cloneNode(!1),P.setAttribute("src",Editor.saveImage),P.setAttribute("title",mxResources.get("save")),A.insertBefore(P,A.firstChild),mxEvent.addListener(P,"click",mxUtils.bind(this,function(I){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==P||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",P.parentNode.removeChild(P),P=null)});mxEvent.consume(I)})),z.style.paddingRight=
+18*A.childNodes.length+"px")}),C=mxUtils.bind(this,function(N,I,F,H){N=L.cloneCells(mxUtils.sortCells(L.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var W=L.getCellGeometry(N[R]);null!=W&&W.translate(-I.x,-I.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,I.width,I.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:I.width,h:I.height};null!=H&&(N.title=H);g.push(N);B(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
+q=null)}),G=mxUtils.bind(this,function(N){if(L.isSelectionEmpty())L.getRubberband().isActive()?(L.getRubberband().execute(N),L.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=L.getSelectionCells(),F=L.view.getBounds(I),H=L.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=L.view.translate.x;F.y-=L.view.translate.y;C(I,F)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){L.isMouseDown&&
+null!=L.panningManager&&null!=L.graphHandler.first&&(L.graphHandler.suspend(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",L.panningManager.stop(),L.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.panningManager&&null!=L.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,L.panningManager.stop(),L.graphHandler.reset(),L.isMouseDown=
+!1,L.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.graphHandler.first&&(L.graphHandler.resume(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",L.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(N){y.style.backgroundColor="#f1f3f4";N.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
+N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(I,F,H,R,W,J,V,U,X){if(null!=I&&"image/"==F.substring(0,6))I="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(I),I=[new mxCell("",new mxGeometry(0,0,W,J),I)],I[0].vertex=!0,
+C(I,new mxRectangle(0,0,W,J),N,mxEvent.isAltDown(N)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var t=!1,E=mxUtils.bind(this,function(M,T){null!=M&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(M),null!=T&&0<T.length&&(M=T));if(null!=M)if(M=mxUtils.parseXml(M),"mxlibrary"==M.documentElement.nodeName)try{var O=JSON.parse(mxUtils.getTextContent(M.documentElement));x(O,y);g=g.concat(O);B(N);this.spinner.stop();
+t=!0}catch(ba){}else if("mxfile"==M.documentElement.nodeName)try{var Q=M.documentElement.getElementsByTagName("diagram");for(O=0;O<Q.length;O++){var S=this.stringToCells(Editor.getDiagramNodeXml(Q[O])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),N)}t=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
+(q.parentNode.removeChild(q),q=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(M){E(M,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),200<=M.status&&299>=M.status?E(M.responseText,"text/xml"):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):E(I,F)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));K=K.cloneNode(!1);K.setAttribute("src",Editor.editImage);K.setAttribute("title",mxResources.get("edit"));A.insertBefore(K,A.firstChild);mxEvent.addListener(K,"click",D);mxEvent.addListener(y,
+"dblclick",function(N){mxEvent.getSource(N)==y&&D(N)});l=K.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
+mxUtils.bind(this,function(N){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(N)})),A.insertBefore(l,A.firstChild))}z.appendChild(A);z.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
"image="+p,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(p=this.stringToCells(Graph.decompress(l.xml)),0<p.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(p,l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",
STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName=
"darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource=
@@ -11796,28 +11797,28 @@ startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,l){l||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,l,p){d=new LibraryDialog(this,d,g,k,l,p);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,
function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow=
"hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,
-function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,l,p,q,x){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{x?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(z){}if(null!=A||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),I=null;g=null!=g?g:mxResources.get("error");if(null!=A){null!=A.retry&&(B=mxResources.get("cancel"),I=function(){y();A.retry()});if(404==A.code||404==A.status||403==A.code){x=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var O=null!=p?null:null!=q?q:window.location.hash;if(null!=O&&("#G"==O.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==O.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==A.code||404==A.status)){O="#U"==O.substring(0,
-2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function z(){G.innerHTML="";for(var P=0;P<L.length;P++){var J=document.createElement("option");mxUtils.write(J,L[P].displayName);J.value=P;G.appendChild(J);J=document.createElement("option");J.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(J,"<"+L[P].email+">");J.setAttribute("disabled","disabled");G.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=L.length;G.appendChild(J)}var L=this.drive.getUsersList(),C=document.createElement("div"),E=document.createElement("span");E.style.marginTop="6px";mxUtils.write(E,mxResources.get("changeUser")+": ");C.appendChild(E);var G=document.createElement("select");G.style.width="200px";z();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var P=G.value,J=L.length!=P;J&&this.drive.setUser(L[P]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(L=this.drive.getUsersList(),z())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));C.appendChild(G);C=new CustomDialog(this,C,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(C.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=A.message?
-x=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?x=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(x=mxUtils.htmlEntities(A)))}var t=q=null;null!=A&&null!=A.helpLink?(q=mxResources.get("help"),t=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(g,x,B,k,I,null,null,q,t,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
+function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,l,p,q,x){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{x?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(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),K=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=z.retry&&(A=mxResources.get("cancel"),K=function(){y();z.retry()});if(404==z.code||404==z.status||403==z.code){x=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var P=null!=p?null:null!=q?q:window.location.hash;if(null!=P&&("#G"==P.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==P.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==z.code||404==z.status)){P="#U"==P.substring(0,
+2)?P.substring(45,P.lastIndexOf("%26ex")):P.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+P);this.handleError(d,g,k,l,p)}),K,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerHTML="";for(var N=0;N<D.length;N++){var I=document.createElement("option");mxUtils.write(I,D[N].displayName);I.value=N;G.appendChild(I);I=document.createElement("option");I.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(I,"<"+D[N].email+">");I.setAttribute("disabled","disabled");G.appendChild(I)}I=document.createElement("option");mxUtils.write(I,mxResources.get("addAccount"));I.value=D.length;G.appendChild(I)}var D=this.drive.getUsersList(),B=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");B.appendChild(C);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var N=G.value,I=D.length!=N;I&&this.drive.setUser(D[N]);this.drive.authorize(I,mxUtils.bind(this,function(){I||(D=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
+x=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?x=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(x=mxUtils.htmlEntities(z)))}var L=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),L=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+z.ownerEmail+")"),L=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,K,null,null,q,L,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
d.init()};EditorUi.prototype.confirm=function(d,g,k,l,p,q){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){x();null!=g&&g()},function(){x();null!=k&&k()},l,p,null,null,null,null,y);this.showDialog(d.container,340,46+y,!0,q);d.init()};EditorUi.prototype.showBanner=function(d,g,k,l){var p=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=
mxSettings.settings["close"+d])){var q=document.createElement("div");q.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";
p=document.createElement("img");p.setAttribute("src",IMAGE_PATH+"/logo.png");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(p);p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
q.appendChild(p);mxUtils.write(q,g);document.body.appendChild(q);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("id","geDoNotShowAgainCheckbox");x.style.marginRight="6px";if(!l){g.appendChild(x);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));g.appendChild(y);
-q.style.paddingBottom="30px";q.appendChild(g)}var A=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);A()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){var O=mxEvent.getSource(I);O!=x&&O!=y?(null!=k&&k(),A(),mxEvent.consume(I)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+q.style.paddingBottom="30px";q.appendChild(g)}var z=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(K){mxEvent.consume(K);z()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){z()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(K){var P=mxEvent.getSource(K);P!=x&&P!=y?(null!=k&&k(),z(),mxEvent.consume(K)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,l){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,l,p){var q="jpeg"==k?"jpg":k;l=this.getBaseFilename(l)+(null!=g?".drawio":"")+"."+q;d=this.createImageDataUri(d,
g,k,p);this.saveData(l,q,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,l,p,q){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),
k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,l);else{var x=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof x.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):
-!1)?!1:q}if(q||this.isOffline()){x.href=URL.createObjectURL(l?this.base64ToBlob(d,k):new Blob([d],{type:k}));q?x.download=g:x.setAttribute("target","_blank");document.body.appendChild(x);try{window.setTimeout(function(){URL.revokeObjectURL(x.href)},2E4),x.click(),x.parentNode.removeChild(x)}catch(A){}}else this.createEchoRequest(d,g,k,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,l,p,q){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
-k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),A=Array(y-x),B=0;x<y;++B,++x)A[B]=d[x].charCodeAt(0);p[q]=new Uint8Array(A)}return new Blob(p,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,l,p,q,x,y){q=null!=q?q:!1;x=null!=x?x:"vsdx"!=
-p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var A=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,I){try{if("_blank"==I)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var O=new EmbedDialog(this,d);this.showDialog(O.container,450,240,!0,!0);O.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(d,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(d,B,k,l,null,y):null!=B&&0<B.length&&this.pickFolder(I,mxUtils.bind(this,function(z){try{this.exportFile(d,B,k,l,I,z)}catch(L){this.handleError(L)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,A,d,k,l);q=this.isServices(p)?p>A?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
+!1)?!1:q}if(q||this.isOffline()){x.href=URL.createObjectURL(l?this.base64ToBlob(d,k):new Blob([d],{type:k}));q?x.download=g:x.setAttribute("target","_blank");document.body.appendChild(x);try{window.setTimeout(function(){URL.revokeObjectURL(x.href)},2E4),x.click(),x.parentNode.removeChild(x)}catch(z){}}else this.createEchoRequest(d,g,k,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,l,p,q){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
+k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),z=Array(y-x),A=0;x<y;++A,++x)z[A]=d[x].charCodeAt(0);p[q]=new Uint8Array(z)}return new Blob(p,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,l,p,q,x,y){q=null!=q?q:!1;x=null!=x?x:"vsdx"!=
+p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var z=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(A,K){try{if("_blank"==K)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var P=new EmbedDialog(this,d);this.showDialog(P.container,450,240,!0,!0);P.init()}else{var L=window.open("about:blank");null==L?mxUtils.popup(d,!0):(L.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),L.document.close())}else K==App.MODE_DEVICE||"download"==K?this.doSaveLocalFile(d,A,k,l,null,y):null!=A&&0<A.length&&this.pickFolder(K,mxUtils.bind(this,function(u){try{this.exportFile(d,A,k,l,K,u)}catch(D){this.handleError(D)}}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,z,d,k,l);q=this.isServices(p)?p>z?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
function(d,g,k){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"==g?l.document.write("<html>"+d+"</html>"):(d=k?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+d+'"/></html>')):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(l){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -11828,149 +11829,149 @@ Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListen
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(l){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);
else{this.exportDialog=document.createElement("div");var q=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=q.zIndex;var x=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});x.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(y){x.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",A);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?
-this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var A=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,I){if("_blank"==I||null!=B&&0<B.length){var O=k("_blank"==I?null:B,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");
-null!=O&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?O.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,B,q,!0,I,t)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),B,q,!0,I,t)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(z){this.spinner.stop();this.handleError(z)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,A,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!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,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
-g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,A,B,I,O,t,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var L=this.editor.graph.isSelectionEmpty();k=null!=k?k:L;var C=g?null:this.editor.graph.background;C==mxConstants.NONE&&(C=null);null==C&&0==g&&(C=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var E=this.editor.graph.getSvg(C,d,x,y,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!t,I,O);l&&this.editor.graph.addSvgShadow(E);var G=
-this.getBaseFilename()+(p?".drawio":"")+".svg";z=null!=z?z:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var P=mxUtils.bind(this,function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,A,null,null,null,!1));z(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(E);var J=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,P,this.thumbImageCache)):P(F)});t?this.embedFonts(E,J):(this.editor.addFontCss(E),J(E))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
-y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();A.id=x;null!=y&&A.setAttribute("name",y);k&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);l&&A.setAttribute("disabled","disabled");q&&(d.appendChild(A),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return A};EditorUi.prototype.addEditButton=function(d,
+function(y){x.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",z);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?
+this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var z=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(A,K){if("_blank"==K||null!=A&&0<A.length){var P=k("_blank"==K?null:A,K==App.MODE_DEVICE||"download"==K||null==K||"_blank"==K?"0":"1");
+null!=P&&(K==App.MODE_DEVICE||"download"==K||"_blank"==K?P.simulate(document,"_blank"):this.pickFolder(K,mxUtils.bind(this,function(L){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,K,L)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),A,q,!0,K,L)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,z,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!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,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
+g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var D=this.editor.graph.isSelectionEmpty();k=null!=k?k:D;var B=g?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==g&&(B=K?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var C=this.editor.graph.getSvg(B,d,x,y,null,k,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!L,K,P);l&&this.editor.graph.addSvgShadow(C);var G=
+this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var N=mxUtils.bind(this,function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var I=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,N,this.thumbImageCache)):N(F)});L?this.embedFonts(C,I):(this.editor.addFontCss(C),I(C))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
+y){q=null!=q?q:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();z.id=x;null!=y&&z.setAttribute("name",y);k&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);l&&z.setAttribute("disabled","disabled");q&&(d.appendChild(z),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,
g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));q.appendChild(l);
l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");q.appendChild(l);d.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var x=new FilenameDialog(this,p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(x.container,300,80,!0,!1);x.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
function(){k.checked&&(null==g||g.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",
y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");x.innerHTML="";x.appendChild(y)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));
l.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));l.appendChild(p);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(g));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+
-":");var q="#0000ff",x=null;x=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(A){q=A;k()});mxEvent.consume(y)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";d.appendChild(x);mxUtils.br(d);return{getColor:function(){return q},getTarget:function(){return l.value},
+":");var q="#0000ff",x=null;x=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(z){q=z;k()});mxEvent.consume(y)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";d.appendChild(x);mxUtils.br(d);return{getColor:function(){return q},getTarget:function(){return l.value},
focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,l,p,q,x){x=null!=x?x:[];l&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=p&&0<p.length&&x.push("edit="+encodeURIComponent(p)),q&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(d,g,k,l,p,q,x,y,A,B){A=this.createUrlParameters(d,g,k,l,p,q,A);d=this.getCurrentFile();g=!0;null!=x?k="#U"+encodeURIComponent(x):(d=this.getCurrentFile(),y||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&
-null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(A.push("open="+k.substring(1)),k="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,A,B,I,O){this.getBasenames();var t={};""!=
-p&&p!=mxConstants.NONE&&(t.highlight=p);"auto"!==l&&(t.target=l);B||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(t.zoom=k/100);k=[];x&&(k.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),t.resize=!0);y&&k.push("layers");A&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),t.toolbar=k.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=d?t.url=d:t.xml=this.getFileData(!0,
-null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";O(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+this.currentPage!=this.pages[0]&&x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(d,g,k,l,p,q,x,y,z,A){z=this.createUrlParameters(d,g,k,l,p,q,z);d=this.getCurrentFile();g=!0;null!=x?k="#U"+encodeURIComponent(x):(d=this.getCurrentFile(),y||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&
+null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(d.getTitle()));A&&1<k.length&&(z.push("open="+k.substring(1)),k="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,z,A,K,P){this.getBasenames();var L={};""!=
+p&&p!=mxConstants.NONE&&(L.highlight=p);"auto"!==l&&(L.target=l);A||(L.lightbox=!1);L.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(L.zoom=k/100);k=[];x&&(k.push("pages"),L.resize=!0,null!=this.pages&&null!=this.currentPage&&(L.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),L.resize=!0);y&&k.push("layers");z&&k.push("tags");0<k.length&&(A&&k.push("lightbox"),L.toolbar=k.join(" "));null!=K&&0<K.length&&(L.edit=K);null!=d?L.url=d:L.xml=this.getFileData(!0,
+null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(L))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";P(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,l){var p=document.createElement("div");p.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var x=document.createElement("div");x.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");
-y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");x.appendChild(q);var A=document.createElement("span");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(A);mxUtils.br(x);x.appendChild(y);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));x.appendChild(A);var B=this.getCurrentFile();
-null==k&&null!=B&&B.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),x.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(B.getId())})));q.setAttribute("checked","checked");null==k&&y.setAttribute("disabled","disabled");p.appendChild(x);var I=this.addLinkSection(p),O=this.addCheckbox(p,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(p,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";p.appendChild(t);var z=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var L=L=this.addCheckbox(p,mxResources.get("allPages"),x,!x),C=this.addCheckbox(p,mxResources.get("layers"),!0),E=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,
-mxResources.get("lightbox"),!0),P=null;x=380;if(EditorUi.enableHtmlEditOption){P=this.addEditButton(p,G);var J=P.getEditInput();J.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&G.checked?P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,O.checked,t.value,I.getTarget(),
-I.getColor(),z.checked,L.checked,C.checked,E.checked,G.checked,null!=P?P.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(B);var I=this.getCurrentFile();d=0;if(null==
-I||I.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var O=document.createElement("div");O.style.whiteSpace="normal";mxUtils.write(O,mxResources.get("linkAccountRequired"));B.appendChild(O);O=
-mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));O.style.marginTop="12px";O.className="geBtn";B.appendChild(O);A.appendChild(B);O=document.createElement("a");O.style.paddingLeft="12px";O.style.color="gray";O.style.fontSize="11px";O.style.cursor="pointer";mxUtils.write(O,mxResources.get("check"));B.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var t=null,z=null;if(null!=k||null!=l)d+=30,mxUtils.write(A,mxResources.get("width")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",
-t.value="100%",A.appendChild(t),mxUtils.write(A,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=l+"px",A.appendChild(z),mxUtils.br(A);var L=this.addLinkSection(A,q);k=null!=this.pages&&1<this.pages.length;var C=null;if(null==I||I.constructor!=window.DriveFile||g)C=this.addCheckbox(A,mxResources.get("allPages"),k,!k);var E=this.addCheckbox(A,mxResources.get("lightbox"),!0,
-null,null,!q),G=this.addEditButton(A,E),P=G.getEditInput();q&&(P.style.marginLeft=E.style.marginLeft,E.style.display="none",d-=20);var J=this.addCheckbox(A,mxResources.get("layers"),!0);J.style.marginLeft=P.style.marginLeft;J.style.marginTop="8px";var F=this.addCheckbox(A,mxResources.get("tags"),!0);F.style.marginLeft=P.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(J.removeAttribute("disabled"),P.removeAttribute("disabled")):
-(J.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&E.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,A,mxUtils.bind(this,function(){p(L.getTarget(),L.getColor(),null==C?!0:C.checked,E.checked,G.getLink(),J.checked,null!=t?t.value:null,null!=z?z.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):L.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var B=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),I=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var O=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=O&&(O.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var t=parseInt(y.value)/100||1,z=parseInt(A.value)||0;k(!B.checked,null!=I?I.checked:!1,null!=O?O.checked:!1,t,z)}),null,d,g);
-this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,A){x=null!=x?x:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph,O="jpeg"==y?220:300,t=document.createElement("h3");mxUtils.write(t,d);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";B.appendChild(t);mxUtils.write(B,mxResources.get("zoom")+":");var z=document.createElement("input");
-z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=this.lastExportZoom||"100%";B.appendChild(z);mxUtils.write(B,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";B.appendChild(L);mxUtils.br(B);var C=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,
-I.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var P={};for(t=0;t<d.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!=d[t]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[t]));J.setAttribute("value",
-d[t]);G.appendChild(J);P[d[t]]=J}A?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(G),mxUtils.br(B),O+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(C.checked=!0)})):q&&(B.appendChild(E),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),O+=30,mxEvent.addListener(C,"change",function(){C.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));I.isSelectionEmpty()?A&&(C.style.display="none",C.nextSibling.style.display="none",C.nextSibling.nextSibling.style.display=
-"none",O-=30):(G.value="diagram",E.setAttribute("checked","checked"),E.defaultChecked=!0,mxEvent.addListener(C,"change",function(){G.value=C.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(B,mxResources.get("dark"),!0),O+=26);var S=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible),V=null;if("png"==y||"jpeg"==y)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),O+=30;var M=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);M.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 U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
+y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");x.appendChild(q);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(z);mxUtils.br(x);x.appendChild(y);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));x.appendChild(z);var A=this.getCurrentFile();
+null==k&&null!=A&&A.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),x.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId())})));q.setAttribute("checked","checked");null==k&&y.setAttribute("disabled","disabled");p.appendChild(x);var K=this.addLinkSection(p),P=this.addCheckbox(p,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(p,":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value="100%";p.appendChild(L);var u=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var D=D=this.addCheckbox(p,mxResources.get("allPages"),x,!x),B=this.addCheckbox(p,mxResources.get("layers"),!0),C=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,
+mxResources.get("lightbox"),!0),N=null;x=380;if(EditorUi.enableHtmlEditOption){N=this.addEditButton(p,G);var I=N.getEditInput();I.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&G.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,P.checked,L.value,K.getTarget(),
+K.getColor(),u.checked,D.checked,B.checked,C.checked,G.checked,null!=N?N.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var z=document.createElement("div");z.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,d||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(A);var K=this.getCurrentFile();d=0;if(null==
+K||K.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var P=document.createElement("div");P.style.whiteSpace="normal";mxUtils.write(P,mxResources.get("linkAccountRequired"));A.appendChild(P);P=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(K.getId())}));P.style.marginTop="12px";P.className="geBtn";A.appendChild(P);z.appendChild(A);P=document.createElement("a");P.style.paddingLeft="12px";P.style.color="gray";P.style.fontSize="11px";P.style.cursor="pointer";mxUtils.write(P,mxResources.get("check"));A.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
+mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var L=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),L=document.createElement("input"),L.setAttribute("type","text"),L.style.marginRight="16px",L.style.width="50px",L.style.marginLeft="6px",L.style.marginRight="16px",L.style.marginBottom="10px",
+L.value="100%",z.appendChild(L),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=l+"px",z.appendChild(u),mxUtils.br(z);var D=this.addLinkSection(z,q);k=null!=this.pages&&1<this.pages.length;var B=null;if(null==K||K.constructor!=window.DriveFile||g)B=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var C=this.addCheckbox(z,mxResources.get("lightbox"),!0,
+null,null,!q),G=this.addEditButton(z,C),N=G.getEditInput();q&&(N.style.marginLeft=C.style.marginLeft,C.style.display="none",d-=20);var I=this.addCheckbox(z,mxResources.get("layers"),!0);I.style.marginLeft=N.style.marginLeft;I.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=N.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(I.removeAttribute("disabled"),N.removeAttribute("disabled")):
+(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(D.getTarget(),D.getColor(),null==B?!0:B.checked,C.checked,G.getLink(),I.checked,null!=L?L.value:null,null!=u?u.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=L?(L.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):D.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
+y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";q.appendChild(z);mxUtils.br(q)}var A=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),K=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var P=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=P&&(P.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var L=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=K?K.checked:!1,null!=P?P.checked:!1,L,u)}),null,d,g);
+this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,z){x=null!=x?x:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var K=this.editor.graph,P="jpeg"==y?220:300,L=document.createElement("h3");mxUtils.write(L,d);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(L);mxUtils.write(A,mxResources.get("zoom")+":");var u=document.createElement("input");
+u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";A.appendChild(u);mxUtils.write(A,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";A.appendChild(D);mxUtils.br(A);var B=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,
+K.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var N={};for(L=0;L<d.length;L++)if(!K.isSelectionEmpty()||"selectionOnly"!=d[L]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(d[L]));I.setAttribute("value",
+d[L]);G.appendChild(I);N[d[L]]=I}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),P+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(A.appendChild(C),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),P+=30,mxEvent.addListener(B,"change",function(){B.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));K.isSelectionEmpty()?z&&(B.style.display="none",B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display=
+"none",P-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(A,mxResources.get("dark"),!0),P+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),K.shadowVisible),W=null;if("png"==y||"jpeg"==y)W=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),P+=30;var J=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);J.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
U.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(q);mxEvent.addListener(U,"change",mxUtils.bind(this,
-function(){"lblToSvg"==U.value?(W.checked=!0,W.setAttribute("disabled","disabled"),P.page.style.display="none","page"==G.value&&(G.value="diagram"),S.checked=!1,S.setAttribute("disabled","disabled"),u.style.display="inline-block",X.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),S.removeAttribute("disabled"),P.page.style.display="",u.style.display="none",X.style.display="")}));g&&(B.appendChild(W),mxUtils.write(B,mxResources.get("embedImages")),
-mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(U),mxUtils.br(B),O+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));X.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));X.appendChild(g);
-g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));X.appendChild(g);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==y&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(X),B.appendChild(u),mxUtils.br(B),mxUtils.br(B),O+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=L.value;this.lastExportZoom=z.value;
-p(z.value,F.checked,!C.checked,S.checked,M.checked,W.checked,L.value,E.checked,!1,X.value,null!=V?V.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
-var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var A=this.addCheckbox(q,mxResources.get("fit"),!0),B=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),I=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),t=this.addEditButton(q,O),z=t.getEditInput(),L=1<x.model.getChildCount(x.model.getRoot()),C=this.addCheckbox(q,mxResources.get("layers"),
-L,!L);C.style.marginLeft=z.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(L&&C.removeAttribute("disabled"),z.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&O.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(A.checked,B.checked,I.checked,
-O.checked,t.getLink(),C.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function A(z){var L=" ",C="";l&&(L=" 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!=I?"&page="+I:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",C+="cursor:pointer;");d&&(C+="max-width:100%;");var E="";k&&(E=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');x('<img src="'+z+'"'+E+(""!=C?' style="'+C+'"':"")+L+"/>")}var B=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(z){var L=l?this.getFileData(!0):null;z=
-this.createImageDataUri(z,L,"png");A(z)}),null,null,null,mxUtils.bind(this,function(z){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var O="";k&&(O="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+O+"&xml="+encodeURIComponent(g));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
-299>=t.getStatus()?A("data:image/png;base64,"+t.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),A=y.getElementsByTagName("a");if(null!=A)for(var B=0;B<A.length;B++){var I=A[B].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==A[B].getAttribute("target")&&A[B].removeAttribute("target")}l&&
-y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var O=" ",t="";l&&(O="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");d&&(t+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(z){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(z))+'"'+(""!=t?' style="'+t+'"':"")+O+"/>")}))}else t="",l&&(g=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),t+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=t&&y.setAttribute("style",t),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
+function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),N.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),t.style.display="inline-block",X.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),N.page.style.display="",t.style.display="none",X.style.display="")}));g&&(A.appendChild(V),mxUtils.write(A,mxResources.get("embedImages")),
+mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(U),mxUtils.br(A),P+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));X.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));X.appendChild(g);
+g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));X.appendChild(g);var t=document.createElement("div");mxUtils.write(t,mxResources.get("LinksLost"));t.style.margin="7px";t.style.display="none";"svg"==y&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(X),A.appendChild(t),mxUtils.br(A),mxUtils.br(A),P+=50);k=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=D.value;this.lastExportZoom=u.value;
+p(u.value,F.checked,!B.checked,R.checked,J.checked,V.checked,D.value,C.checked,!1,X.value,null!=W?W.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,P,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
+var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var z=this.addCheckbox(q,mxResources.get("fit"),!0),A=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),K=this.addCheckbox(q,k),P=this.addCheckbox(q,mxResources.get("lightbox"),!0),L=this.addEditButton(q,P),u=L.getEditInput(),D=1<x.model.getChildCount(x.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),
+D,!D);B.style.marginLeft=u.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(P,"change",function(){P.checked?(D&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&P.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,K.checked,
+P.checked,L.getLink(),B.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function z(u){var D=" ",B="";l&&(D=" 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!=K?"&page="+K:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");d&&(B+="max-width:100%;");var C="";k&&(C=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');x('<img src="'+u+'"'+C+(""!=B?' style="'+B+'"':"")+D+"/>")}var A=this.editor.graph.getGraphBounds(),K=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var D=l?this.getFileData(!0):null;u=
+this.createImageDataUri(u,D,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),A.width*A.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var P="";k&&(P="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var L=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+P+"&xml="+encodeURIComponent(g));L.send(mxUtils.bind(this,function(){200<=L.getStatus()&&
+299>=L.getStatus()?z("data:image/png;base64,"+L.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=y.getElementsByTagName("a");if(null!=z)for(var A=0;A<z.length;A++){var K=z[A].getAttribute("href");null!=K&&"#"==K.charAt(0)&&"_blank"==z[A].getAttribute("target")&&z[A].removeAttribute("target")}l&&
+y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var P=" ",L="";l&&(P="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
+"")+"');}})(this);\"",L+="cursor:pointer;");d&&(L+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(u){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=L?' style="'+L+'"':"")+P+"/>")}))}else L="",l&&(g=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),L+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),L+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=L&&y.setAttribute("style",L),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){k=l[0];var p=g.getGlobalVariable;g.getGlobalVariable=function(q){return"page"==q?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:p.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}l=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(q){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=
d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(g=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(k=l))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,l,p){try{var q=this.editor.graph,x=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=k&&0<k.length)q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&q.setBackgroundImage(B.viewState.backgroundImage);q.getGlobalVariable=function(I){return"page"==I?B.getName():"pagenumber"==I?1:A.apply(this,
-arguments)};document.body.appendChild(q.container);q.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var O=I.toDataURL("image/png");O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(y));d(O.substring(O.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(t){null!=g&&g(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=g&&
-g(I)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(I){null!=g&&g(I)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,A,B,I,O,t){y=null!=y?y:!0;I=null!=I?I:0;x=null!=A?A:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,B,I,null,null,q,null,null,null,g.shadowVisible||O,null,t,"diagram");(g.shadowVisible||O)&&g.addSvgShadow(q,null,null,0==I);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var z=mxUtils.bind(this,function(L){L=
-(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(L);null!=p&&p(L);return L});g.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(L){y?this.editor.convertImages(L,mxUtils.bind(this,function(C){z(C)})):z(L)}));else return z(q)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,A,B,I,O,t){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var z=this.editor.graph.isSelectionEmpty();k=null!=k?k:z;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(L){this.spinner.stop();try{this.saveCanvas(L,
-p?this.getFileData(!0,null,null,null,k,y):null,A,null==this.pages||0==this.pages.length,I)}catch(C){this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}),null,k,d||1,g,l,null,null,q,x,B,O,t)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var A=
-this.editor.graph;if(null!=d&&0<d.length){A.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var I=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var O=I.getElementsByTagName("diagram");if(1==O.length&&!q){if(I=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(d[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=O[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,t))}}else if(0<O.length){q=[];var z=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[O[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(O[0]),l=!1,z=1);for(;z<O.length;z++){var L=O[z].getAttribute("id");O[z].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(O[z]));d[L]=O[z].getAttribute("id");var E=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[E+1]));A.model.execute(new ChangePage(this,C,C,E,
-!0));q.push(C)}this.updatePageLinks(d,q)}}if(null!=I&&"mxGraphModel"===I.nodeName){y=A.importGraphModel(I,g,k,l);if(null!=y)for(z=0;z<y.length;z++)this.updatePageLinksForCell(d,y[z]);var G=A.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var P=new ChangePageSetup(this,null,G);P.ignoreColor=!0;A.model.execute(P)}}x&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(J){if(p)throw J;
-this.handleError(J)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
+!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var z=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&q.setBackgroundImage(A.viewState.backgroundImage);q.getGlobalVariable=function(K){return"page"==K?A.getName():"pagenumber"==K?1:z.apply(this,
+arguments)};document.body.appendChild(q.container);q.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var P=K.toDataURL("image/png");P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(y));d(P.substring(P.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(L){null!=g&&g(L)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&
+g(K)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,z,A,K,P,L){y=null!=y?y:!0;K=null!=K?K:0;x=null!=z?z:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,A,K,null,null,q,null,null,null,g.shadowVisible||P,null,L,"diagram");(g.shadowVisible||P)&&g.addSvgShadow(q,null,null,0==K);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var u=mxUtils.bind(this,function(D){D=
+(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(D);null!=p&&p(D);return D});g.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(D){y?this.editor.convertImages(D,mxUtils.bind(this,function(B){u(B)})):u(D)}));else return u(q)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,z,A,K,P,L){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(D){this.spinner.stop();try{this.saveCanvas(D,
+p?this.getFileData(!0,null,null,null,k,y):null,z,null==this.pages||0==this.pages.length,K)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,k,d||1,g,l,null,null,q,x,A,P,L)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var z=
+this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var A=mxUtils.parseXml(d);d={};var K=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=K&&"mxfile"==K.nodeName&&null!=this.pages){var P=K.getElementsByTagName("diagram");if(1==P.length&&!q){if(K=Editor.parseDiagramNode(P[0]),null!=this.currentPage&&(d[P[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var L=P[0].getAttribute("name");null!=L&&""!=L&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,L))}}else if(0<P.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[P[0].getAttribute("id")]=this.pages[0].getId(),K=Editor.parseDiagramNode(P[0]),l=!1,u=1);for(;u<P.length;u++){var D=P[u].getAttribute("id");P[u].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(P[u]));d[D]=P[u].getAttribute("id");var C=this.pages.length;null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[C+1]));z.model.execute(new ChangePage(this,B,B,C,
+!0));q.push(B)}this.updatePageLinks(d,q)}}if(null!=K&&"mxGraphModel"===K.nodeName){y=z.importGraphModel(K,g,k,l);if(null!=y)for(u=0;u<y.length;u++)this.updatePageLinksForCell(d,y[u]);var G=z.parseBackgroundImage(K.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var N=new ChangePageSetup(this,null,G);N.ignoreColor=!0;z.model.execute(N)}}x&&this.insertHandler(y,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(I){if(p)throw I;
+this.handleError(I)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
function(d,g){var k=document.createElement("div"),l=this.editor.graph,p=l.getLinkForCell(g);null!=p&&l.setLinkForCell(g,this.updatePageLink(d,p));if(l.isHtmlLabel(g)){k.innerHTML=l.sanitizeHtml(l.getLabel(g));for(var q=k.getElementsByTagName("a"),x=!1,y=0;y<q.length;y++)p=q[y].getAttribute("href"),null!=p&&(q[y].setAttribute("href",this.updatePageLink(d,p)),x=!0);x&&l.labelChanged(g,k.innerHTML)}for(y=0;y<l.model.getChildCount(g);y++)this.updatePageLinksForCell(d,l.model.getChildAt(g,y))};EditorUi.prototype.updatePageLink=
function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var l=JSON.parse(g.substring(17));if(null!=l.actions){for(var p=0;p<l.actions.length;p++){var q=l.actions[p];if(null!=q.open&&Graph.isPageLink(q.open)){var x=q.open.substring(q.open.indexOf(",")+1);k=d[x];null!=k?q.open="data:page/id,"+k:null==this.getPageById(x)&&delete q.open}}g="data:action/json,"+JSON.stringify(l)}}catch(y){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,l,p){l=null!=l?l:d.name;k=null!=k?k:mxUtils.bind(this,function(x){this.handleError(x)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var x=this.isRemoteVisioFormat(l);try{var y="UNKNOWN-VISIO",A=l.lastIndexOf(".");if(0<=A&&A<l.length)y=l.substring(A+1).toUpperCase();else{var B=l.lastIndexOf("/");0<=
-B&&B<l.length&&(l=l.substring(B+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(O){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=p&&I.setRequestHeader("x-convert-custom",p);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var O=I.response;if("text/xml"==O.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(z){try{g(z.target.result)}catch(L){k({message:mxResources.get("errorLoadingFile")})}});t.readAsText(O)}else this.doImportVisio(O,g,k,l)}catch(z){k(z)}else try{""==I.responseType||"text"==I.responseType?k({message:I.responseText}):(t=new FileReader,t.onload=
-function(){k({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(z){k({})}});I.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(O){k(O)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,l,p){l=null!=l?l:d.name;k=null!=k?k:mxUtils.bind(this,function(x){this.handleError(x)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var x=this.isRemoteVisioFormat(l);try{var y="UNKNOWN-VISIO",z=l.lastIndexOf(".");if(0<=z&&z<l.length)y=l.substring(z+1).toUpperCase();else{var A=l.lastIndexOf("/");0<=
+A&&A<l.length&&(l=l.substring(A+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(P){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var K=new XMLHttpRequest;K.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));K.responseType="blob";this.addRemoteServiceSecurityCheck(K);
+null!=p&&K.setRequestHeader("x-convert-custom",p);K.onreadystatechange=mxUtils.bind(this,function(){if(4==K.readyState)if(200<=K.status&&299>=K.status)try{var P=K.response;if("text/xml"==P.type){var L=new FileReader;L.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(D){k({message:mxResources.get("errorLoadingFile")})}});L.readAsText(P)}else this.doImportVisio(P,g,k,l)}catch(u){k(u)}else try{""==K.responseType||"text"==K.responseType?k({message:K.responseText}):(L=new FileReader,L.onload=
+function(){k({message:JSON.parse(L.result).Message})},L.readAsText(K.response))}catch(u){k({})}});K.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(P){k(P)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(p){k(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
JSON.parse(d);g(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&q.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var x=0;x<p.svgThumbs.length;x++)q.push(Editor.createSvgDataUri(p.svgThumbs[x]));null!=p.thumb&&q.push(p.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),k(y)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,
g,k,l){var p=this,q=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(x){try{if(mxClient.IS_IE||mxClient.IS_IE11)x=x.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(x).getElementsByTagName("svg");
-if(0<y.length){var A=parseFloat(y[0].getAttribute("width")),B=parseFloat(y[0].getAttribute("height"));if(isNaN(A)||isNaN(B))try{var I=y[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(I[2]);B=parseFloat(I[3])}catch(O){A=A||100,B=B||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),A,B)}else l({message:mxResources.get("invalidInput")})}catch(O){l(O)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,l){function p(y,A,B){c1=y>>2;c2=(y&3)<<4|A>>4;c3=(A&15)<<2|B>>6;c4=B&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(B){var I=new Image;I.onload=
-function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),E=mxUtils.parseXml(C).getElementsByTagName("svg");0<E.length&&(O=parseFloat(E[0].getAttribute("width")),t=parseFloat(E[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
-try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!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(t){4==
-t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var A=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B,
-g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var I=this.importXml(B,g,k,q,!0,y);if(0<I.length)return I}catch(t){}this.loadImage(d,mxUtils.bind(this,function(t){if("data:"==d.substring(0,5))this.resizeImage(t,d,mxUtils.bind(this,function(C,E,G){A.setSelectionCell(A.insertVertex(null,null,
-"",A.snap(g),A.snap(k),E,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(C)+";"))}),x,this.maxImageSize);else{var z=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),L=Math.round(t.width*z);t=Math.round(t.height*z);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(g),A.snap(k),L,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var t=null;A.getModel().beginUpdate();try{t=A.insertVertex(A.getDefaultParent(),null,d,A.snap(g),A.snap(k),1,1,"text;"+(l?"html=1;":"")),A.updateCellSize(t),A.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{A.getModel().endUpdate()}A.setSelectionCell(t)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(t){this.editor.graph.setSelectionCells(this.importXml(t,g,k,q,null,y))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{A=this.editor.graph;p=null;A.getModel().beginUpdate();try{p=A.insertVertex(A.getDefaultParent(),null,"",A.snap(g),A.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");p.value=d;A.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var O=A.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=O.width;p.geometry.height=O.height}Graph.isLink(p.value)&&A.setLinkForCell(p,p.value);p.geometry.width+=A.gridSize;p.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+if(0<y.length){var z=parseFloat(y[0].getAttribute("width")),A=parseFloat(y[0].getAttribute("height"));if(isNaN(z)||isNaN(A))try{var K=y[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(K[2]);A=parseFloat(K[3])}catch(P){z=z||100,A=A||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),z,A)}else l({message:mxResources.get("invalidInput")})}catch(P){l(P)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,l){function p(y,z,A){c1=y>>2;c2=(y&3)<<4|z>>4;c3=(z&15)<<2|A>>6;c4=A&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(A){var K=new Image;K.onload=
+function(){try{var P=K.width,L=K.height;if(0==P&&0==L){var u=z.result,D=u.indexOf(","),B=decodeURIComponent(escape(atob(u.substring(D+1)))),C=mxUtils.parseXml(B).getElementsByTagName("svg");0<C.length&&(P=parseFloat(C[0].getAttribute("width")),L=parseFloat(C[0].getAttribute("height")))}k(z.result,P,L)}catch(G){l(G)}};K.src=z.result};z.onerror=function(A){l(A)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
+try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!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(L){4==
+L.readyState&&200<=L.status&&299>=L.status&&this.editor.graph.setSelectionCells(this.insertTextAt(L.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var A=Editor.extractGraphModelFromPdf(d);if(null!=A&&0<A.length)return this.importXml(A,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(A=Editor.extractGraphModelFromPng(d),null!=A&&0<A.length))return this.importXml(A,
+g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(A=d.substring(d.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(d.substring(d.indexOf(",")+1));var K=this.importXml(A,g,k,q,!0,y);if(0<K.length)return K}catch(L){}this.loadImage(d,mxUtils.bind(this,function(L){if("data:"==d.substring(0,5))this.resizeImage(L,d,mxUtils.bind(this,function(B,C,G){z.setSelectionCell(z.insertVertex(null,null,
+"",z.snap(g),z.snap(k),C,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(B)+";"))}),x,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/L.width,this.maxImageSize/L.height)),D=Math.round(L.width*u);L=Math.round(L.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),D,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var L=null;z.getModel().beginUpdate();try{L=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(l?"html=1;":"")),z.updateCellSize(L),z.fireEvent(new mxEventObject("textInserted","cells",[L]))}finally{z.getModel().endUpdate()}z.setSelectionCell(L)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(L){this.editor.graph.setSelectionCells(this.importXml(L,g,k,q,null,y))}),mxUtils.bind(this,function(L){this.handleError(L)}));else{z=this.editor.graph;p=null;z.getModel().beginUpdate();try{p=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");p.value=d;z.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var P=z.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=P.width;p.geometry.height=P.height}Graph.isLink(p.value)&&z.setLinkForCell(p,p.value);p.geometry.width+=z.gridSize;p.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(x,y){StorageFile.listFiles(this,
-"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,A){StorageFile.getFileContent(this,x,y,A)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,A){StorageFile.deleteFile(this,x,y,A)});if(!g){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(x=new Blob([x],{type:"application/octet-stream"}),
-this.importVisio(x,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(x,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=l;q.apply(p,arguments);x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,A=!1;q.forEach(function(B,I){B=I.name.toLowerCase();"diagram/diagram.xml"==B?(A=!0,I.async("string").then(function(O){0==O.indexOf("<mxfile ")?g(O):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>x&&(x=B,y=I))});0<x?y.async("string").then(function(B){(new XMLHttpRequest).upload&&
-l.isRemoteFileFormat(B,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(B,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?g(I.responseText):k())}),d.name):k()}):A||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,A,B,I,O){B=null!=
-B?B:!0;var t=!1,z=null,L=mxUtils.bind(this,function(C){var E=null;null!=C&&"<mxlibrary"==C.substring(0,10)?this.loadLibrary(new LocalLibrary(this,C,x)):E=this.importXml(C,k,l,B,null,null!=O?mxEvent.isControlDown(O):null);null!=y&&y(E)});"image"==g.substring(0,5)?(A=!1,"image/png"==g.substring(0,9)&&(g=I?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(z=this.importXml(g,k,l,B,null,null!=O?mxEvent.isControlDown(O):null),A=!0)),A||(g=this.editor.graph,A=d.indexOf(";"),0<A&&(d=d.substring(0,
-A)+d.substring(d.indexOf(",",A+1))),B&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),z=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(t=!0,this.importGraphML(d,L)):null!=A&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(t=!0,this.importVisio(A,L)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,p=mxUtils.bind(this,function(C){4==C.readyState&&(200<=C.status&&299>=C.status?L(C.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(A,p,x)):0==d.indexOf("PK")&&null!=A?(t=!0,this.importZipFile(A,L,mxUtils.bind(this,function(){z=this.insertTextAt(this.validateFileData(d),k,l,!0,null,B);y(z)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(z=this.insertTextAt(this.validateFileData(d),
-k,l,!0,null,B,null,null!=O?mxEvent.isControlDown(O):null));t||null==y||y(z);return z};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,A,B,I,O,t){l=null!=l?l:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var z=null!=g&&null!=k,L=!0;g=null!=g?g:0;k=null!=k?k:0;var C=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var E=I||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>E){C=!0;break}var P=mxUtils.bind(this,function(){var J=
-this.editor.graph,F=J.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,u,D,K,T,N,Q,R){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,N)),null):this.importFile(U,X,u,D,K,T,N,Q,R,z,O,t)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){J.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,S=H,V=[],M=mxUtils.bind(this,function(U,X){V[U]=X;if(0==
---S){this.spinner.stop();if(null!=y)y(V);else{var u=[];J.getModel().beginUpdate();try{for(U=0;U<V.length;U++){var D=V[U]();null!=D&&(u=u.concat(D))}}finally{J.getModel().endUpdate()}}q(u)}}),W=0;W<H;W++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var u=new FileReader;u.onload=mxUtils.bind(this,function(D){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var K=Graph.clipSvgDataUri(D.target.result),T=K.indexOf(",");T=decodeURIComponent(escape(atob(K.substring(T+
-1))));var N=mxUtils.parseXml(T);T=N.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=O?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?M(U,mxUtils.bind(this,function(){try{if(null!=N){var ba=N.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],Z=ea.getAttribute("width"),fa=ea.getAttribute("height");
-Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var aa=ea.getAttribute("viewBox");if(null==aa||0==aa.length)ea.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),fa=parseFloat(va[3]))}K=Editor.createSvgDataUri(mxUtils.getXml(ea));var ja=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,fa)),Ba=p(K,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*ja)),Math.max(1,Math.round(fa*
-ja)),X.name);if(isNaN(Z)||isNaN(fa)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);fa=Math.max(1,Da.height);Ba[0].geometry.width=Z;Ba[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+Z+" "+fa);K=Editor.createSvgDataUri(mxUtils.getXml(ea));var qa=K.indexOf(";");0<qa&&(K=K.substring(0,qa)+K.substring(K.indexOf(",",qa+1)));J.setCellStyles("image",K,[Ba[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ba}}}catch(qa){}return null})):M(U,mxUtils.bind(this,
-function(){return p(Q,"text/xml",g+U*F,k+U*F,0,0,X.name)}))}else M(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var R=O?null:this.extractGraphModelFromPng(D.target.result);if(null!=R&&0<R.length){var Y=new Image;Y.src=D.target.result;M(U,mxUtils.bind(this,function(){return p(R,"text/xml",g+U*F,k+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(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(D.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,D.target.result,mxUtils.bind(this,function(ea,Z,fa){M(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<B){var aa=L&&this.isResampleImageSize(X.size,I)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),L,l,I,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else K=D.target.result,p(K,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){M(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(D){M(U,function(){return D})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?u.readAsDataURL(X):u.readAsText(X)}})(W)});if(C){C=
-[];for(G=0;G<d.length;G++)C.push(d[G]);d=C;this.confirmImageResize(function(J){L=J;P()},A)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.getFileContent(this,x,y,z)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.deleteFile(this,x,y,z)});if(!g){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(x=new Blob([x],{type:"application/octet-stream"}),
+this.importVisio(x,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(x,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=l;q.apply(p,arguments);x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,z=!1;q.forEach(function(A,K){A=K.name.toLowerCase();"diagram/diagram.xml"==A?(z=!0,K.async("string").then(function(P){0==P.indexOf("<mxfile ")?g(P):k()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>x&&(x=A,y=K))});0<x?y.async("string").then(function(A){(new XMLHttpRequest).upload&&
+l.isRemoteFileFormat(A,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(A,mxUtils.bind(this,function(K){4==K.readyState&&(200<=K.status&&299>=K.status?g(K.responseText):k())}),d.name):k()}):z||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,z,A,K,P){A=null!=
+A?A:!0;var L=!1,u=null,D=mxUtils.bind(this,function(B){var C=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,x)):C=this.importXml(B,k,l,A,null,null!=P?mxEvent.isControlDown(P):null);null!=y&&y(C)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=K?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,l,A,null,null!=P?mxEvent.isControlDown(P):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0,
+z)+d.substring(d.indexOf(",",z+1))),A&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),u=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(L=!0,this.importGraphML(d,D)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(L=!0,this.importVisio(z,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(L=!0,p=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?D(B.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(z,p,x)):0==d.indexOf("PK")&&null!=z?(L=!0,this.importZipFile(z,D,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,l,!0,null,A);y(u)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(u=this.insertTextAt(this.validateFileData(d),
+k,l,!0,null,A,null,null!=P?mxEvent.isControlDown(P):null));L||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,K,P,L){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var u=null!=g&&null!=k,D=!0;g=null!=g?g:0;k=null!=k?k:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var C=K||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>C){B=!0;break}var N=mxUtils.bind(this,function(){var I=
+this.editor.graph,F=I.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,t,E,M,T,O,Q,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,O)),null):this.importFile(U,X,t,E,M,T,O,Q,S,u,P,L)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){I.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,R=H,W=[],J=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
+--R){this.spinner.stop();if(null!=y)y(W);else{var t=[];I.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var E=W[U]();null!=E&&(t=t.concat(E))}}finally{I.getModel().endUpdate()}}q(t)}}),V=0;V<H;V++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var t=new FileReader;t.onload=mxUtils.bind(this,function(E){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var M=Graph.clipSvgDataUri(E.target.result),T=M.indexOf(",");T=decodeURIComponent(escape(atob(M.substring(T+
+1))));var O=mxUtils.parseXml(T);T=O.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=P?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?J(U,mxUtils.bind(this,function(){try{if(null!=O){var ba=O.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],Z=ea.getAttribute("width"),fa=ea.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var aa=ea.getAttribute("viewBox");if(null==aa||0==aa.length)ea.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),fa=parseFloat(va[3]))}M=Editor.createSvgDataUri(mxUtils.getXml(ea));var ja=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,fa)),Ba=p(M,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*ja)),Math.max(1,Math.round(fa*
+ja)),X.name);if(isNaN(Z)||isNaN(fa)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);fa=Math.max(1,Da.height);Ba[0].geometry.width=Z;Ba[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+Z+" "+fa);M=Editor.createSvgDataUri(mxUtils.getXml(ea));var qa=M.indexOf(";");0<qa&&(M=M.substring(0,qa)+M.substring(M.indexOf(",",qa+1)));I.setCellStyles("image",M,[Ba[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ba}}}catch(qa){}return null})):J(U,mxUtils.bind(this,
+function(){return p(Q,"text/xml",g+U*F,k+U*F,0,0,X.name)}))}else J(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var S=P?null:this.extractGraphModelFromPng(E.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=E.target.result;J(U,mxUtils.bind(this,function(){return p(S,"text/xml",g+U*F,k+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(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(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(ea,Z,fa){J(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<A){var aa=D&&this.isResampleImageSize(X.size,K)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,l,K,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else M=E.target.result,p(M,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){J(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){J(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?t.readAsDataURL(X):t.readAsText(X)}})(V)});if(B){B=
+[];for(G=0;G<d.length;G++)B.push(d[G]);d=B;this.confirmImageResize(function(I){D=I;N()},z)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!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):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),A=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var B=Math.max(y/p,A/p);if(1<B){var I=Math.round(y/B),O=Math.round(A/B),t=document.createElement("canvas");t.width=I;t.height=O;t.getContext("2d").drawImage(d,0,0,I,O);var z=
-t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(E){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),z=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var A=Math.max(y/p,z/p);if(1<A){var K=Math.round(y/A),P=Math.round(z/A),L=document.createElement("canvas");L.width=K;L.height=P;L.getContext("2d").drawImage(d,0,0,K,P);var u=
+L.toDataURL();if(u.length<g.length){var D=document.createElement("canvas");D.width=K;D.height=P;var B=D.toDataURL();u!==B&&(g=u,y=K,z=P)}}}catch(C){}k(g,y,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var m=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,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(E){var G=E.getEvent();return null==E.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==E.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(E,
-G,P){var J=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("plantUml")+":",J.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,J.format,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==J.format)g.labelChanged(E,"<pre>"+H+"</pre>"),g.updateCellSize(E,!0);else{g.setCellStyles("image",d.convertDataUri(H),[E]);var M=g.model.getGeometry(E);null!=M&&(M=M.clone(),M.width=S,M.height=V,g.cellsResized([E],[M],!1))}g.setAttributeForCell(E,
-"plantUmlData",JSON.stringify({data:F,format:J.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(E,G,P){var J=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("mermaid")+":",J.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,J.config,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
-H,[E]);var M=g.model.getGeometry(E);null!=M&&(M=M.clone(),M.width=Math.max(M.width,S),M.height=Math.max(M.height,V),g.cellsResized([E],[M],!1));g.setAttributeForCell(E,"mermaidData",JSON.stringify({data:F,config:J.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(E,G){try{var P=this.graph.getAttributeForCell(E,"plantUmlData");if(null!=
-P)this.editPlantUmlData(E,G,P);else if(P=this.graph.getAttributeForCell(E,"mermaidData"),null!=P)this.editMermaidData(E,G,P);else{var J=g.getCellStyle(E);"1"==mxUtils.getValue(J,"metaEdit","0")?d.showDataDialog(E):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(E){return d.getLinkTitle(E)};g.customLinkClicked=function(E){var G=!1;try{d.handleCustomLink(E),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(E){var G=l.apply(this,
-arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(E){null!=E&&null!=E.originalSrc&&(E=d.createImageForPageLink(E.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
-mxUtils.bind(this,function(E,G){E=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=E){var P=E.indexOf(",");if(0<P)for(E=E.substring(P+1),G=G.getProperty("patches"),P=0;P<G.length;P++)if(null!=G[P][EditorUi.DIFF_UPDATE]&&null!=G[P][EditorUi.DIFF_UPDATE][E]||null!=G[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[P][EditorUi.DIFF_REMOVE],E)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(E,G){var P=q.apply(this,arguments);
-if(null!=P&&null!=P.originalSrc)if(!G)P={src:P.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";P=d.createImageForPageLink(P.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=J}return P};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.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 y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(E){E=null!=E?E:"";"1"==urlParams.dev&&(E+=(0<E.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
-var A=g.addClickHandler;g.addClickHandler=function(E,G,P){var J=G;G=function(F,H){if(null==H){var S=mxEvent.getSource(F);"a"==S.nodeName.toLowerCase()&&(H=S.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=J&&J(F,H)};A.call(this,E,G,P)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(E,G,P){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(E,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}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 I=g.getExportVariables;g.getExportVariables=function(){var E=I.apply(this,arguments),G=d.getCurrentFile();null!=
-G&&(E.filename=G.getTitle());E.pagecount=null!=d.pages?d.pages.length:1;E.page=null!=d.currentPage?d.currentPage.getName():"";E.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return E};var O=g.getGlobalVariable;g.getGlobalVariable=function(E){var G=d.getCurrentFile();return"filename"==E&&null!=G?G.getTitle():"page"==E&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==E?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
-"pagecount"==E?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(E,G,P){var J=G.getAttribute("href");if(null==J||!g.isCustomLink(J)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=E&&g.isCellLocked(E.cell))g.customLinkClicked(J),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=d.defaultFilename,G=d.getCurrentFile();null!=G&&(E=null!=G.getTitle()?
-G.getTitle():E);return E};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.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,"insertRectangle"),this.keyHandler.bindAction(75,
-!0,"insertEllipse",!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&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var G=g.cellEditor.text2,P=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(J){null!=P&&(P.parentNode.removeChild(P),P=null);J.stopPropagation();
-J.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(G));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<J.dataTransfer.files.length)this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,function(H,S,V,M,W,U){g.insertImage(H,W,U)},function(){},function(H){return"image/"==H.type.substring(0,
-6)},function(H){for(var S=0;S<H.length;S++)H[S]()},mxEvent.isControlDown(J));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var F=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var S=Math.max(1,H.width);H=Math.max(1,H.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,S)),V/Math.max(1,H));g.insertImage(decodeURIComponent(F),S*V,H*V)})):document.execCommand("insertHTML",
-!1,J.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"));J.stopPropagation();J.preventDefault()})))}));this.isSettingsEnabled()&&(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(E,G){mxSettings.setUnit(G.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,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,G){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),
-E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?!0:L.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(g.container,"dragleave",function(E){g.isEnabled()&&
-(null!=C&&(C.parentNode.removeChild(C),C=null),E.stopPropagation(),E.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(E){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(E){null!=C&&(C.parentNode.removeChild(C),C=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
-mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,J=g.view.translate,F=g.view.scale,H=G.x/F-J.x,S=G.y/F-J.y;if(0<P.length)G=1==P.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===P[0].type.substring(0,9)||"image/"!==P[0].type.substring(0,6)||/(\.drawio.png)$/i.test(P[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(E)||G)?(!mxEvent.isShiftDown(E)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(S=H=null),this.importFiles(P,
-H,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(S=H=0);var V=0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")?E.dataTransfer.getData("text/uri-list"):null;P=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=P)g.setSelectionCells(this.importXml(P,H,S,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")){var M=E.dataTransfer.getData("text/html");P=document.createElement("div");P.innerHTML=
-g.sanitizeHtml(M);var W=null;G=P.getElementsByTagName("img");null!=G&&1==G.length?(M=G[0].getAttribute("src"),null==M&&(M=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)||(W=!0)):(G=P.getElementsByTagName("a"),null!=G&&1==G.length?M=G[0].getAttribute("href"):(P=P.getElementsByTagName("pre"),null!=P&&1==P.length&&(M=mxUtils.getTextContent(P[0]))));var U=!0,X=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(M,H,S,!0,W,null,U,mxEvent.isControlDown(E)))});W&&null!=
-M&&M.length>this.resampleThreshold?this.confirmImageResize(function(u){U=u;X()},mxEvent.isControlDown(E)):X()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(u){var D=Math.max(1,u.width);u=Math.max(1,u.height);var K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,D)),K/Math.max(1,u));g.setSelectionCell(g.insertVertex(null,null,"",H,S,D*K,u*K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-V+";"))}),mxUtils.bind(this,function(u){g.setSelectionCells(this.insertTextAt(V,H,S,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),H,S,!0))}}E.stopPropagation();E.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(A,B,I,O,t,z){d.insertImage(A,t,z)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var B=0;B<A.length;B++)A[B]()});else{var y=
-this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
+mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(C){var G=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==C.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(C,
+G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("plantUml")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,I.format,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==I.format)g.labelChanged(C,"<pre>"+H+"</pre>"),g.updateCellSize(C,!0);else{g.setCellStyles("image",d.convertDataUri(H),[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=R,J.height=W,g.cellsResized([C],[J],!1))}g.setAttributeForCell(C,
+"plantUmlData",JSON.stringify({data:F,format:I.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(C,G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("mermaid")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,I.config,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
+H,[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=Math.max(J.width,R),J.height=Math.max(J.height,W),g.cellsResized([C],[J],!1));g.setAttributeForCell(C,"mermaidData",JSON.stringify({data:F,config:I.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(C,G){try{var N=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
+N)this.editPlantUmlData(C,G,N);else if(N=this.graph.getAttributeForCell(C,"mermaidData"),null!=N)this.editMermaidData(C,G,N);else{var I=g.getCellStyle(C);"1"==mxUtils.getValue(I,"metaEdit","0")?d.showDataDialog(C):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(C){return d.getLinkTitle(C)};g.customLinkClicked=function(C){var G=!1;try{d.handleCustomLink(C),G=!0}catch(N){d.handleError(N)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(C){var G=l.apply(this,
+arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(C){null!=C&&null!=C.originalSrc&&(C=d.createImageForPageLink(C.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
+mxUtils.bind(this,function(C,G){C=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=C){var N=C.indexOf(",");if(0<N)for(C=C.substring(N+1),G=G.getProperty("patches"),N=0;N<G.length;N++)if(null!=G[N][EditorUi.DIFF_UPDATE]&&null!=G[N][EditorUi.DIFF_UPDATE][C]||null!=G[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[N][EditorUi.DIFF_REMOVE],C)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(C,G){var N=q.apply(this,arguments);
+if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var I=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=d.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=I}return N};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.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 y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(C){C=null!=C?C:"";"1"==urlParams.dev&&(C+=(0<C.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
+var z=g.addClickHandler;g.addClickHandler=function(C,G,N){var I=G;G=function(F,H){if(null==H){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(H=R.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=I&&I(F,H)};z.call(this,C,G,N)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
+this.menus.addPopupMenuEditItems=function(C,G,N){d.editor.graph.isSelectionEmpty()?A.apply(this,arguments):d.menus.addMenuItems(C,"delete - cut copy copyAsImage - duplicate".split(" "),null,N)}}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 K=g.getExportVariables;g.getExportVariables=function(){var C=K.apply(this,arguments),G=d.getCurrentFile();null!=
+G&&(C.filename=G.getTitle());C.pagecount=null!=d.pages?d.pages.length:1;C.page=null!=d.currentPage?d.currentPage.getName():"";C.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return C};var P=g.getGlobalVariable;g.getGlobalVariable=function(C){var G=d.getCurrentFile();return"filename"==C&&null!=G?G.getTitle():"page"==C&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==C?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
+"pagecount"==C?null!=d.pages?d.pages.length:1:P.apply(this,arguments)};var L=g.labelLinkClicked;g.labelLinkClicked=function(C,G,N){var I=G.getAttribute("href");if(null==I||!g.isCustomLink(I)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))L.apply(this,arguments);else{if(!g.isEnabled()||null!=C&&g.isCellLocked(C.cell))g.customLinkClicked(I),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var C=d.defaultFilename,G=d.getCurrentFile();null!=G&&(C=null!=G.getTitle()?
+G.getTitle():C);return C};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.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,"insertRectangle"),this.keyHandler.bindAction(75,
+!0,"insertEllipse",!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&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(C){var G=g.cellEditor.text2,N=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(I){null!=N&&(N.parentNode.removeChild(N),N=null);I.stopPropagation();
+I.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(G));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(H,R,W,J,V,U){g.insertImage(H,V,U)},function(){},function(H){return"image/"==H.type.substring(0,
+6)},function(H){for(var R=0;R<H.length;R++)H[R]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var F=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var R=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,R)),W/Math.max(1,H));g.insertImage(decodeURIComponent(F),R*W,H*W)})):document.execCommand("insertHTML",
+!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(C,G){mxSettings.setUnit(G.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,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(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)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,G){0<this.editor.graph.getSelectionCount()?(C=this.editor.graph.getSelectionCell(),
+C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==this.styleInput?!0:D.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(g.container,"dragleave",function(C){g.isEnabled()&&
+(null!=B&&(B.parentNode.removeChild(B),B=null),C.stopPropagation(),C.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(C){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(C){null!=B&&(B.parentNode.removeChild(B),B=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
+mxEvent.getClientX(C),mxEvent.getClientY(C)),N=C.dataTransfer.files,I=g.view.translate,F=g.view.scale,H=G.x/F-I.x,R=G.y/F-I.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(C)&&(R=H=null),this.importFiles(N,
+H,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(C),null,null,mxEvent.isShiftDown(C),C));else{mxEvent.isAltDown(C)&&(R=H=0);var W=0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")?C.dataTransfer.getData("text/uri-list"):null;N=this.extractGraphModelFromEvent(C,null!=this.pages);if(null!=N)g.setSelectionCells(this.importXml(N,H,R,!0));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/html")){var J=C.dataTransfer.getData("text/html");N=document.createElement("div");N.innerHTML=
+g.sanitizeHtml(J);var V=null;G=N.getElementsByTagName("img");null!=G&&1==G.length?(J=G[0].getAttribute("src"),null==J&&(J=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(J)||(V=!0)):(G=N.getElementsByTagName("a"),null!=G&&1==G.length?J=G[0].getAttribute("href"):(N=N.getElementsByTagName("pre"),null!=N&&1==N.length&&(J=mxUtils.getTextContent(N[0]))));var U=!0,X=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(J,H,R,!0,V,null,U,mxEvent.isControlDown(C)))});V&&null!=
+J&&J.length>this.resampleThreshold?this.confirmImageResize(function(t){U=t;X()},mxEvent.isControlDown(C)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(t){var E=Math.max(1,t.width);t=Math.max(1,t.height);var M=this.maxImageSize;M=Math.min(1,Math.min(M/Math.max(1,E)),M/Math.max(1,t));g.setSelectionCell(g.insertVertex(null,null,"",H,R,E*M,t*M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+W+";"))}),mxUtils.bind(this,function(t){g.setSelectionCells(this.insertTextAt(W,H,R,!0))})):0<=mxUtils.indexOf(C.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(C.dataTransfer.getData("text/plain"),H,R,!0))}}C.stopPropagation();C.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(z,A,K,P,L,u){d.insertImage(z,L,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var A=0;A<z.length;A++)z[A]()});else{var y=
+this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
"false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var l=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var x=mxEvent.getSource(q);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==x.nodeName||"TEXTAREA"==x.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||l||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",
g.container.appendChild(k),l=!0,k.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(q){var x=q.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=x&&17!=x&&91!=x&&93!=x||(l=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(q){if(g.isEnabled())try{mxClipboard.copy(g),
@@ -11987,15 +11988,15 @@ mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(l,p){try{this.spinner.stop();var q=this.createImageDataUri(l,g,"png"),x=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,x,y,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(l,p){try{this.spinner.stop();var q=this.createImageDataUri(l,g,"png"),x=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,x,y,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,l){var p=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerHTML="";else{var l=
mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),p=mxUtils.getXml(k.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(p));g?(k.removeCells(l,!1),k.lastPasteXml=null):(k.lastPasteXml=p,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,l){var p=this.editor.graph,q=null;p.lastPasteXml==d?p.pasteCounter++:(p.lastPasteXml=d,p.pasteCounter=0);var x=p.pasteCounter*p.gridSize;if(k||this.isCompatibleString(d))q=this.importXml(d,x,x),p.setSelectionCells(q);else if(g&&1==p.getSelectionCount()){x=p.getStartEditingCell(p.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==p.getCurrentCellStyle(x)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,
d,[x]);else{p.model.beginUpdate();try{p.labelChanged(x,d),Graph.isLink(d)&&p.setLinkForCell(x,d)}finally{p.model.endUpdate()}}p.setSelectionCell(x)}else q=p.getInsertPoint(),p.isMouseInsertPoint()&&(x=0,p.lastPasteXml==d&&0<p.pasteCounter&&p.pasteCounter--),q=this.insertTextAt(d,q.x+x,q.y+x,!0),p.setSelectionCells(q);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return q};EditorUi.prototype.pasteCells=
-function(d,g,k,l){if(!mxEvent.isConsumed(d)){var p=g,q=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var x=d.clipboardData.getData("text/plain"),y=!1;if(null!=x&&0<x.length&&"%3CmxGraphModel%3E"==x.substring(0,18))try{var A=decodeURIComponent(x);this.isCompatibleString(A)&&(y=!0,x=A)}catch(O){}y=y?null:d.clipboardData.getData("text/html");null!=y&&0<y.length?(p=this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=x&&0<x.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
-y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(O){var t=this.editor.graph;t.lastPasteXml==O?t.pasteCounter++:(t.lastPasteXml=O,t.pasteCounter=0);var z=t.pasteCounter*t.gridSize;t.setSelectionCells(this.importXml(O,z,z));t.scrollCellToVisible(t.getSelectionCell())}),mxUtils.bind(this,function(O){this.handleError(O)})),
-mxEvent.consume(d));else{q=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);y=!1;try{var B=q.lastIndexOf("%3E");0<=B&&B<q.length-3&&(q=q.substring(0,B+3))}catch(O){}try{x=p.getElementsByTagName("span"),(A=null!=x&&0<x.length?mxUtils.trim(decodeURIComponent(x[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=A)}catch(O){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(O){console.log("Miro import error:",O)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(O){}}else if(!k){var I=this.editor.graph;I.lastPasteXml=null;I.pasteCounter=0}}catch(O){this.handleError(O)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
+function(d,g,k,l){if(!mxEvent.isConsumed(d)){var p=g,q=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var x=d.clipboardData.getData("text/plain"),y=!1;if(null!=x&&0<x.length&&"%3CmxGraphModel%3E"==x.substring(0,18))try{var z=decodeURIComponent(x);this.isCompatibleString(z)&&(y=!0,x=z)}catch(P){}y=y?null:d.clipboardData.getData("text/html");null!=y&&0<y.length?(p=this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=x&&0<x.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
+y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(P){var L=this.editor.graph;L.lastPasteXml==P?L.pasteCounter++:(L.lastPasteXml=P,L.pasteCounter=0);var u=L.pasteCounter*L.gridSize;L.setSelectionCells(this.importXml(P,u,u));L.scrollCellToVisible(L.getSelectionCell())}),mxUtils.bind(this,function(P){this.handleError(P)})),
+mxEvent.consume(d));else{q=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);y=!1;try{var A=q.lastIndexOf("%3E");0<=A&&A<q.length-3&&(q=q.substring(0,A+3))}catch(P){}try{x=p.getElementsByTagName("span"),(z=null!=x&&0<x.length?mxUtils.trim(decodeURIComponent(x[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=z)}catch(P){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(P){console.log("Miro import error:",P)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(P){}}else if(!k){var K=this.editor.graph;K.lastPasteXml=null;K.pasteCounter=0}}catch(P){this.handleError(P)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
function(l){null!=g&&(g.parentNode.removeChild(g),g=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(l){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(l);if(null==p){var q=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?p=q.getData("Text"):(p=null,p=0<=mxUtils.indexOf(q.types,
"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=p&&0<p.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(p),q=q.getElementsByTagName("img"),0<q.length&&(p=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(p=q.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?
@@ -12003,7 +12004,7 @@ this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInO
null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var l=document.body;var p=document.documentElement;var q=(l.clientWidth||p.clientWidth)-3;l=Math.max(l.clientHeight||0,p.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,q=d.clientWidth,l=d.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";
p.style.top=g+"px";p.style.left=k+"px";p.style.width=Math.max(0,q-3)+"px";p.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);return p};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),l=new mxGraphModel;k.decode(g,l);g=l.getChildAt(l.getRoot(),0);for(k=0;k<l.getChildCount(g);k++)d.push(l.getChildAt(g,
k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,l,p){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=g.substring(0,g.length-4)+".drawio");var q=mxUtils.bind(this,function(y){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==y.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-l);try{this.loadLibrary(new LocalLibrary(this,y,g))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,g,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?
+l);try{this.loadLibrary(new LocalLibrary(this,y,g))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,g,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?
(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(y){4==y.readyState&&(this.spinner.stop(),200<=y.status&&299>=y.status?q(y.responseText):this.handleError({message:mxResources.get(413==y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,
function(y){this.spinner.stop();this.openLocalFile(y,g,l)}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(y){this.spinner.stop();
q(y)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,l)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var x=Editor.extractGraphModelFromPdf(d);null!=x&&(p=null,l=!0,d=x)}this.spinner.stop();this.openLocalFile(d,g,l,p,null!=p?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(l){var p=
@@ -12014,61 +12015,61 @@ mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=ne
(k(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=l.model.getChildCount(d);for(var q=0;q<p;q++)this.addBasenamesForCell(l.model.getChildAt(d,q),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,l,p){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var x=q.model.cells,y;for(y in x){var A=x[y];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var x=q.model.cells,y;for(y in x){var z=x[y];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;
g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var l=g.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(p){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
-k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,l=!1,p=null,q=mxUtils.bind(this,function(A,B){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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var B=A.data,I=null,O=mxUtils.bind(this,function(Q){if(null!=Q&&"function"===typeof Q.charAt&&"<"!=Q.charAt(0))try{Editor.isPngDataUrl(Q)?Q=Editor.extractGraphModelFromPng(Q):"data:image/svg+xml;base64,"==Q.substring(0,26)?Q=atob(Q.substring(26)):
-"data:image/svg+xml;utf8,"==Q.substring(0,24)&&(Q=Q.substring(24)),null!=Q&&("%"==Q.charAt(0)?Q=decodeURIComponent(Q):"<"!=Q.charAt(0)&&(Q=Graph.decompress(Q)))}catch(R){}return Q});if("json"==urlParams.proto){var t=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[B])}catch(Q){B=null}try{if(null==B)return;if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,
-null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayoutList(B.layouts);return}if("prompt"==B.action){this.spinner.stop();var z=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Q){null!=Q?x.postMessage(JSON.stringify({event:"prompt",value:Q,message:B}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):
-B.title);this.showDialog(z.container,300,80,!0,!1);z.init();return}if("draft"==B.action){var L=O(B.xml);this.spinner.stop();z=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),L,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,
-B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(z.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{z.init()}catch(Q){x.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var C=1==B.enableRecent,E=1==B.enableSearch,G=1==
-B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var P=this.getCurrentUser(),J=new TemplatesDialog(this,function(Q,R,Y){Q=Q||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:R,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:B}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=P?P.id:null,C?mxUtils.bind(this,function(Q,R,Y){this.remoteInvoke("getRecentDiagrams",
-[Y],null,Q,R)}):null,E?mxUtils.bind(this,function(Q,R,Y,ba){this.remoteInvoke("searchDiagrams",[Q,ba],null,R,Y)}):null,mxUtils.bind(this,function(Q,R,Y){this.remoteInvoke("getFileContent",[Q.url],null,R,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(J.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}z=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,
-function(Q,R,Y,ba){Q=Q||this.emptyDiagramXml;null!=B.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:R,tempUrl:Y,libs:ba,builtIn:!0,message:B}),"*"):(d(Q,A,Q!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,C?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,"Network Error!")})}):null,E?mxUtils.bind(this,function(Q,R){this.remoteInvoke("searchDiagrams",
-[Q,null],null,R,function(){R(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,R,Y){x.postMessage(JSON.stringify({event:"template",docUrl:Q,info:R,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==B.withoutType);this.showDialog(z.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();Q&&this.actions.get("exit").funct()}));z.init();return}if("textContent"==B.action){var F=
-this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var H=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,H):
-this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var S=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,
-M=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var R=this.createLoadMessage("export");R.format=B.format;R.message=B;R.data=Q;R.xml=S;x.postMessage(JSON.stringify(R),"*")}),W=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==B.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(S)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);M(Q)}),U=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():
-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var R,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){R=this.updatePageRoot(this.pages[Y]);break}null==R&&(R=this.currentPage);V.getGlobalVariable=function(fa){return"page"==fa?R.getName():"pagenumber"==fa?1:Q.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(R.root)}if(null!=
-B.layerIds){var ba=V.model,ea=ba.getChildCells(ba.getRoot()),Z={};for(Y=0;Y<B.layerIds.length;Y++)Z[B.layerIds[Y]]=!0;for(Y=0;Y<ea.length;Y++)ba.setVisible(ea[Y],Z[ea[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){W(fa.toDataURL("image/png"))}),B.width,null,B.background,mxUtils.bind(this,function(){W(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length?(k=!0,this.setFileData(S),k=!1,this.editor.graph.mathEnabled?
-window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(S))).send(mxUtils.bind(this,function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?M("data:image/png;base64,"+Q.getText()):W(null)}),mxUtils.bind(this,
-function(){W(null)}))}}else X=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var R=this.getXmlFileData();Q.xml=mxUtils.getXml(R);Q.data=this.getFileData(null,null,!0,null,null,null,R);Q.format=B.format}else if("html"==B.format)R=this.editor.getGraphXml(),Q.data=this.getHtml(R,this.editor.graph),Q.xml=mxUtils.getXml(R),Q.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;R=null!=B.background?B.background:this.editor.graph.background;R==mxConstants.NONE&&(R=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ba);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==B.format)(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Q.xml,
-this.editor.graph,null,!0,Y,null,null,B.embedImages,R,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),R=this.editor.graph.getSvg(R,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(R),this.embedFonts(R,mxUtils.bind(this,function(ba){B.embedImages||
-null==B.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(ea){Y(mxUtils.getXml(ea))})):Y(mxUtils.getXml(ba))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=B.xml&&0<B.xml.length?(k=!0,this.setFileData(B.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==B.action){t=B.toSketch;l=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var u=Editor.sketchMode;this.doSetSketchMode(B.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=B.dark&&(u=Editor.darkMode,this.doSetDarkMode(B.dark),u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=
-B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var D=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Q=
-this.editor.graph,R=Q.maxFitScale;Q.maxFitScale=B.maxFitScale;Q.fit(2*D);Q.maxFitScale=R;Q.container.scrollTop-=2*D;Q.container.scrollLeft-=2*D;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&(L=document.createElement("span"),mxUtils.write(L,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(L),
-this.embedFilenameSpan=L);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Q){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var K=this.getCurrentFile();null!=K&&(L=O(B.xml),null!=L&&""!=L&&K.mergeFile(new LocalFile(this,L),function(){x.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Q){x.postMessage(JSON.stringify({event:"merge",message:B,error:Q}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(x):
-"remoteInvoke"==B.action?this.handleRemoteInvoke(B,A.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Q){this.handleError(Q)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),N=mxUtils.bind(this,function(Q,R){k=!0;try{d(Q,R,null,t)}catch(Y){this.handleError(Y)}k=
+k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,l=!1,p=null,q=mxUtils.bind(this,function(z,A){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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var A=z.data,K=null,P=mxUtils.bind(this,function(Q){if(null!=Q&&"function"===typeof Q.charAt&&"<"!=Q.charAt(0))try{Editor.isPngDataUrl(Q)?Q=Editor.extractGraphModelFromPng(Q):"data:image/svg+xml;base64,"==Q.substring(0,26)?Q=atob(Q.substring(26)):
+"data:image/svg+xml;utf8,"==Q.substring(0,24)&&(Q=Q.substring(24)),null!=Q&&("%"==Q.charAt(0)?Q=decodeURIComponent(Q):"<"!=Q.charAt(0)&&(Q=Graph.decompress(Q)))}catch(S){}return Q});if("json"==urlParams.proto){var L=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[A])}catch(Q){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):A.message,
+null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayoutList(A.layouts);return}if("prompt"==A.action){this.spinner.stop();var u=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(Q){null!=Q?x.postMessage(JSON.stringify({event:"prompt",value:Q,message:A}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):
+A.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==A.action){var D=P(A.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),D,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,
+A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{u.init()}catch(Q){x.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var B=1==A.enableRecent,C=1==A.enableSearch,G=1==
+A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var N=this.getCurrentUser(),I=new TemplatesDialog(this,function(Q,S,Y){Q=Q||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=N?N.id:null,B?mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getRecentDiagrams",
+[Y],null,Q,S)}):null,C?mxUtils.bind(this,function(Q,S,Y,ba){this.remoteInvoke("searchDiagrams",[Q,ba],null,S,Y)}):null,mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getFileContent",[Q.url],null,S,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,
+function(Q,S,Y,ba){Q=Q||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y,libs:ba,builtIn:!0,message:A}),"*"):(d(Q,z,Q!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,"Network Error!")})}):null,C?mxUtils.bind(this,function(Q,S){this.remoteInvoke("searchDiagrams",
+[Q,null],null,S,function(){S(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,S,Y){x.postMessage(JSON.stringify({event:"template",docUrl:Q,info:S,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==A.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();Q&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var F=
+this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var H=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,H):
+this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){null!=A.viewport&&(this.embedViewport=A.viewport);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var R=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var W=this.editor.graph,
+J=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var S=this.createLoadMessage("export");S.format=A.format;S.message=A;S.data=Q;S.xml=R;x.postMessage(JSON.stringify(S),"*")}),V=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==A.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(R)));W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);J(Q)}),U=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var S,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){S=this.updatePageRoot(this.pages[Y]);break}null==S&&(S=this.currentPage);W.getGlobalVariable=function(fa){return"page"==fa?S.getName():"pagenumber"==fa?1:Q.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=
+A.layerIds){var ba=W.model,ea=ba.getChildCells(ba.getRoot()),Z={};for(Y=0;Y<A.layerIds.length;Y++)Z[A.layerIds[Y]]=!0;for(Y=0;Y<ea.length;Y++)ba.setVisible(ea[Y],Z[ea[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){V(fa.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){V(null)}),null,null,A.scale,A.transparent,A.shadow,null,W,A.border,null,A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(R),k=!1,this.editor.graph.mathEnabled?
+window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?J("data:image/png;base64,"+Q.getText()):V(null)}),mxUtils.bind(this,
+function(){V(null)}))}}else X=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var S=this.getXmlFileData();Q.xml=mxUtils.getXml(S);Q.data=this.getFileData(null,null,!0,null,null,null,S);Q.format=A.format}else if("html"==A.format)S=this.editor.getGraphXml(),Q.data=this.getHtml(S,this.editor.graph),Q.xml=mxUtils.getXml(S),Q.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=
+null;S=null!=A.background?A.background:this.editor.graph.background;S==mxConstants.NONE&&(S=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ba);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))&&this.getEmbeddedSvg(Q.xml,
+this.editor.graph,null,!0,Y,null,null,A.embedImages,S,A.scale,A.border,A.shadow,A.keepTheme);else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),S=this.editor.graph.getSvg(S,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,A.keepTheme),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(ba){A.embedImages||
+null==A.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(ea){Y(mxUtils.getXml(ea))})):Y(mxUtils.getXml(ba))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(A.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==A.action){L=A.toSketch;l=1==A.autosave;this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var t=Editor.sketchMode;this.doSetSketchMode(A.rough);t!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&(t=Editor.darkMode,this.doSetDarkMode(A.dark),t!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=
+A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var E=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";K=mxUtils.bind(this,function(){var Q=
+this.editor.graph,S=Q.maxFitScale;Q.maxFitScale=A.maxFitScale;Q.fit(2*E);Q.maxFitScale=S;Q.container.scrollTop-=2*E;Q.container.scrollLeft-=2*E;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(D),
+this.embedFilenameSpan=D);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(Q){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var M=this.getCurrentFile();null!=M&&(D=P(A.xml),null!=D&&""!=D&&M.mergeFile(new LocalFile(this,D),function(){x.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(Q){x.postMessage(JSON.stringify({event:"merge",message:A,error:Q}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(x):
+"remoteInvoke"==A.action?this.handleRemoteInvoke(A,z.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(Q){this.handleError(Q)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),O=mxUtils.bind(this,function(Q,S){k=!0;try{d(Q,S,null,L)}catch(Y){this.handleError(Y)}k=
!1;null!=urlParams.modified&&this.editor.setStatus("");p=T();l&&null==g&&(g=mxUtils.bind(this,function(Y,ba){Y=T();Y==p||k||(ba=this.createLoadMessage("autosave"),ba.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ba),"*"));p=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",
-g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)R=this.createLoadMessage("load"),R.xml=Q,x.postMessage(JSON.stringify(R),"*");null!=I&&I()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?
-(O="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Q){N(Q,A)},mxUtils.bind(this,function(Q){this.handleError(Q)}),O)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==
-Q.responseText.substring(0,13)&&N(Q.responseText,A)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Q){N(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==B||"object"!==typeof B||null==B.format||null==B.data&&null==B.url?(B=O(B),N(B,A)):this.loadDescriptor(B,mxUtils.bind(this,function(Q){N(T(),A)}),mxUtils.bind(this,function(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}))}}));var x=window.opener||
-window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(A,B,I){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:A,target:B,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position=
+g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)S=this.createLoadMessage("load"),S.xml=Q,x.postMessage(JSON.stringify(S),"*");null!=K&&K()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?
+(P="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Q){O(Q,z)},mxUtils.bind(this,function(Q){this.handleError(Q)}),P)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==
+Q.responseText.substring(0,13)&&O(Q.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Q){O(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=P(A),O(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(Q){O(T(),z)}),mxUtils.bind(this,function(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}))}}));var x=window.opener||
+window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(z,A,K){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:z,target:A,allowOpener:K}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position=
"absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var g=document.createElement("button");g.className="geBigButton";var k=g;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,l);g.setAttribute("title",l);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g),k=g);"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(d);
this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};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.executeLayoutList=function(d,g){for(var k=this.editor.graph,l=k.getSelectionCells(),p=0;p<d.length;p++){var q=new window[d[p].layout](k);if(null!=d[p].config)for(var x in d[p].config)q[x]=d[p].config[x];this.executeLayout(function(){q.execute(k.getDefaultParent(),0==l.length?null:l)},p==d.length-1,g)}};EditorUi.prototype.importCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},
-A=this.editor.graph,B=null,I=null,O=null,t=null,z=null,L=null,C=null,E="whiteSpace=wrap;html=1;",G=null,P=null,J="",F="auto",H="auto",S=null,V=null,M=40,W=40,U=100,X=0,u=function(){null!=g?g(ta):(A.setSelectionCells(ta),A.scrollCellToVisible(A.getSelectionCell()))},D=A.getFreeInsertPoint(),K=D.x,T=D.y;D=T;var N=null,Q="auto";P=null;for(var R=[],Y=null,ba=null,ea=0;ea<k.length&&"#"==k[ea].charAt(0);){d=k[ea].replace(/\r$/,"");for(ea++;ea<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ea].charAt(0);)d=
-d.substring(0,d.length-1)+mxUtils.trim(k[ea].substring(1)),ea++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var fa=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+1));"label"==fa?N=A.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?z=aa:"labels"==fa&&0<aa.length&&"-"!=aa?C=JSON.parse(aa):"style"==fa?I=aa:"parentstyle"==fa?E=aa:"unknownStyle"==fa&&"-"!=aa?L=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?t=aa:"styles"==fa&&0<aa.length&&"-"!=aa?O=JSON.parse(aa):"vars"==fa&&0<aa.length&&
-"-"!=aa?B=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?P=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?J=aa:"width"==fa?F=aa:"height"==fa?H=aa:"left"==fa&&0<aa.length?S=aa:"top"==fa&&0<aa.length?V=aa:"ignore"==fa?ba=aa.split(","):"connect"==fa?R.push(JSON.parse(aa)):"link"==fa?Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?M=parseFloat(aa):"nodespacing"==fa?W=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(Q=aa)}}}if(null==k[ea])throw Error(mxResources.get("invalidOrMissingFile"));
-var va=this.editor.csvToArray(k[ea].replace(/\r$/,""));Z=d=null;fa=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(d=aa),P==va[aa]&&(Z=aa),fa.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==N&&(N="%"+fa[0]+"%");if(null!=R)for(var ja=0;ja<R.length;ja++)null==y[R[ja].to]&&(y[R[ja].to]={});G=[];for(aa=ea+1;aa<k.length;aa++){var Ba=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ba){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+
-" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}A.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ba=G[aa];var qa=null,Ca=null!=d?J+Ba[d]:null;null!=Ca&&(qa=A.model.getCell(Ca));k=null!=qa;var Aa=new mxCell(N,new mxGeometry(K,D,0,0),I||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ca;Da=null!=qa?qa:Aa;for(var Ha=0;Ha<Ba.length;Ha++)A.setAttributeForCell(Da,fa[Ha],Ba[Ha]);if(null!=z&&null!=C){var Na=C[Da.getAttribute(z)];null!=Na&&A.labelChanged(Da,Na)}if(null!=
-t&&null!=O){var Ga=O[Da.getAttribute(t)];null!=Ga&&(Da.style=Ga)}A.setAttributeForCell(Da,"placeholders","1");Da.style=A.replacePlaceholders(Da,Da.style,B);k?(0>mxUtils.indexOf(q,qa)&&q.push(qa),A.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))):A.fireEvent(new mxEventObject("cellsInserted","cells",[Aa]));qa=Aa;if(!k)for(ja=0;ja<R.length;ja++)y[R[ja].to][qa.getAttribute(R[ja].to)]=qa;null!=Y&&"link"!=Y&&(A.setLinkForCell(qa,qa.getAttribute(Y)),A.setAttributeForCell(qa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(qa);
-P=null!=Z?A.model.getCell(J+Ba[Z]):null;if(qa.vertex){Da=null!=P?0:K;ea=null!=P?0:T;null!=S&&null!=qa.getAttribute(S)&&(qa.geometry.x=Da+parseFloat(qa.getAttribute(S)));null!=V&&null!=qa.getAttribute(V)&&(qa.geometry.y=ea+parseFloat(qa.getAttribute(V)));var Ea="@"==F.charAt(0)?qa.getAttribute(F.substring(1)):null;qa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(qa.getAttribute(F.substring(1))):"auto"==F||"auto"==Ea?Fa.width+X:parseFloat(F);var La="@"==H.charAt(0)?qa.getAttribute(H.substring(1)):
-null;qa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==H||"auto"==La?Fa.height+X:parseFloat(H);D+=qa.geometry.height+W}k?(null==x[Ca]&&(x[Ca]=[]),x[Ca].push(qa)):(l.push(qa),null!=P?(P.style=A.replacePlaceholders(P,E,B),A.addCell(qa,P),p.push(P)):q.push(A.addCell(qa)))}for(aa=0;aa<p.length;aa++)Ea="@"==F.charAt(0)?p[aa].getAttribute(F.substring(1)):null,La="@"==H.charAt(0)?p[aa].getAttribute(H.substring(1)):null,"auto"!=F&&"auto"!=Ea||"auto"!=H&&"auto"!=La||A.updateGroupBounds([p[aa]],
-X,!0);var za=q.slice(),ta=q.slice();for(ja=0;ja<R.length;ja++){var ka=R[ja];for(aa=0;aa<l.length;aa++){qa=l[aa];var oa=mxUtils.bind(this,function(ia,ma,ra){var pa=ma.getAttribute(ra.from);if(null!=pa&&""!=pa){pa=pa.split(",");for(var na=0;na<pa.length;na++){var Ka=y[ra.to][pa[na]];if(null==Ka&&null!=L){Ka=new mxCell(pa[na],new mxGeometry(K,T,0,0),L);Ka.style=A.replacePlaceholders(ma,Ka.style,B);var Ia=this.editor.graph.getPreferredSizeForCell(Ka);Ka.geometry.width=Ia.width+X;Ka.geometry.height=Ia.height+
-X;y[ra.to][pa[na]]=Ka;Ka.vertex=!0;Ka.id=pa[na];q.push(A.addCell(Ka))}if(null!=Ka){Ia=ra.label;null!=ra.fromlabel&&(Ia=(ma.getAttribute(ra.fromlabel)||"")+(Ia||""));null!=ra.sourcelabel&&(Ia=A.replacePlaceholders(ma,ra.sourcelabel,B)+(Ia||""));null!=ra.tolabel&&(Ia=(Ia||"")+(Ka.getAttribute(ra.tolabel)||""));null!=ra.targetlabel&&(Ia=(Ia||"")+A.replacePlaceholders(Ka,ra.targetlabel,B));var Ra="target"==ra.placeholders==!ra.invert?Ka:ia;Ra=null!=ra.style?A.replacePlaceholders(Ra,ra.style,B):A.createCurrentEdgeStyle();
-Ia=A.insertEdge(null,null,Ia||"",ra.invert?Ka:ia,ra.invert?ia:Ka,Ra);if(null!=ra.labels)for(Ra=0;Ra<ra.labels.length;Ra++){var Sa=ra.labels[Ra],Ja=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Sa.placeholders&&(Ja.value=A.replacePlaceholders("target"==Sa.placeholders==!ra.invert?Ka:ia,Ja.value,B));if(null!=Sa.dx||null!=Sa.dy)Ja.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
-Sa.dy?Sa.dy:0);Ia.insert(Ja)}ta.push(Ia);mxUtils.remove(ra.invert?ia:Ka,za)}}}});oa(qa,qa,ka);if(null!=x[qa.id])for(Ha=0;Ha<x[qa.id].length;Ha++)oa(qa,x[qa.id][Ha],ka)}}if(null!=ba)for(aa=0;aa<l.length;aa++)for(qa=l[aa],Ha=0;Ha<ba.length;Ha++)A.setAttributeForCell(qa,mxUtils.trim(ba[Ha]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(A);sa.spacing=M;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(A.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=A.getCellGeometry(q[ia]);
-ma.x=Math.round(A.snap(ma.x));ma.y=Math.round(A.snap(ma.y));"auto"==F&&(ma.width=Math.round(A.snap(ma.width)));"auto"==H&&(ma.height=Math.round(A.snap(ma.height)))}};if("["==Q.charAt(0)){var wa=u;A.view.validate();this.executeLayoutList(JSON.parse(Q),function(){ya();wa()});u=null}else if("circle"==Q){var ua=new mxCircleLayout(A);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var xa=ua.isVertexIgnored;ua.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ua.execute(A.getDefaultParent());
-ya()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ta.length==2*q.length-1&&1==za.length){A.view.validate();var ha=new mxCompactTreeLayout(A,"horizontaltree"==Q);ha.levelDistance=W;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),0<za.length?za[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==za.length){A.view.validate();var da=new mxHierarchicalLayout(A,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);da.intraCellSpacing=W;da.parallelEdgeSpacing=M;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(A.getDefaultParent(),ta);A.moveCells(ta,K,T)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){A.view.validate();var ca=new mxFastOrganicLayout(A);ca.forceConstant=3*W;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
-ia)};this.executeLayout(function(){ca.execute(A.getDefaultParent());ya()},!0,u);u=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=u&&u()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=
+z=this.editor.graph,A=null,K=null,P=null,L=null,u=null,D=null,B=null,C="whiteSpace=wrap;html=1;",G=null,N=null,I="",F="auto",H="auto",R=null,W=null,J=40,V=40,U=100,X=0,t=function(){null!=g?g(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()))},E=z.getFreeInsertPoint(),M=E.x,T=E.y;E=T;var O=null,Q="auto";N=null;for(var S=[],Y=null,ba=null,ea=0;ea<k.length&&"#"==k[ea].charAt(0);){d=k[ea].replace(/\r$/,"");for(ea++;ea<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ea].charAt(0);)d=
+d.substring(0,d.length-1)+mxUtils.trim(k[ea].substring(1)),ea++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var fa=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+1));"label"==fa?O=z.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?u=aa:"labels"==fa&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==fa?K=aa:"parentstyle"==fa?C=aa:"unknownStyle"==fa&&"-"!=aa?D=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?L=aa:"styles"==fa&&0<aa.length&&"-"!=aa?P=JSON.parse(aa):"vars"==fa&&0<aa.length&&
+"-"!=aa?A=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?N=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?I=aa:"width"==fa?F=aa:"height"==fa?H=aa:"left"==fa&&0<aa.length?R=aa:"top"==fa&&0<aa.length?W=aa:"ignore"==fa?ba=aa.split(","):"connect"==fa?S.push(JSON.parse(aa)):"link"==fa?Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?J=parseFloat(aa):"nodespacing"==fa?V=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(Q=aa)}}}if(null==k[ea])throw Error(mxResources.get("invalidOrMissingFile"));
+var va=this.editor.csvToArray(k[ea].replace(/\r$/,""));Z=d=null;fa=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(d=aa),N==va[aa]&&(Z=aa),fa.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==O&&(O="%"+fa[0]+"%");if(null!=S)for(var ja=0;ja<S.length;ja++)null==y[S[ja].to]&&(y[S[ja].to]={});G=[];for(aa=ea+1;aa<k.length;aa++){var Ba=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ba){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+
+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}z.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ba=G[aa];var qa=null,Ca=null!=d?I+Ba[d]:null;null!=Ca&&(qa=z.model.getCell(Ca));k=null!=qa;var Aa=new mxCell(O,new mxGeometry(M,E,0,0),K||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ca;Da=null!=qa?qa:Aa;for(var Ha=0;Ha<Ba.length;Ha++)z.setAttributeForCell(Da,fa[Ha],Ba[Ha]);if(null!=u&&null!=B){var Na=B[Da.getAttribute(u)];null!=Na&&z.labelChanged(Da,Na)}if(null!=
+L&&null!=P){var Ga=P[Da.getAttribute(L)];null!=Ga&&(Da.style=Ga)}z.setAttributeForCell(Da,"placeholders","1");Da.style=z.replacePlaceholders(Da,Da.style,A);k?(0>mxUtils.indexOf(q,qa)&&q.push(qa),z.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Aa]));qa=Aa;if(!k)for(ja=0;ja<S.length;ja++)y[S[ja].to][qa.getAttribute(S[ja].to)]=qa;null!=Y&&"link"!=Y&&(z.setLinkForCell(qa,qa.getAttribute(Y)),z.setAttributeForCell(qa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(qa);
+N=null!=Z?z.model.getCell(I+Ba[Z]):null;if(qa.vertex){Da=null!=N?0:M;ea=null!=N?0:T;null!=R&&null!=qa.getAttribute(R)&&(qa.geometry.x=Da+parseFloat(qa.getAttribute(R)));null!=W&&null!=qa.getAttribute(W)&&(qa.geometry.y=ea+parseFloat(qa.getAttribute(W)));var Ea="@"==F.charAt(0)?qa.getAttribute(F.substring(1)):null;qa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(qa.getAttribute(F.substring(1))):"auto"==F||"auto"==Ea?Fa.width+X:parseFloat(F);var La="@"==H.charAt(0)?qa.getAttribute(H.substring(1)):
+null;qa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==H||"auto"==La?Fa.height+X:parseFloat(H);E+=qa.geometry.height+V}k?(null==x[Ca]&&(x[Ca]=[]),x[Ca].push(qa)):(l.push(qa),null!=N?(N.style=z.replacePlaceholders(N,C,A),z.addCell(qa,N),p.push(N)):q.push(z.addCell(qa)))}for(aa=0;aa<p.length;aa++)Ea="@"==F.charAt(0)?p[aa].getAttribute(F.substring(1)):null,La="@"==H.charAt(0)?p[aa].getAttribute(H.substring(1)):null,"auto"!=F&&"auto"!=Ea||"auto"!=H&&"auto"!=La||z.updateGroupBounds([p[aa]],
+X,!0);var za=q.slice(),ta=q.slice();for(ja=0;ja<S.length;ja++){var ka=S[ja];for(aa=0;aa<l.length;aa++){qa=l[aa];var oa=mxUtils.bind(this,function(ia,ma,ra){var pa=ma.getAttribute(ra.from);if(null!=pa&&""!=pa){pa=pa.split(",");for(var na=0;na<pa.length;na++){var Ka=y[ra.to][pa[na]];if(null==Ka&&null!=D){Ka=new mxCell(pa[na],new mxGeometry(M,T,0,0),D);Ka.style=z.replacePlaceholders(ma,Ka.style,A);var Ia=this.editor.graph.getPreferredSizeForCell(Ka);Ka.geometry.width=Ia.width+X;Ka.geometry.height=Ia.height+
+X;y[ra.to][pa[na]]=Ka;Ka.vertex=!0;Ka.id=pa[na];q.push(z.addCell(Ka))}if(null!=Ka){Ia=ra.label;null!=ra.fromlabel&&(Ia=(ma.getAttribute(ra.fromlabel)||"")+(Ia||""));null!=ra.sourcelabel&&(Ia=z.replacePlaceholders(ma,ra.sourcelabel,A)+(Ia||""));null!=ra.tolabel&&(Ia=(Ia||"")+(Ka.getAttribute(ra.tolabel)||""));null!=ra.targetlabel&&(Ia=(Ia||"")+z.replacePlaceholders(Ka,ra.targetlabel,A));var Ra="target"==ra.placeholders==!ra.invert?Ka:ia;Ra=null!=ra.style?z.replacePlaceholders(Ra,ra.style,A):z.createCurrentEdgeStyle();
+Ia=z.insertEdge(null,null,Ia||"",ra.invert?Ka:ia,ra.invert?ia:Ka,Ra);if(null!=ra.labels)for(Ra=0;Ra<ra.labels.length;Ra++){var Sa=ra.labels[Ra],Ja=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Sa.placeholders&&(Ja.value=z.replacePlaceholders("target"==Sa.placeholders==!ra.invert?Ka:ia,Ja.value,A));if(null!=Sa.dx||null!=Sa.dy)Ja.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
+Sa.dy?Sa.dy:0);Ia.insert(Ja)}ta.push(Ia);mxUtils.remove(ra.invert?ia:Ka,za)}}}});oa(qa,qa,ka);if(null!=x[qa.id])for(Ha=0;Ha<x[qa.id].length;Ha++)oa(qa,x[qa.id][Ha],ka)}}if(null!=ba)for(aa=0;aa<l.length;aa++)for(qa=l[aa],Ha=0;Ha<ba.length;Ha++)z.setAttributeForCell(qa,mxUtils.trim(ba[Ha]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(z);sa.spacing=J;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(z.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=z.getCellGeometry(q[ia]);
+ma.x=Math.round(z.snap(ma.x));ma.y=Math.round(z.snap(ma.y));"auto"==F&&(ma.width=Math.round(z.snap(ma.width)));"auto"==H&&(ma.height=Math.round(z.snap(ma.height)))}};if("["==Q.charAt(0)){var wa=t;z.view.validate();this.executeLayoutList(JSON.parse(Q),function(){ya();wa()});t=null}else if("circle"==Q){var ua=new mxCircleLayout(z);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var xa=ua.isVertexIgnored;ua.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ua.execute(z.getDefaultParent());
+ya()},!0,t);t=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ta.length==2*q.length-1&&1==za.length){z.view.validate();var ha=new mxCompactTreeLayout(z,"horizontaltree"==Q);ha.levelDistance=V;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(z.getDefaultParent(),0<za.length?za[0]:null)},!0,t);t=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==za.length){z.view.validate();var da=new mxHierarchicalLayout(z,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);da.intraCellSpacing=V;da.parallelEdgeSpacing=J;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(z.getDefaultParent(),ta);z.moveCells(ta,M,T)},!0,t);t=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){z.view.validate();var ca=new mxFastOrganicLayout(z);ca.forceConstant=3*V;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
+ia)};this.executeLayout(function(){ca.execute(z.getDefaultParent());ya()},!0,t);t=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=t&&t()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=
null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(k,l)&&(d=0==g?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,l,p){d=new LinkDialog(this,d,g,k,!0,l,p);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=
function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),
@@ -12078,23 +12079,23 @@ return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnable
this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(l&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=
g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.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!=g&&g.isRenamable()||"1"==
urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
-function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var A=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(A.getSvg(l,p,q)),"image/svg+xml");
-else{var B=d.getFileData(!0,null,null,null,null,!0),I=A.getGraphBounds(),O=Math.floor(I.width*p/A.view.scale),t=Math.floor(I.height*p/A.view.scale);if(B.length<=MAX_REQUEST_SIZE&&O*t<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var z={globalVars:A.getExportVariables()};y&&(z.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});d.saveRequest(g,k,function(L,C){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(C||"0")+(null!=L?"&filename="+
-encodeURIComponent(L):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+t+"&border="+q+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=
+function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");
+else{var A=d.getFileData(!0,null,null,null,null,!0),K=z.getGraphBounds(),P=Math.floor(K.width*p/z.view.scale),L=Math.floor(K.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&P*L<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(D,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=D?"&filename="+
+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+P+"&h="+L+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=
0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),l.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+l.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));
-l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var A=JSON.parse(decodeURIComponent(y.substring(1)));q[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",
-null,null,function(B){p.innerHTML="";if(0==B.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<B.length;I++){var O=B[I];q[O.id]&&(g[O.id]=O);var t=this.addCheckbox(p,O.title,q[O.id]);(function(z,L){mxEvent.addListener(L,"change",function(){this.checked?g[z.id]=z:delete g[z.id]})})(O,t)}},mxUtils.bind(this,function(B){p.innerHTML="";var I=document.createElement("div");I.style.padding="8px";
-I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));p.appendChild(I)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,I;for(I in g)null==q[I]&&(B++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(t){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-t,O))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[I]));for(I in q)g[I]||this.closeLibrary(new RemoteLibrary(this,null,q[I]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
+l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var z=JSON.parse(decodeURIComponent(y.substring(1)));q[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",
+null,null,function(A){p.innerHTML="";if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var K=0;K<A.length;K++){var P=A[K];q[P.id]&&(g[P.id]=P);var L=this.addCheckbox(p,P.title,q[P.id]);(function(u,D){mxEvent.addListener(D,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(P,L)}},mxUtils.bind(this,function(A){p.innerHTML="";var K=document.createElement("div");K.style.padding="8px";
+K.style.textAlign="center";mxUtils.write(K,mxResources.get("error")+": ");mxUtils.write(K,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(K)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,K;for(K in g)null==q[K]&&(A++,mxUtils.bind(this,function(P){this.remoteInvoke("getFileContent",[P.downloadUrl],null,mxUtils.bind(this,function(L){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+L,P))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[K]));for(K in q)g[K]||this.closeLibrary(new RemoteLibrary(this,null,q[K]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,l,p){var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(x);
-q&&l.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:A});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(B,I){var O={event:"remoteInvokeResponse",
-msgMarkers:d.msgMarkers};null!=I?O.error={errResp:I}:null!=B&&(O.resp=B);this.remoteWin.postMessage(JSON.stringify(O),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
-y.push(function(B){k(null,B||"Unkown Error")}),this[l].apply(this,y);else{var A=this[l].apply(this,y);k([A])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
+q&&l.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(A,K){var P={event:"remoteInvokeResponse",
+msgMarkers:d.msgMarkers};null!=K?P.error={errResp:K}:null!=A&&(P.resp=A);this.remoteWin.postMessage(JSON.stringify(P),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
+y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=g&&g(x)}};l.onsuccess=mxUtils.bind(this,function(p){var q=l.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(x){if(!x||
-"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var A=!0,B=!1,I,O=0,t=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),z=mxUtils.bind(this,function(){O++;L()}),L=mxUtils.bind(this,function(){try{if(O>=
-I.length)t();else{var E=I[O];StorageFile.getFileContent(this,E,mxUtils.bind(this,function(G){null==G||".scratchpad"==E&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):z()}),z)}}catch(G){console.log(G)}}),C=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],z,z,["filesInfo","files"])}catch(G){console.log(G)}});
-x=mxUtils.bind(this,function(E){try{if(E.source==y.contentWindow){var G={};try{G=JSON.parse(E.data)}catch(P){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||B||(A?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(I=G.resp[0],A=!1,L()):t():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?C(G.resp[0]):z())}}catch(P){console.log(P)}});
+"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var z=!0,A=!1,K,P=0,L=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){P++;D()}),D=mxUtils.bind(this,function(){try{if(P>=
+K.length)L();else{var C=K[P];StorageFile.getFileContent(this,C,mxUtils.bind(this,function(G){null==G||".scratchpad"==C&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[C]}),"*"):u()}),u)}}catch(G){console.log(G)}}),B=mxUtils.bind(this,function(C){try{this.setDatabaseItem(null,[{title:C.title,size:C.data.length,lastModified:Date.now(),type:C.isLib?"L":"F"},{title:C.title,data:C.data}],u,u,["filesInfo","files"])}catch(G){console.log(G)}});
+x=mxUtils.bind(this,function(C){try{if(C.source==y.contentWindow){var G={};try{G=JSON.parse(C.data)}catch(N){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(K=G.resp[0],z=!1,D()):L():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?B(G.resp[0]):u())}}catch(N){console.log(N)}});
window.addEventListener("message",x)}})));d(q);q.onversionchange=function(){q.close()}});l.onerror=g;l.onblocked=function(){}}catch(p){null!=g&&g(p)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,l,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=[p],d=[d],g=[g]);var x=q.transaction(p,"readwrite");x.oncomplete=k;x.onerror=l;for(q=0;q<p.length;q++)x.objectStore(p[q]).put(null!=d&&null!=d[q]?{key:d[q],data:g[q]}:g[q])}catch(y){null!=
l&&l(y)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);p=p.transaction(l,"readwrite");p.oncomplete=g;p.onerror=k;for(var q=0;q<l.length;q++)p.objectStore(l[q]).delete(d[q])}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=l||"objects";var q=p.transaction([l],"readonly").objectStore(l).get(d);q.onsuccess=function(){g(q.result)};
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=
@@ -12102,46 +12103,46 @@ k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.o
!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var l=this.getCurrentFile();null!=l?l.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();
return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,l,p,q,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,l,p,q,x,y)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,A,B,I,O,t,z,L,C){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,A,B,I,O,t,z,L,C)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(d,g,k,l,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),l=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<l.length){var p="<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(p||
l)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var J=O.getElementsByTagName("div"),F=0,H=0;H<J.length;H++)"none"!=J[H].style.display&&J[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(J,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:J,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=M.offsetHeight+"px";U.value=J.content;F.insertBefore(U,M);var X=document.createElement("div");X.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){S?(F.parentNode.removeChild(F),v()):V();A=null});u.className="geCommentEditBtn";X.appendChild(u);var D=mxUtils.button(mxResources.get("save"),function(){M.innerHTML="";J.content=U.value;mxUtils.write(M,J.content);V();H(J);A=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(D.click(),mxEvent.consume(K)):27==K.keyCode&&(u.click(),mxEvent.consume(K)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";X.appendChild(D);F.insertBefore(X,M);W.style.display="none";M.style.display="none";U.focus()}function g(J,F){F.innerHTML="";J=new Date(J.modifiedDate);var H=b.timeSince(J);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
-[H],"{1} ago"));F.setAttribute("title",J.toLocaleDateString()+" "+J.toLocaleTimeString())}function k(J){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";J.appendChild(F);J.busyImg=F}function l(J){J.style.border="1px solid red";J.removeChild(J.busyImg)}function p(J){J.style.border="";J.removeChild(J.busyImg)}function q(J,F,H,S,V){function M(N,Q,R){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
-"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,J);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(J);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);J.addReply(aa,function(ja){aa.id=ja;J.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);
-b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var va=q(aa,J.replies,fa,S+1);Q?Z():ea()}if(V||!J.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&
-(X.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=J.user.pictureUrl||Editor.userImage;u.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";u.appendChild(D);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,J.user.displayName||"");D.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
-J.id);g(J,K);D.appendChild(K);X.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,J.content||"");X.appendChild(u);J.isLocked&&(X.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";u.appendChild(T);x||J.isLocked||0!=S&&!y||M(mxResources.get("reply"),function(){U("",!0)},J.isResolved);D=b.getCurrentUser();null==D||D.id!=J.user.id||x||J.isLocked||(M(mxResources.get("edit"),
-function(){function N(){d(J,X,function(){k(X);J.editComment(J.content,function(){p(X)},function(Q){l(X);N();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},J.isResolved),M(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);J.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerHTML="";mxUtils.write(N,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(N=
-0;N<Q.length;N++)Q[N].parentNode.removeChild(Q[N]);p(X);X.style.opacity="0.5"}else{Q=W(J).replies;for(N=0;N<Q.length;N++)O.removeChild(Q[N]);for(N=0;N<F.length;N++)if(F[N]==J){F.splice(N,1);break}t.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(N){l(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},J.isResolved));x||J.isLocked||0!=S||M(J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function Q(){var R=
-N.target;R.innerHTML="";J.isResolved=!J.isResolved;mxUtils.write(R,J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=J.isResolved?"none":"",ba=W(J).replies,ea=Editor.isDarkMode()?"transparent":J.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ea;for(var fa=ba[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=R.parentNode&&(fa[aa].style.display=Y);C||(ba[Z].style.display="none")}v()}J.isResolved?U(mxResources.get("reOpened")+
-": ",!0,Q,!1,!0):U(mxResources.get("markedAsResolved"),!1,Q,!0)});X.appendChild(u);null!=H?O.insertBefore(X,H.nextSibling):O.appendChild(X);for(H=0;null!=J.replies&&H<J.replies.length;H++)u=J.replies[H],u.isResolved=J.isResolved,q(u,J.replies,null,S+1,V);null!=A&&(A.comment.id==J.id?(V=J.content,J.content=A.comment.content,d(J,X,A.saveCallback,A.deleteOnCancel),J.content=V):null==A.comment.id&&A.comment.pCommentId==J.id&&(O.appendChild(A.div),d(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return X}}
-var x=!b.canComment(),y=b.canReplyToReplies(),A=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(I)+7+"px";B.appendChild(O);var t=document.createElement("span");t.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(t,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=I;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");I.className="geButton";if(!x){var L=I.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(J){function F(){d(H,S,function(V){k(S);b.addComment(V,function(M){V.id=M;E.push(V);p(S)},function(M){l(S);F();b.handleError(M,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),S=q(H,E,null,0);F();J.preventDefault();mxEvent.consume(J)});z.appendChild(L)}L=I.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var C=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(J){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";G();J.preventDefault();mxEvent.consume(J)});z.appendChild(L);b.commentsRefreshNeeded()&&(L=I.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(J){G();
-J.preventDefault();mxEvent.consume(J)}),z.appendChild(L));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(I.style.filter="invert(100%)"),mxEvent.addListener(I,"click",function(J){n();J.preventDefault();mxEvent.consume(J)}),z.appendChild(I));B.appendChild(z);var E=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
-var J=A.div.querySelector(".geCommentEditTxtArea"),F=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(V){if(null!=V){V.sort(function(W,U){return new Date(W.modifiedDate)-
-new Date(U.modifiedDate)});for(var M=0;M<V.length;M++)S(V[M].replies)}}H.sort(function(V,M){return new Date(V.modifiedDate)-new Date(M.modifiedDate)});O.innerHTML="";O.appendChild(t);t.style.display="block";E=H;for(H=0;H<E.length;H++)S(E[H].replies),q(E[H],E,null,0,C);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(O.appendChild(A.div),d(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
-": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function J(M){var W=H[M.id];if(null!=W)for(g(M,W),W=0;null!=M.replies&&W<M.replies.length;W++)J(M.replies[W])}if(this.window.isVisible()){for(var F=O.querySelectorAll(".geCommentDate"),H={},S=0;S<F.length;S++){var V=F[S];H[V.getAttribute("data-commentId")]=V}for(S=0;S<E.length;S++)J(E[S])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=
-new mxWindow(mxResources.get("comments"),B,e,f,c,m,!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()}));this.window.setLocation=function(J,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;J=Math.max(0,Math.min(J,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==J&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var P=mxUtils.bind(this,function(){var J=this.window.getX(),F=this.window.getY();this.window.setLocation(J,F)});mxEvent.addListener(window,"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}},ConfirmDialog=function(b,e,f,
+var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=P.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==P&&F++;L.style.display=0==F?"block":"none"}function d(I,F,H,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";J.style.display="block"}z={div:F,comment:I,saveCallback:H,deleteOnCancel:R};var J=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=J.offsetHeight+"px";U.value=I.content;F.insertBefore(U,J);var X=document.createElement("div");X.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),v()):W();z=null});t.className="geCommentEditBtn";X.appendChild(t);var E=mxUtils.button(mxResources.get("save"),function(){J.innerHTML="";I.content=U.value;mxUtils.write(J,I.content);W();H(I);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(E.click(),mxEvent.consume(M)):27==M.keyCode&&(t.click(),mxEvent.consume(M)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,F){F.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,W){function J(O,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
+"geCommentActionLnk";mxUtils.write(ba,O);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,I);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function O(Y){Q.push(S);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)S=S.nextSibling,O(Y.replies[ba])}var Q=[],S=X;O(I);return{pdiv:S,replies:Q}}function U(O,Q,S,Y,ba){function ea(){k(va);I.addReply(aa,function(ja){aa.id=ja;I.replies.push(aa);p(va);S&&S()},function(ja){Z();l(va);
+b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=V().pdiv,aa=b.newComment(O,b.getCurrentUser());aa.pCommentId=I.id;null==I.replies&&(I.replies=[]);var va=q(aa,I.replies,fa,R+1);Q?Z():ea()}if(W||!I.isResolved){L.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",I.id);X.style.marginLeft=20*R+5+"px";I.isResolved&&!Editor.isDarkMode()&&
+(X.style.backgroundColor="ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=I.user.pictureUrl||Editor.userImage;t.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";t.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,I.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
+I.id);g(I,M);E.appendChild(M);X.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,I.content||"");X.appendChild(t);I.isLocked&&(X.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);x||I.isLocked||0!=R&&!y||J(mxResources.get("reply"),function(){U("",!0)},I.isResolved);E=b.getCurrentUser();null==E||E.id!=I.user.id||x||I.isLocked||(J(mxResources.get("edit"),
+function(){function O(){d(I,X,function(){k(X);I.editComment(I.content,function(){p(X)},function(Q){l(X);O();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);I.deleteComment(function(O){if(!0===O){O=X.querySelector(".geCommentTxt");O.innerHTML="";mxUtils.write(O,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(O=
+0;O<Q.length;O++)Q[O].parentNode.removeChild(Q[O]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(O=0;O<Q.length;O++)P.removeChild(Q[O]);for(O=0;O<F.length;O++)if(F[O]==I){F.splice(O,1);break}L.style.display=0==P.getElementsByTagName("div").length?"block":"none"}},function(O){l(X);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function Q(){var S=
+O.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ba=V(I).replies,ea=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ea;for(var fa=ba[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=S.parentNode&&(fa[aa].style.display=Y);B||(ba[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+
+": ",!0,Q,!1,!0):U(mxResources.get("markedAsResolved"),!1,Q,!0)});X.appendChild(t);null!=H?P.insertBefore(X,H.nextSibling):P.appendChild(X);for(H=0;null!=I.replies&&H<I.replies.length;H++)t=I.replies[H],t.isResolved=I.isResolved,q(t,I.replies,null,R+1,W);null!=z&&(z.comment.id==I.id?(W=I.content,I.content=z.comment.content,d(I,X,z.saveCallback,z.deleteOnCancel),I.content=W):null==z.comment.id&&z.comment.pCommentId==I.id&&(P.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
+var x=!b.canComment(),y=b.canReplyToReplies(),z=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var K=EditorUi.compactUi?"26px":"30px",P=document.createElement("div");P.className="geCommentsList";P.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";P.style.bottom=parseInt(K)+7+"px";A.appendChild(P);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(L,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=K;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";K=document.createElement("a");K.className="geButton";if(!x){var D=K.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(D,"click",function(I){function F(){d(H,R,function(W){k(R);b.addComment(W,function(J){W.id=J;C.push(W);p(R)},function(J){l(R);F();b.handleError(J,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),R=q(H,C,null,0);F();I.preventDefault();mxEvent.consume(I)});u.appendChild(D)}D=K.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+var B=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(I){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();I.preventDefault();mxEvent.consume(I)});u.appendChild(D);b.commentsRefreshNeeded()&&(D=K.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(I){G();
+I.preventDefault();mxEvent.consume(I)}),u.appendChild(D));b.commentsSaveNeeded()&&(K=K.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',K.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(I){n();I.preventDefault();mxEvent.consume(I)}),u.appendChild(K));A.appendChild(u);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
+var I=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=I.value;I.parentNode.removeChild(I);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}P.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
+new Date(U.modifiedDate)});for(var J=0;J<W.length;J++)R(W[J].replies)}}H.sort(function(W,J){return new Date(W.modifiedDate)-new Date(J.modifiedDate)});P.innerHTML="";P.appendChild(L);L.style.display="block";C=H;for(H=0;H<C.length;H++)R(C[H].replies),q(C[H],C,null,0,B);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(P.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(H){P.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
+": "+H.message:""));this.hasError=!0})):P.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function I(J){var V=H[J.id];if(null!=V)for(g(J,V),V=0;null!=J.replies&&V<J.replies.length;V++)I(J.replies[V])}if(this.window.isVisible()){for(var F=P.querySelectorAll(".geCommentDate"),H={},R=0;R<F.length;R++){var W=F[R];H[W.getAttribute("data-commentId")]=W}for(R=0;R<C.length;R++)I(C[R])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
+new mxWindow(mxResources.get("comments"),A,e,f,c,m,!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()}));this.window.setLocation=function(I,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;I=Math.max(0,Math.min(I,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==I&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var I=this.window.getX(),F=this.window.getY();this.window.setLocation(I,F)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,e,f,
c,m,n,v,d,g,k,l){var p=document.createElement("div");p.style.textAlign="center";l=null!=l?l:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=l+"px";q.style.lineHeight="1.2em";mxUtils.write(q,e);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",k),q.appendChild(e),p.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
"nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(x.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&k.appendChild(n);var y=mxUtils.button(m||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(x.checked)});k.appendChild(y);null!=v?(y.innerHTML=
v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(n);p.appendChild(k);g?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(x),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),q.appendChild(m),p.appendChild(q),mxEvent.addListener(m,
-"click",function(A){x.checked=!x.checked;mxEvent.consume(A)})):k.style.marginTop="12px";this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+"click",function(z){x.checked=!x.checked;mxEvent.consume(z)})):k.style.marginTop="12px";this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,m){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,m));return b};
EditorUi.prototype.patchPages=function(b,e,f,c,m){var n={},v=[],d={},g={},k={},l={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])n[p]=c[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)g[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)d[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},A=mxUtils.bind(this,function(I){var O=null!=I?I.getId():"";if(null!=I&&!y[O]){y[O]=!0;v.push(I);var t=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][O]:null;null!=t&&(this.updatePageRoot(I),null!=t.name&&I.setName(t.name),
-null!=t.view&&this.patchViewState(I,t.view),null!=t.cells&&this.patchPage(I,t.cells,n[I.getId()],m),!f||null==t.cells&&null==t.view||(I.needsUpdate=!0))}I=l[O];null!=I&&(delete l[O],A(k[I]));I=d[O];null!=I&&(delete d[O],B(I))}),B=mxUtils.bind(this,function(I){I=mxUtils.parseXml(I.data).documentElement;I=new DiagramPage(I);this.updatePageRoot(I);var O=k[I.getId()];null==O?A(I):(this.patchPage(O,this.diffPages([O],[I]),n[O.getId()],m),f&&(O.needsUpdate=!0))});A();for(p in l)A(k[l[p]]),delete l[p];for(p in d)B(d[p]),
+e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},z=mxUtils.bind(this,function(K){var P=null!=K?K.getId():"";if(null!=K&&!y[P]){y[P]=!0;v.push(K);var L=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][P]:null;null!=L&&(this.updatePageRoot(K),null!=L.name&&K.setName(L.name),
+null!=L.view&&this.patchViewState(K,L.view),null!=L.cells&&this.patchPage(K,L.cells,n[K.getId()],m),!f||null==L.cells&&null==L.view||(K.needsUpdate=!0))}K=l[P];null!=K&&(delete l[P],z(k[K]));K=d[P];null!=K&&(delete d[P],A(K))}),A=mxUtils.bind(this,function(K){K=mxUtils.parseXml(K.data).documentElement;K=new DiagramPage(K);this.updatePageRoot(K);var P=k[K.getId()];null==P?z(K):(this.patchPage(P,this.diffPages([P],[K]),n[P.getId()],m),f&&(P.needsUpdate=!0))});z();for(p in l)z(k[l[p]]),delete l[p];for(p in d)A(d[p]),
delete d[p];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
EditorUi.prototype.createParentLookup=function(b,e){function f(k){var l=c[k];null==l&&(l={inserted:[],moved:{}},c[k]=l);return l}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var m=0;m<e[EditorUi.DIFF_INSERT].length;m++){var n=e[EditorUi.DIFF_INSERT][m],v=null!=n.parent?n.parent:"",d=null!=n.previous?n.previous:"";f(v).inserted[d]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][g],null!=n.previous&&(v=n.parent,null==v&&(m=b.getCell(g),null!=m&&(m=
b.getParent(m),null!=m&&(v=m.getId()))),null!=v&&(f(v).moved[n.previous]=g));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(B,I){!d.get(B)&&c&&(d.put(B,!0),g.push(B))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
-b.root=p);this.patchCellRecursive(b,m,m.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var x=0;x<e[EditorUi.DIFF_REMOVE].length;x++){var y=m.getCell(e[EditorUi.DIFF_REMOVE][x]);null!=y&&m.remove(y)}if(null!=e[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(q in e[EditorUi.DIFF_UPDATE])this.patchCell(m,m.getCell(q),e[EditorUi.DIFF_UPDATE][q],null!=A?A[q]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(x=0;x<e[EditorUi.DIFF_INSERT].length;x++)l=e[EditorUi.DIFF_INSERT][x],
+EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(A,K){!d.get(A)&&c&&(d.put(A,!0),g.push(A))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
+b.root=p);this.patchCellRecursive(b,m,m.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var x=0;x<e[EditorUi.DIFF_REMOVE].length;x++){var y=m.getCell(e[EditorUi.DIFF_REMOVE][x]);null!=y&&m.remove(y)}if(null!=e[EditorUi.DIFF_UPDATE]){var z=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(q in e[EditorUi.DIFF_UPDATE])this.patchCell(m,m.getCell(q),e[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(x=0;x<e[EditorUi.DIFF_INSERT].length;x++)l=e[EditorUi.DIFF_INSERT][x],
y=m.getCell(l.id),null!=y&&(m.setTerminal(y,m.getCell(l.source),!0),m.setTerminal(y,m.getCell(l.target),!1));m.updateEdgeParent=v;if(c&&0<g.length)for(x=0;x<g.length;x++)m.contains(g[x])&&m.updateEdgeParent(g[x])}finally{m.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(b,e,f,c,m){if(null!=f){var n=c[f.getId()],v=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var d=0,g=e.getChildCount(f),k="",l=0;l<g;l++){var p=e.getChildAt(f,l).getId();null==n[k]&&(null==m[EditorUi.DIFF_UPDATE]||null==m[EditorUi.DIFF_UPDATE][p]||null==m[EditorUi.DIFF_UPDATE][p].previous&&null==m[EditorUi.DIFF_UPDATE][p].parent)&&(n[k]=p);k=p}g=mxUtils.bind(this,function(q,x){var y=null!=q?q.getId():"";null!=q&&x&&(x=
e.getCell(y),null!=x&&x!=q&&(q=null));null!=q&&(e.getChildAt(f,d)!=q&&e.add(f,q,d),this.patchCellRecursive(b,e,q,c,m),d++);return y});for(k=[null];0<k.length;)if(l=k.shift(),l=g(null!=l?l.child:null,null!=l?l.insert:!1),p=n[l],null!=p&&(delete n[l],k.push({child:e.getCell(p)})),p=v[l],null!=p&&(delete v[l],k.push({child:this.getCellForJson(p),insert:!0})),0==k.length){for(l in n)k.push({child:e.getCell(n[l])}),delete n[l];for(l in v)k.push({child:this.getCellForJson(v[l]),insert:!0}),delete v[l]}}};
@@ -12216,15 +12217,15 @@ b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isR
DrawioFileSync.prototype.merge=function(b,e,f,c,m,n){try{this.file.stats.merged++;this.lastModified=new Date;var v=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var d=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(d,this.ui.pages):null;var g=this.file.isRealtime()?this.ui.diffPages(d,this.file.ownPages):null;d=this.ui.applyPatches(d,b);var k=null==e?null:this.ui.getHashValueForPages(d);
this.file.setShadowPages(d);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",g,"checksum",e,"current",k,"valid",e==k,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",v,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=k){var l=this.ui.hashValue(v),p=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(m,b,"From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nCurrent: "+k,v,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(d)]);return}null==this.patchRealtime(b,null,g)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(y){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=m&&m(y);try{if(this.file.errorReportsEnabled)p=this.ui.hashValue(this.file.getCurrentRevisionId()),l=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),y);else{var q=this.file.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),x,y)}}catch(A){}}};
+null!=m&&m(y);try{if(this.file.errorReportsEnabled)p=this.ui.hashValue(this.file.getCurrentRevisionId()),l=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+p+"\nTo: "+l+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),y);else{var q=this.file.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),x,y)}}catch(z){}}};
DrawioFileSync.prototype.fileChanged=function(b,e,f,c){var m=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(n){null!=f&&f()||(this.isValidState()?this.catchup(n,b,e,f):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=m};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var m=this.file.getCurrentRevisionId(),n=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",m,"to",n,"valid",this.isValidState());if(m==n)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorSecret(b);if(null==v||"1"==urlParams.lockdown)this.reload(e,f,c);else{var d=0,g=!1,k=mxUtils.bind(this,function(){if(null==
c||!c())if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var l=!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(m)+"&to="+encodeURIComponent(n)+(null!=v?"&secret="+encodeURIComponent(v):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(p);if(l&&
-(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var A=JSON.parse(q.getText());if(null!=A&&0<A.length)for(var B=0;B<A.length;B++){var I=this.stringToObject(A[B]);if(I.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(I.v===
-DrawioFileSync.PROTOCOL&&null!=I.d)x=I.d.checksum,y.push(I.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",g,"temp",y,"checksum",x)}catch(O){y=[],null!=window.console&&"1"==urlParams.test&&console.log(O)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(O){null!=f&&f(O)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(m){null!=e&&e(m)}),f,c)};
+(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var A=0;A<z.length;A++){var K=this.stringToObject(z[A]);if(K.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(K.v===
+DrawioFileSync.PROTOCOL&&null!=K.d)x=K.d.checksum,y.push(K.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",g,"temp",y,"checksum",x)}catch(P){y=[],null!=window.console&&"1"==urlParams.test&&console.log(P)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(P){null!=f&&f(P)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(m){null!=e&&e(m)}),f,c)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,m=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(n){window.clearTimeout(m);c&&(200<=n.getStatus()&&299>=n.getStatus()?e(n.getText()):f({code:n.getStatus(),message:"Token Error "+n.getStatus()}))}))};
@@ -12299,10 +12300,10 @@ null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedir
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),m=null;if(null!=c){null!=c.current&&(m=c.current.userId,f.push(c[m].user),f[0].isCurrent=!0);for(var n in c)"current"!=n&&n!=m&&f.push(c[n].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(m){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(d){var g=null!=d.message?d.message:mxResources.get("cannotLogin");null!=d&&null!=d.error&&403==d.error.code&&null!=d.error.data&&0<d.error.data.length&&"domainPolicy"==d.error.data[0].reason&&(g=d.error.message);this.logout();this.ui.showError(mxResources.get("error"),
g,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,m){try{var n=!0,v=null,d=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var g=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:g})}),this.ui.timeout);var k=null,l=!1;"string"===typeof f.params?k=f.params:null!=f.params&&(k=JSON.stringify(f.params),l=!0);var p=f.fullUrl||this.GDriveBaseUrl+f.url;l&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,k,f.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(x,y){if(null!=f.headers)for(var A in f.headers)x.setRequestHeader(A,f.headers[A]);else null!=f.contentType?
-x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(I){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var A=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,B=null!=A&&0<A.length?A[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
-(403!=y.error.code||"domainPolicy"!=B&&"The requested mime type change is forbidden."!=y.error.message)?null!=y&&null!=y.error&&(401==y.error.code||403==y.error.code&&"rateLimitExceeded"!=B)?403==y.error.code&&this.retryAuth||401==y.error.code&&this.retryAuth&&"authError"==B?(null!=m&&m(y),this.retryAuth=!1):(this.retryAuth=!0,this.execute(g)):null!=y&&null!=y.error&&412!=y.error.code&&404!=y.error.code&&400!=y.error.code&&this.currentRequest==f&&d<this.maxRetries?(d++,this.requestThread=window.setTimeout(g,
-Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(I){if(null!=m)m(I);else throw I;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+function(){n=!1;null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:g})}),this.ui.timeout);var k=null,l=!1;"string"===typeof f.params?k=f.params:null!=f.params&&(k=JSON.stringify(f.params),l=!0);var p=f.fullUrl||this.GDriveBaseUrl+f.url;l&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,k,f.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(x,y){if(null!=f.headers)for(var z in f.headers)x.setRequestHeader(z,f.headers[z]);else null!=f.contentType?
+x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(K){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var z=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,A=null!=z&&0<z.length?z[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
+(403!=y.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=y.error.message)?null!=y&&null!=y.error&&(401==y.error.code||403==y.error.code&&"rateLimitExceeded"!=A)?403==y.error.code&&this.retryAuth||401==y.error.code&&this.retryAuth&&"authError"==A?(null!=m&&m(y),this.retryAuth=!1):(this.retryAuth=!0,this.execute(g)):null!=y&&null!=y.error&&412!=y.error.code&&404!=y.error.code&&400!=y.error.code&&this.currentRequest==f&&d<this.maxRetries?(d++,this.requestThread=window.setTimeout(g,
+Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(K){if(null!=m)m(K);else throw K;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,m,n,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(d){this.updateAuthInfo(d,!0,!0,c,m)}),m):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),f,c,m,n,v):null!=m&&m(d)}),m)};DriveClient.prototype.updateAuthInfo=function(f,c,m,n,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(m||null==this.user){var d=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var g=JSON.parse(d);this.setPersistentToken(g,!c);null!=n&&n()}),v)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,m,n,v,d){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var g=
JSON.parse(this.getPersistentToken(!0));g&&null!=g.current&&(this.userId=g.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),this.updateAuthInfo(l,!0,!1,m,n)):(0!=l.getStatus()&&this.logout(),null!=n&&n(l))}),n);else{var k=
@@ -12316,24 +12317,24 @@ m){return this.getFile(f,c,m,!0,!0)};DriveClient.prototype.loadDescriptor=functi
""))+"&orderBy=modifiedDate desc,title"},n,v)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var m=null;if(null!=f)for(var n=0;n<f.length;n++)if(f[n].key==c){m=f[n].value;break}return m};DriveClient.prototype.getFile=function(f,c,m,n,v){n=null!=n?n:!1;v=null!=v?v:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(d){d.title=d.originalFilename;d.headRevisionId=d.id;d.id=f;this.getXmlFile(d,
c,m)}),m):this.loadDescriptor(f,mxUtils.bind(this,function(d){try{if(null!=this.user){var g=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,m,null,{Authorization:"Bearer "+b}):n||v||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,m,!0,v):this.getXmlFile(d,c,m)}else m({message:mxResources.get("loggedOut")})}catch(k){if(null!=m)m(k);
else throw k;}}),m)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,m,n,v){try{var d={Authorization:"Bearer "+b},g=f.downloadUrl;if(null==g)null!=m&&m({message:mxResources.get("exportOptionsDisabledDetails")});else{var k=0,l=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(p){try{if(null==p)m({message:mxResources.get("invalidOrMissingFile")});
-else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,p,f)):m({message:mxResources.get("notADiagramFile")});else{var q=!1;if(/\.png$/i.test(f.title)){var x=p.lastIndexOf(",");if(0<x){var y=this.ui.extractGraphModelFromPng(p);if(null!=y&&0<y.length)p=y;else try{y=p.substring(x+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y),B=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==B||0<B.getElementsByTagName("parsererror").length?
-q=!0:p=A}catch(I){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(A=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(I){try{4==I.readyState&&(200<=I.status&&299>=I.status?c(new LocalFile(this.ui,I.responseText,f.title+this.extension,
-!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(O){if(null!=m)m(O);else throw O;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(I){if(null!=m)m(I);else throw I;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
-9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(E){if(null!=n)n(E);else throw E;try{if(!f.isConflict(E)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(E)||"unknown");null!=E&&null!=E.error&&null!=E.error.code&&(G+="-code_"+E.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(P){}}),x=mxUtils.bind(this,function(E){q(E);try{EditorUi.logError(E.message,null,null,
-E)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),A=f.desc.etag,B=f.desc.modifiedDate,I=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var t=null,z=!1,L={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(L.mimeType))L.mimeType=this.xmlMimeType,t=f.desc,z=c=!0;else if("application/octet-stream"==L.mimeType||"1"==urlParams["override-mime"]&&L.mimeType!=this.xmlMimeType)L.mimeType=this.xmlMimeType;
-var C=mxUtils.bind(this,function(E,G,P){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));P||(null!=E||d||(E=this.placeholderThumbnail,G=this.placeholderMimeType),null!=E&&null!=G&&(L.thumbnail={image:E,mimeType:G}));var J=f.getData(),F=mxUtils.bind(this,function(V){try{if(f.saveDelay=(new Date).getTime()-
-y,f.saveLevel=11,null==V)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var M=(new Date(V.modifiedDate)).getTime()-(new Date(B)).getTime();if(0>=M||A==V.etag||c&&I==V.headRevisionId){f.saveLevel=12;var W=[];0>=M&&W.push("invalid modified time");A==V.etag&&W.push("stale etag");c&&I==V.headRevisionId&&W.push("stale revision");var U=W.join(", ");q({message:mxResources.get("errorSavingFile")+": "+U},V);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+I+"."+B+"-"+this.ui.hashValue(A)+"-to-"+V.headRevisionId+"."+V.modifiedDate+"-"+this.ui.hashValue(V.etag)+(0<U.length?"-errors-"+U:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(X){}}else if(f.saveLevel=null,m(V,J),null!=t){this.executeRequest({url:"/files/"+t.id+"/revisions/"+t.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+t.id+"/revisions/"+
-t.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+t.id+"."+t.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(X){}}}}catch(X){x(X)}}),H=mxUtils.bind(this,function(V,M){f.saveLevel=4;try{null!=k&&(L.properties=k);var W=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),U=mxUtils.bind(this,function(D){f.saveLevel=5;try{var K=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,N=null;try{N=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),L,V,c||D||K,M,D?null:W,z),mxUtils.bind(this,function(Q){window.clearTimeout(N);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(N);
-if(T){f.saveLevel=6;try{f.isConflict(Q)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(R){f.saveLevel=7;try{if(null!=R&&R.etag==W)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(X,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{X(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&R.headRevisionId==I&&EditorUi.debug("DriveClient: Remote Etag Changed","local",W,
-"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(D){f.saveLevel=9;if(D||null==W)U(D);else{var K=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){K=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(N){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(N){window.clearTimeout(T);
-if(K){f.saveLevel=10;try{null!=N&&N.headRevisionId==I?("1"==urlParams.test&&W!=N.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",W,"to",N.etag,"rev",f.desc.headRevisionId,"response",[N],"file",[f]),W=N.etag,U(D)):q({error:{code:412}},N)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(N){window.clearTimeout(T);K&&(f.saveLevel=11,q(N))}))}});if(O&&null==E){f.saveLevel=8;var u=new Image;u.onload=mxUtils.bind(this,function(){try{var D=this.thumbnailWidth/u.width,K=document.createElement("canvas");
-K.width=this.thumbnailWidth;K.height=Math.floor(u.height*D);K.getContext("2d").drawImage(u,0,0,K.width,K.height);var T=K.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");L.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(N){try{X(!1)}catch(Q){x(Q)}}});u.src="data:image/png;base64,"+V}else X(!1)}catch(D){x(D)}});if(O){var S=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(V){H(V,!0)}),q,this.ui.getCurrentFile()!=f?
-J:null,S.scale,S.border)}else H(J,!1)}catch(V){x(V)}});try{f.saveLevel=2,(d||O||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=L.mimeType&&"application/vnd.jgraph.mxfile"!=L.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(E){try{var G=null;try{null!=E&&(G=E.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){G=null}C(G,"image/png")}catch(P){x(P)}})))&&
-C(null,null,f.constructor!=DriveLibrary)}catch(E){x(E)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(E){x(E)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
+else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,p,f)):m({message:mxResources.get("notADiagramFile")});else{var q=!1;if(/\.png$/i.test(f.title)){var x=p.lastIndexOf(",");if(0<x){var y=this.ui.extractGraphModelFromPng(p);if(null!=y&&0<y.length)p=y;else try{y=p.substring(x+1);var z=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(z).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?
+q=!0:p=z}catch(K){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(z=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(z):Base64.decode(z));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(K){try{4==K.readyState&&(200<=K.status&&299>=K.status?c(new LocalFile(this.ui,K.responseText,f.title+this.extension,
+!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(P){if(null!=m)m(P);else throw P;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(K){if(null!=m)m(K);else throw K;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
+9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(C){if(null!=n)n(C);else throw C;try{if(!f.isConflict(C)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(C)||"unknown");null!=C&&null!=C.error&&null!=C.error.code&&(G+="-code_"+C.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(N){}}),x=mxUtils.bind(this,function(C){q(C);try{EditorUi.logError(C.message,null,null,
+C)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,K=f.desc.headRevisionId,P=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var L=null,u=!1,D={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,L=f.desc,u=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
+var B=mxUtils.bind(this,function(C,G,N){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));N||(null!=C||d||(C=this.placeholderThumbnail,G=this.placeholderMimeType),null!=C&&null!=G&&(D.thumbnail={image:C,mimeType:G}));var I=f.getData(),F=mxUtils.bind(this,function(W){try{if(f.saveDelay=(new Date).getTime()-
+y,f.saveLevel=11,null==W)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var J=(new Date(W.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=J||z==W.etag||c&&K==W.headRevisionId){f.saveLevel=12;var V=[];0>=J&&V.push("invalid modified time");z==W.etag&&V.push("stale etag");c&&K==W.headRevisionId&&V.push("stale revision");var U=V.join(", ");q({message:mxResources.get("errorSavingFile")+": "+U},W);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
+null,"from-"+K+"."+A+"-"+this.ui.hashValue(z)+"-to-"+W.headRevisionId+"."+W.modifiedDate+"-"+this.ui.hashValue(W.etag)+(0<U.length?"-errors-"+U:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(X){}}else if(f.saveLevel=null,m(W,I),null!=L){this.executeRequest({url:"/files/"+L.id+"/revisions/"+L.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+L.id+"/revisions/"+
+L.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+L.id+"."+L.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(X){}}}}catch(X){x(X)}}),H=mxUtils.bind(this,function(W,J){f.saveLevel=4;try{null!=k&&(D.properties=k);var V=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:f.getCurrentEtag(),U=mxUtils.bind(this,function(E){f.saveLevel=5;try{var M=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),D,W,c||E||M,J,E?null:V,u),mxUtils.bind(this,function(Q){window.clearTimeout(O);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(O);
+if(T){f.saveLevel=6;try{f.isConflict(Q)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(S){f.saveLevel=7;try{if(null!=S&&S.etag==V)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(X,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{X(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&S.headRevisionId==K&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
+"remote",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),q(Q,S)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(S){x(S)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==V)U(E);else{var M=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){M=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(O){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(O){window.clearTimeout(T);
+if(M){f.saveLevel=10;try{null!=O&&O.headRevisionId==K?("1"==urlParams.test&&V!=O.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",O.etag,"rev",f.desc.headRevisionId,"response",[O],"file",[f]),V=O.etag,U(E)):q({error:{code:412}},O)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(O){window.clearTimeout(T);M&&(f.saveLevel=11,q(O))}))}});if(P&&null==C){f.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var E=this.thumbnailWidth/t.width,M=document.createElement("canvas");
+M.width=this.thumbnailWidth;M.height=Math.floor(t.height*E);M.getContext("2d").drawImage(t,0,0,M.width,M.height);var T=M.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(O){try{X(!1)}catch(Q){x(Q)}}});t.src="data:image/png;base64,"+W}else X(!1)}catch(E){x(E)}});if(P){var R=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(W){H(W,!0)}),q,this.ui.getCurrentFile()!=f?
+I:null,R.scale,R.border)}else H(I,!1)}catch(W){x(W)}});try{f.saveLevel=2,(d||P||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(C){try{var G=null;try{null!=C&&(G=C.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(N){G=null}B(G,"image/png")}catch(N){x(N)}})))&&
+B(null,null,f.constructor!=DriveLibrary)}catch(C){x(C)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(C){x(C)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
n(new DriveFile(this.ui,c,k))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,m,n,v,d,g){v=null!=v?v:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=d&&(k["If-Match"]=d);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:k,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=m?v?m:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(m):Graph.base64EncodeUnicode(m):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");g&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),m=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,m){this.filePickerCallback=
@@ -12411,15 +12412,15 @@ this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(g)):n||401!==g.getSta
e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,m,n){n=null!=n?n:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var d=JSON.parse(v.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||/\.pdf$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,f,c);
else{var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(p){try{if(window.clearTimeout(l),k){/\.html$/i.test(d.name)&&(p=this.removeExtraHtmlContent(p));var q=null;if(0<(g?p.lastIndexOf(","):-1)){var x=this.ui.extractGraphModelFromPng(p);null!=x&&0<x.length?p=x:q=new LocalFile(this.ui,p,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)){var y=
-p.substring(22);p=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,d["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(p,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=c)c(B);else throw B;}}),d.name):null!=q?f(q):n?f(new OneDriveLibrary(this.ui,
-p,d)):f(new OneDriveFile(this.ui,p,d))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(p){window.clearTimeout(l);k&&c(this.parseRequestText(p))}),g||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
+p.substring(22);p=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,d["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(p,mxUtils.bind(this,function(z){try{4==z.readyState&&(200<=z.status&&299>=z.status?f(new LocalFile(this.ui,z.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),d.name):null!=q?f(q):n?f(new OneDriveLibrary(this.ui,
+p,d)):f(new OneDriveFile(this.ui,p,d))}}catch(z){if(null!=c)c(z);else throw z;}}),mxUtils.bind(this,function(p){window.clearTimeout(l);k&&c(this.parseRequestText(p))}),g||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
function(e,f,c,m){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(n){n?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,m):m()})):m({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,m){f=this.getItemRef(f);var n=this.getItemRef(e);f.driveId!=n.driveId?m({message:mxResources.get("cannotMoveOneDrive",
null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,m)};OneDriveClient.prototype.insertLibrary=function(e,f,c,m,n){this.insertFile(e,f,c,m,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,m,n,v){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(v,e,!0,mxUtils.bind(this,function(d){if(d){d="/me/drive/root";null!=v&&(d=this.getItemURL(v,!0));var g=mxUtils.bind(this,function(k){n?
c(new OneDriveLibrary(this.ui,f,k)):c(new OneDriveFile(this.ui,f,k))});d=this.baseUrl+d+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(d,"","PUT",null,mxUtils.bind(this,function(k){this.writeLargeFile(this.getItemURL(k.id),f,g,m)}),m):this.writeFile(d,f,"PUT",null,g,m)}else m()}))):m({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
c,m){var n="/me/drive/root";null!=e&&(n=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+n+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(v){404==v.getStatus()?m(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){m(!0)},function(){m(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){m(!1)}))}),function(v){m(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
f,c,m){try{var n=e.getData(),v=mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(p){f(p,n)}),l=this.getItemURL(e.getId());4E6<=g.length?this.writeLargeFile(l,g,k,c,m):this.writeFile(l+"/content/",g,"PUT",null,k,c,m)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){v(this.ui.base64ToBlob(g,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,d.scale,d.border)}else v(n)}catch(g){c(g)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,m,n){try{if(null!=f){var v=mxUtils.bind(this,function(g,k,l){try{l=l||0;var p=!0,q=null;q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=f.substr(k,4194304),y=new mxXmlRequest(g,x,"PUT");y.setRequestHeaders=mxUtils.bind(this,function(A,B){A.setRequestHeader("Content-Length",x.length);A.setRequestHeader("Content-Range","bytes "+k+"-"+(k+x.length-1)+"/"+f.length)});y.send(mxUtils.bind(this,
-function(A){window.clearTimeout(q);if(p){var B=A.getStatus();200<=B&&299>=B?(B=k+x.length,B==f.length?c(JSON.parse(A.getText())):v(g,B,l)):500<=B&&599>=B&&2>l?(l++,v(g,k,l)):m(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(q);p&&m(this.parseRequestText(A))}))}catch(A){m(A)}}),d=mxUtils.bind(this,function(g){try{var k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(e+
+OneDriveClient.prototype.writeLargeFile=function(e,f,c,m,n){try{if(null!=f){var v=mxUtils.bind(this,function(g,k,l){try{l=l||0;var p=!0,q=null;q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=f.substr(k,4194304),y=new mxXmlRequest(g,x,"PUT");y.setRequestHeaders=mxUtils.bind(this,function(z,A){z.setRequestHeader("Content-Length",x.length);z.setRequestHeader("Content-Range","bytes "+k+"-"+(k+x.length-1)+"/"+f.length)});y.send(mxUtils.bind(this,
+function(z){window.clearTimeout(q);if(p){var A=z.getStatus();200<=A&&299>=A?(A=k+x.length,A==f.length?c(JSON.parse(z.getText())):v(g,A,l)):500<=A&&599>=A&&2>l?(l++,v(g,k,l)):m(this.parseRequestText(z),z)}}),mxUtils.bind(this,function(z){window.clearTimeout(q);p&&m(this.parseRequestText(z))}))}catch(z){m(z)}}),d=mxUtils.bind(this,function(g){try{var k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(e+
"/createUploadSession","{}","POST");p.setRequestHeaders=mxUtils.bind(this,function(q,x){q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b);null!=n&&q.setRequestHeader("If-Match",n)});p.send(mxUtils.bind(this,function(q){window.clearTimeout(l);k&&(200<=q.getStatus()&&299>=q.getStatus()?(q=JSON.parse(q.getText()),v(q.uploadUrl,0)):g||401!==q.getStatus()?m(this.parseRequestText(q),q):this.authenticate(function(){d(!0)},m,g))}),mxUtils.bind(this,function(q){window.clearTimeout(l);
k&&m(this.parseRequestText(q))}))}catch(q){m(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},m):d(!1)}else m({message:mxResources.get("unknownError")})}catch(g){m(g)}};OneDriveClient.prototype.writeFile=function(e,f,c,m,n,v,d){try{if(null!=e&&null!=f){var g=mxUtils.bind(this,function(k){try{var l=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){l=!1;v({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(x){}var q=new mxXmlRequest(e,f,c);q.setRequestHeaders=
mxUtils.bind(this,function(x,y){x.setRequestHeader("Content-Type",m||" ");x.setRequestHeader("Authorization","Bearer "+b);null!=d&&x.setRequestHeader("If-Match",d)});q.send(mxUtils.bind(this,function(x){window.clearTimeout(p);l&&(200<=x.getStatus()&&299>=x.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(x.getText()))):k||401!==x.getStatus()?v(this.parseRequestText(x),x):this.authenticate(function(){g(!0)},v,k))}),mxUtils.bind(this,function(x){window.clearTimeout(p);
@@ -12446,33 +12447,33 @@ v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.s
mxUtils.bind(this,function(g,k){n?(window.onGitHubCallback=null,n=!1,null==g?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),b=g.access_token,this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=k&&k.close())):null!=k&&k.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:m})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(m){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,m,n){var v=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(q,x){q.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(l);var q=
-mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();d()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(k)if(200<=e.getStatus()&&299>=e.getStatus()||m&&404==e.getStatus())f(e);else if(401===e.getStatus())g?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){d(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var x=
-!1;try{var y=JSON.parse(e.getText());null!=y&&"Resource not accessible by integration"==y.message?q():(null!=y&&null!=y.errors&&0<y.errors.length&&(x="too_large"==y.errors[0].code),c({message:mxResources.get(x?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(x?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):q():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
+mxUtils.bind(this,function(){var z=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){z();d()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(k)if(200<=e.getStatus()&&299>=e.getStatus()||m&&404==e.getStatus())f(e);else if(401===e.getStatus())g?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){d(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var x=
+!1;try{var y=JSON.parse(e.getText());null!=y&&"Resource not accessible by integration"==y.message?q():(null!=y&&null!=y.errors&&0<y.errors.length&&(x="too_large"==y.errors[0].code),c({message:mxResources.get(x?"drawingTooLarge":"forbidden")}))}catch(z){c({message:mxResources.get(x?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):q():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(q){window.clearTimeout(l);k&&c(q)}))}),d=mxUtils.bind(this,function(g){null==this.user?this.updateUser(function(){d(!0)},c,g):v(g)});null==b?this.authenticate(function(){d(!0)},c):d(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,m,n,v,d){var g="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+
f+"/contents/"+c+"?ref="+m+g,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(k){try{n(k.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(l){v(l)}}),v,null,d)};GitHubClient.prototype.getFile=function(e,f,c,m,n){m=null!=m?m:!1;var v=e.split("/"),d=v[0],g=v[1],k=v[2];e=v.slice(3,v.length).join("/");v=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&v))if(null!=b){n=this.baseUrl+"/repos/"+d+"/"+g+"/contents/"+
e+"?ref="+k;var l={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(n,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,l)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+g+"/contents/"+e+"?ref="+k+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(p){try{f(this.createGitHubFile(d,g,k,JSON.parse(p.getText()),m))}catch(q){c(q)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
c,m,n){e={org:e,repo:f,ref:c,name:m.name,path:m.path,sha:m.sha,html_url:m.html_url,download_url:m.download_url};f=m.content;"base64"===m.encoding&&(/\.jpe?g$/i.test(m.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(m.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(m.name)?(m=this.ui.extractGraphModelFromPng(f),f=null!=m&&0<m.length?m:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
-f,c,m,n){this.insertFile(e,f,c,m,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");var g=v[0],k=v[1],l=v[2],p=v.slice(3,v.length).join("/");0<p.length&&(p+="/");p+=e;this.checkExists(g+"/"+k+"/"+l+"/"+p,!0,mxUtils.bind(this,function(q,x){q?n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(y){this.writeFile(g,k,l,p,y,f,x,mxUtils.bind(this,function(A){try{var B=JSON.parse(A.getText());c(this.createGitHubFile(g,k,l,B.content,
-n))}catch(I){m(I)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
+f,c,m,n){this.insertFile(e,f,c,m,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");var g=v[0],k=v[1],l=v[2],p=v.slice(3,v.length).join("/");0<p.length&&(p+="/");p+=e;this.checkExists(g+"/"+k+"/"+l+"/"+p,!0,mxUtils.bind(this,function(q,x){q?n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(y){this.writeFile(g,k,l,p,y,f,x,mxUtils.bind(this,function(z){try{var A=JSON.parse(z.getText());c(this.createGitHubFile(g,k,l,A.content,
+n))}catch(K){m(K)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
function(e,f,c,m,n,v,d,g,k){v.length>=this.maxFileSize?k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 1 MB)"}):(c={path:m,branch:decodeURIComponent(c),message:n,content:v},null!=d&&(c.sha=d),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+m,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(l){g(l)}),mxUtils.bind(this,function(l){404==l.code&&(l.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
l.code=null);k(l)})))};GitHubClient.prototype.checkExists=function(e,f,c){var m=e.split("/"),n=m[0],v=m[1],d=m[2];e=m.slice(3,m.length).join("/");this.getSha(n,v,e,d,mxUtils.bind(this,function(g){if(f){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){k();c(!0,g)},function(){k();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(g){c(!0)}),
!0)};GitHubClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;f(JSON.parse(y.getText()).content.sha)}),mxUtils.bind(this,function(y){c(y)}))}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.sha,
x)}),c,this.ui.getCurrentFile()!=e?e.getData():null,q.scale,q.border)}else l(e.meta.sha,Base64.encode(e.getData()))});m?this.getSha(v,d,k,g,mxUtils.bind(this,function(q){e.meta.sha=q;p()}),c):p()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";
k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){t()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(z,L,C,E){var G=document.createElement("a");G.setAttribute("title",z);G.style.cursor="pointer";mxUtils.write(G,z);mxEvent.addListener(G,"click",L);
-E&&(G.style.textDecoration="underline");null!=C&&(z=l.cloneNode(),z.style.padding=C,z.appendChild(G),G=z);return G}),x=mxUtils.bind(this,function(z){var L=document.createElement("div");L.style.marginBottom="8px";L.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;t()}),null,!0));z||(mxUtils.write(L," / "),L.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var C=v.split("/");for(z=0;z<C.length;z++)(function(E){mxUtils.write(L,
-" / ");L.appendChild(q(C[E],mxUtils.bind(this,function(){v=C.slice(0,E+1).join("/");I()}),null,!0))})(z)}k.appendChild(L)}),y=mxUtils.bind(this,function(z){this.ui.handleError(z,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,t()):this.ui.hideDialog()}),null,{})}),A=null,B=null,I=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
-z,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){I(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();1==z&&(x(),
-k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,t();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");I()}}),"4px")));var G=JSON.parse(E.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var P=!0,J=0;E=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(S,V){if(F==("dir"==S.type)){V=l.cloneNode();V.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;var M=document.createElement("img");
-M.src=IMAGE_PATH+"/"+("dir"==S.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;V.appendChild(M);V.appendChild(q(S.name+("dir"==S.type?"/":""),mxUtils.bind(this,function(){"dir"==S.type?(v=S.path,I()):e&&"file"==S.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+S.path))})));k.appendChild(V);J++}})(G[H],H)});E(!0);e&&E(!1)}}),y,!0)}),O=mxUtils.bind(this,function(z,L){null==z&&(k.innerHTML="",z=1);var C=
-new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var E=mxUtils.bind(this,function(){O(z+1)});mxEvent.addListener(A,"click",
-E);this.executeRequest(C,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==z&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;t()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&L)n=G[0].name,v="",I();else{for(var P=0;P<G.length;P++)mxUtils.bind(this,function(J,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(J.name,mxUtils.bind(this,
-function(){n=J.name;v="";I()})));k.appendChild(H)})(G[P],P);100==G.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&E()},mxEvent.addListener(k,"scroll",B))}}),y)}),t=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&mxEvent.removeListener(k,"scroll",B);null!=A&&null!=
-A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){t(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();E=JSON.parse(E.getText());if(null==E||0==E.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==z&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var P=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var F=J.split("/");if(1<F.length){J=F[0];var H=F[1];3>F.length?(c=J,m=H,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(J+"/"+H+"/"+F,mxUtils.bind(this,function(S){this.ui.spinner.stop();c=S.meta.org;m=S.meta.repo;n=decodeURIComponent(S.meta.ref);v="";I()}),mxUtils.bind(this,function(S){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(P.container,300,80,!0,!1);P.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<E.length;G++)mxUtils.bind(this,function(P,J){var F=l.cloneNode();F.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(P.full_name,mxUtils.bind(this,function(){c=P.owner.login;
-m=P.name;v="";O(null,!0)})));k.appendChild(F)})(E[G],G)}100==E.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+function(){L()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,D,B,C){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",D);
+C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;L()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;P()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D,
+" / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");K()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,L()):this.ui.hideDialog()}),null,{})}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(),
+k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R,W){if(F==("dir"==R.type)){W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");
+J.src=IMAGE_PATH+"/"+("dir"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("dir"==R.type?"/":""),mxUtils.bind(this,function(){"dir"==R.type?(v=R.path,K()):e&&"file"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+R.path))})));k.appendChild(W);I++}})(G[H],H)});C(!0);e&&C(!1)}}),y,!0)}),P=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=
+new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){P(u+1)});mxEvent.addListener(z,"click",
+C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,
+function(){n=I.name;v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)}),L=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
+z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();C=JSON.parse(C.getText());if(null==C||0==C.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(I){if(null!=I){var F=I.split("/");if(1<F.length){I=F[0];var H=F[1];3>F.length?(c=I,m=H,v=n=null,P()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(I+"/"+H+"/"+F,mxUtils.bind(this,function(R){this.ui.spinner.stop();c=R.meta.org;m=R.meta.repo;n=decodeURIComponent(R.meta.ref);v="";K()}),mxUtils.bind(this,function(R){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<C.length;G++)mxUtils.bind(this,function(N,I){var F=l.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(N.full_name,mxUtils.bind(this,function(){c=N.owner.login;
+m=N.name;v="";P(null,!0)})));k.appendChild(F)})(C[G],G)}100==C.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});L()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(m){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=m;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(m){this.savingFile=!1;null!=c&&c(m)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(m){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,m)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -12487,12 +12488,12 @@ TrelloClient.prototype.writeFile=function(b,e,f,c,m){if(null!=b&&null!=e)if(e.le
b);var k=new XMLHttpRequest;k.responseType="json";k.onreadystatechange=mxUtils.bind(this,function(){if(4===k.readyState&&(window.clearTimeout(d),v))if(200==k.status){var l=k.response;l.compoundId=f+this.SEPARATOR+l.id;c(l)}else 401==k.status?this.authenticate(n,m,!0):m()});k.open("POST",this.baseUrl+"cards/"+f+"/attachments");k.send(g)});this.authenticate(n,m)}else m({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",m=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(v);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.height=
-"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,A,B){m++;var I=document.createElement("div");I.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var O=document.createElement("a");O.style.cursor="pointer";if(null!=B){var t=document.createElement("img");
-t.src=B.url;t.width=B.width;t.height=B.height;t.style="border: 1px solid black;margin:5px;vertical-align:middle";O.appendChild(t)}mxUtils.write(O,y);mxEvent.addListener(O,"click",A);I.appendChild(O);return I}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==A||0==A.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var B=0;B<A.length;B++)mxUtils.bind(this,function(I){d.appendChild(g(I.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+I.id)}),null!=I.previews?I.previews[0]:null))})(A[B])})()}),mxUtils.bind(this,function(A){401==
-A.status?this.authenticate(y,k,!0):null!=k&&k(A)}))});y()}),p=null,q=null,x=mxUtils.bind(this,function(y){null==y&&(m=0,d.innerHTML="",y=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",q);x(y+1)});mxEvent.addListener(p,"click",A);var B=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(I){this.ui.spinner.stop();I=null!=I?I.cards:null;if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var t=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(z){null!=z&&(c=z,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(t.container,300,80,!0,!1);t.init()}))),mxUtils.br(d));for(var O=0;O<I.length;O++)mxUtils.bind(this,function(t){d.appendChild(g(t.name,mxUtils.bind(this,function(){b?(f=t.id,l()):(this.ui.hideDialog(),e(t.id))})))})(I[O]);100==I.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&A()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(I){401==I.status?this.authenticate(B,k,!0):null!=k&&k({message:I.responseText})}))});B()});x()};
+"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,z,A){m++;var K=document.createElement("div");K.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var P=document.createElement("a");P.style.cursor="pointer";if(null!=A){var L=document.createElement("img");
+L.src=A.url;L.width=A.width;L.height=A.height;L.style="border: 1px solid black;margin:5px;vertical-align:middle";P.appendChild(L)}mxUtils.write(P,y);mxEvent.addListener(P,"click",z);K.appendChild(P);return K}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(z){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==z||0==z.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<z.length;A++)mxUtils.bind(this,function(K){d.appendChild(g(K.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+K.id)}),null!=K.previews?K.previews[0]:null))})(z[A])})()}),mxUtils.bind(this,function(z){401==
+z.status?this.authenticate(y,k,!0):null!=k&&k(z)}))});y()}),p=null,q=null,x=mxUtils.bind(this,function(y){null==y&&(m=0,d.innerHTML="",y=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",q);x(y+1)});mxEvent.addListener(p,"click",z);var A=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(K){this.ui.spinner.stop();K=null!=K?K.cards:null;if(null==K||0==K.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var L=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(c=u,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(L.container,300,80,!0,!1);L.init()}))),mxUtils.br(d));for(var P=0;P<K.length;P++)mxUtils.bind(this,function(L){d.appendChild(g(L.name,mxUtils.bind(this,function(){b?(f=L.id,l()):(this.ui.hideDialog(),e(L.id))})))})(K[P]);100==K.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&z()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(K){401==K.status?this.authenticate(A,k,!0):null!=k&&k({message:K.responseText})}))});A()});x()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
@@ -12504,53 +12505,53 @@ l);p.setRequestHeader("PRIVATE_TOKEN",l);p.setRequestHeader("Content-Type","appl
null!=q.errors&&0<q.errors.length&&(p="too_large"==q.errors[0].code)}catch(x){}c({message:mxResources.get(p?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(p){window.clearTimeout(k);g&&c(p)}))}),v=mxUtils.bind(this,function(d){null==this.user?this.updateUser(function(){v(!0)},
c,d):n(d)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,m,n,v){if(null!=n)c(e,n);else{var d=e.length-2,g=mxUtils.bind(this,function(){if(2>d)m({message:mxResources.get("fileNotFound")});else{var k=Math.max(d-1,0),l=e.slice(0,k).join("/");k=e[k];var p=e[d],q=e.slice(d+1,e.length).join("/");l=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+k)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+p:"tree?path="+q+"&ref="+p:"files/"+encodeURIComponent(q)+
"?ref="+p);var x=new mxXmlRequest(l,null,"HEAD");this.executeRequest(x,mxUtils.bind(this,function(){200==x.getStatus()?c(e,d):m({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==x.getStatus()?(d--,g()):m({message:mxResources.get("fileNotFound")})}))}});g()}};GitLabClient.prototype.getFile=function(e,f,c,m,n,v){m=null!=m?m:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(d,g){var k=Math.max(g-1,0),l=d.slice(0,k).join("/"),p=d[k],q=d[g];e=d.slice(g+1,d.length).join("/");
-d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,A,B){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(I){try{A(this.getFileContent(JSON.parse(I.getText())))}catch(O){B(O)}}),
-B)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q,d=new mxXmlRequest(x+k,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(y){try{f(this.createGitLabFile(l,p,q,JSON.parse(y.getText()),m,g))}catch(A){c(A)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
+d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,z,A){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(K){try{z(this.getFileContent(JSON.parse(K.getText())))}catch(P){A(P)}}),
+A)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q,d=new mxXmlRequest(x+k,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(y){try{f(this.createGitLabFile(l,p,q,JSON.parse(y.getText()),m,g))}catch(z){c(z)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,m,n,v){var d=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:m.file_name,path:m.file_path,html_url:d+e+"/"+f+"/blob/"+c+"/"+m.file_path,download_url:d+e+"/"+f+"/raw/"+c+"/"+m.file_path+
-"?inline=false",last_commit_id:m.last_commit_id,refPos:v};m=this.getFileContent(m);return n?new GitLabLibrary(this.ui,m,e):new GitLabFile(this.ui,m,e)};GitLabClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(g,k){var l=Math.max(k-1,0),p=g.slice(0,l).join("/"),q=g[l],x=g[k];path=g.slice(k+1,g.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(p+"/"+q+"/"+x+"/"+path,!0,mxUtils.bind(this,function(y,A){y?
-n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(B){this.writeFile(p,q,x,path,B,f,A,mxUtils.bind(this,function(I){try{var O=JSON.parse(I.getText());c(this.createGitLabFile(p,q,x,null!=O.content?O.content:O,n,k))}catch(t){m(t)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:A,isNew:!0}))):m()}))}),
+"?inline=false",last_commit_id:m.last_commit_id,refPos:v};m=this.getFileContent(m);return n?new GitLabLibrary(this.ui,m,e):new GitLabFile(this.ui,m,e)};GitLabClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(g,k){var l=Math.max(k-1,0),p=g.slice(0,l).join("/"),q=g[l],x=g[k];path=g.slice(k+1,g.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(p+"/"+q+"/"+x+"/"+path,!0,mxUtils.bind(this,function(y,z){y?
+n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(p,q,x,path,A,f,z,mxUtils.bind(this,function(K){try{var P=JSON.parse(K.getText());c(this.createGitLabFile(p,q,x,null!=P.content?P.content:P,n,k))}catch(L){m(L)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:z,isNew:!0}))):m()}))}),
m,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(m){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,m.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(m){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
f,c,m,n,v,d,g,k){if(v.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var l="POST";c={path:encodeURIComponent(m),branch:decodeURIComponent(c),commit_message:n,content:v,encoding:"base64"};null!=d&&(c.last_commit_id=d,l="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(m);l=new mxXmlRequest(e,JSON.stringify(c),l);this.executeRequest(l,mxUtils.bind(this,function(p){g(p)}),
-k)}};GitLabClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(A){A.getData()==e.getData()?f(A.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);
+k)}};GitLabClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(z){z.getData()==e.getData()?f(z.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);
this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.last_commit_id,x)}),c,this.ui.getCurrentFile()!=e?e.getData():null,q.scale,q.border)}else l(e.meta.last_commit_id,Base64.encode(e.getData()))});m?this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(q){e.meta.last_commit_id=q.meta.last_commit_id;p()}),c):p()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace=
"nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}));this.ui.showDialog(p.container,420,
-370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(z,L,C,E){var G=document.createElement("a");G.setAttribute("title",z);G.style.cursor="pointer";mxUtils.write(G,z);mxEvent.addListener(G,"click",L);E&&(G.style.textDecoration="underline");null!=C&&(z=l.cloneNode(),z.style.padding=C,z.appendChild(G),G=z);return G}),x=mxUtils.bind(this,function(z){var L=document.createElement("div");L.style.marginBottom="8px";L.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
-null;t()}),null,!0));z||(mxUtils.write(L," / "),L.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var C=v.split("/");for(z=0;z<C.length;z++)(function(E){mxUtils.write(L," / ");L.appendChild(q(C[E],mxUtils.bind(this,function(){v=C.slice(0,E+1).join("/");I()}),null,!0))})(z)}k.appendChild(L)}),y=mxUtils.bind(this,function(z){this.ui.handleError(z,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
-t()):this.ui.hideDialog()}))}),A=null,B=null,I=mxUtils.bind(this,function(z){null==z&&(k.innerHTML="",z=1);var L=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+z,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display=
-"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){I(z+1)});mxEvent.addListener(A,"click",C);this.executeRequest(L,mxUtils.bind(this,function(E){this.ui.spinner.stop();1==z&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,t();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");I()}}),"4px")));var G=JSON.parse(E.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var P=
-!0,J=0;E=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(S){if(F==("tree"==S.type)){var V=l.cloneNode();V.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==S.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;V.appendChild(M);V.appendChild(q(S.name+("tree"==S.type?"/":""),mxUtils.bind(this,function(){"tree"==
-S.type?(v=S.path,I()):e&&"blob"==S.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+S.path))})));k.appendChild(V);J++}})(G[H])});E(!0);e&&E(!1);100==J&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}}),y,!0)}),O=mxUtils.bind(this,function(z,L){null==z&&(k.innerHTML="",z=1);var C=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+z,null,"GET");p.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var E=mxUtils.bind(this,function(){O(z+1)});mxEvent.addListener(A,"click",E);this.executeRequest(C,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==z&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){v=null;t()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&L)n=G[0].name,v="",I();else{for(var P=0;P<G.length;P++)mxUtils.bind(this,function(J,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(J.name,mxUtils.bind(this,function(){n=encodeURIComponent(J.name);v="";I()})));k.appendChild(H)})(G[P],P);100==G.length&&(k.appendChild(A),B=function(){k.scrollTop>=
-k.scrollHeight-k.offsetHeight&&E()},mxEvent.addListener(k,"scroll",B))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var t=mxUtils.bind(this,function(z){var L=this.ui.spinner,C=0;this.ui.spinner.stop();var E=function(){L.spin(k,mxResources.get("loading"));C+=1},G=function(){--C;0===C&&L.stop()};null==z&&(k.innerHTML="",z=1);null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");
-A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){0===C&&t(z+1)});mxEvent.addListener(A,"click",P);var J=mxUtils.bind(this,function(H){E();var S=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(S,mxUtils.bind(this,function(V){H(JSON.parse(V.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,S){E();var V=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(V,mxUtils.bind(this,function(M){S(H,JSON.parse(M.getText()));G()}),y)});J(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{E();var S=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+z,null,"GET");this.executeRequest(S,mxUtils.bind(this,function(V){V=JSON.parse(V.getText());if(null!=V&&0!=V.length||null!=H&&0!=H.length){1==z&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===C){var U=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(X){null!=X&&(X=X.split("/"),1<X.length?(c=X[0],m=X[1],n=v=null,2<X.length?(n=encodeURIComponent(X.slice(2,X.length).join("/")),I()):O(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(U.container,300,80,!0,!1);U.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var M=!0,W=0;W<V.length;W++)mxUtils.bind(this,
-function(U){var X=l.cloneNode();X.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===C&&(c=U.owner.username,m=U.path,v="",O(null,!0))})));k.appendChild(X)})(V[W]);for(W=0;W<H.length;W++)E(),F(H[W],mxUtils.bind(this,function(U,X){G();for(var u=0;u<X.length;u++){var D=l.cloneNode();D.style.backgroundColor=M?"dark"==uiTheme?"#000000":"#eeeeee":"";M=!M;mxUtils.bind(this,function(K){D.appendChild(q(K.name_with_namespace,
-mxUtils.bind(this,function(){0===C&&(c=U.full_path,m=K.path,v="",O(null,!0))})));k.appendChild(D)})(X[u])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==V.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&P()},mxEvent.addListener(k,"scroll",B))}),y)}}))});b?this.user?t():this.updateUser(function(){t()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){t()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,D,B,C){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",D);C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
+null;L()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;P()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D," / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");K()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
+L()):this.ui.hideDialog()}))}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display=
+"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=
+!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R){if(F==("tree"==R.type)){var W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");J.src=IMAGE_PATH+"/"+("tree"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("tree"==R.type?"/":""),mxUtils.bind(this,function(){"tree"==
+R.type?(v=R.path,K()):e&&"blob"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+R.path))})));k.appendChild(W);I++}})(G[H])});C(!0);e&&C(!1);100==I&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}}),y,!0)}),P=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){P(u+1)});mxEvent.addListener(z,"click",C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
+function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,function(){n=encodeURIComponent(I.name);v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
+k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var L=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
+z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){0===B&&L(u+1)});mxEvent.addListener(z,"click",N);var I=mxUtils.bind(this,function(H){C();var R=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){H(JSON.parse(W.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,R){C();var W=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(W,mxUtils.bind(this,function(J){R(H,JSON.parse(J.getText()));G()}),y)});I(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{C();var R=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+u,null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){W=JSON.parse(W.getText());if(null!=W&&0!=W.length||null!=H&&0!=H.length){1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===B){var U=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(X){null!=X&&(X=X.split("/"),1<X.length?(c=X[0],m=X[1],n=v=null,2<X.length?(n=encodeURIComponent(X.slice(2,X.length).join("/")),K()):P(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(U.container,300,80,!0,!1);U.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var J=!0,V=0;V<W.length;V++)mxUtils.bind(this,
+function(U){var X=l.cloneNode();X.style.backgroundColor=J?Editor.isDarkMode()?"#000000":"#eeeeee":"";J=!J;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=U.owner.username,m=U.path,v="",P(null,!0))})));k.appendChild(X)})(W[V]);for(V=0;V<H.length;V++)C(),F(H[V],mxUtils.bind(this,function(U,X){G();for(var t=0;t<X.length;t++){var E=l.cloneNode();E.style.backgroundColor=J?"dark"==uiTheme?"#000000":"#eeeeee":"";J=!J;mxUtils.bind(this,function(M){E.appendChild(q(M.name_with_namespace,
+mxUtils.bind(this,function(){0===B&&(c=U.full_path,m=M.path,v="",P(null,!0))})));k.appendChild(E)})(X[t])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==W.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&N()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?L():this.updateUser(function(){L()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){L()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(N,Q){Q=Q||document;return Q.querySelector(N)}function A(N,Q,R){if(null==N["@microsoft.graph.downloadUrl"])if(null==N.parentReference)R();else{c(N.id,N.parentReference.driveId,function(ea){A(ea,Q,R)},R);return}var Y=new XMLHttpRequest;Y.open("GET",N["@microsoft.graph.downloadUrl"]);var ba=N.file?"image/png"==N.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
-ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}R()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function B(){p&&null!=F?J.exportToCanvas(function(N){N=EditorUi.prototype.createImageDataUri(N,null,"png");v(H,N);n(H)},400,
-null,null,function(N){console.log(N)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function I(N){function Q(R){D.style.background="transparent";D.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,R);D.appendChild(Y);P.stop()}if(null!=D)if(D.style.background="transparent",D.innerHTML="",null==N||N.folder||/\.drawiolib$/.test(N.name))Q(mxResources.get("noPreview"));else try{null!=N.remoteItem&&(N=N.remoteItem),U=N,P.spin(D),A(N,function(R){P.stop();
-if(U==N)if("mxlibrary"==R.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=R.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(D,0==Y.length?R.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(R){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var N=y(".odFilesBreadcrumb");if(null!=N){N.innerHTML="";for(var Q=0;Q<M.length-1;Q++){var R=document.createElement("span");R.className="odBCFolder";R.innerHTML=
-mxUtils.htmlEntities(M[Q].name||mxResources.get("home"));N.appendChild(R);(function(ba,ea){R.addEventListener("click",function(){e(null);M=M.slice(0,ea);z(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(M[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";N.appendChild(Y)}null!=M[M.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==M.length?mxResources.get("officeSelDiag"):M[M.length-1].name||mxResources.get("home")),N.appendChild(Q))}}function t(){if(null!=
-H&&!V)if("sharepoint"==S)z("site",null,H.id,H.displayName);else if("site"==S)z("subsite",null,H.id,H.name);else{var N=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||S,R=H.id;N?z(Q,R,null,H.name):B()}}function z(N,Q,R,Y,ba){function ea(qa){P.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var Aa=null,Ha=0,Na=0;null!=qa&&Na<qa.length;Na++){var Ga=qa[Na];if(1!=fa||!Ga.webUrl||0<Ga.webUrl.indexOf("sharepoint.com/sites/")||
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(O,Q){Q=Q||document;return Q.querySelector(O)}function z(O,Q,S){if(null==O["@microsoft.graph.downloadUrl"])if(null==O.parentReference)S();else{c(O.id,O.parentReference.driveId,function(ea){z(ea,Q,S)},S);return}var Y=new XMLHttpRequest;Y.open("GET",O["@microsoft.graph.downloadUrl"]);var ba=O.file?"image/png"==O.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
+ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}S()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?I.exportToCanvas(function(O){O=EditorUi.prototype.createImageDataUri(O,null,"png");v(H,O);n(H)},400,
+null,null,function(O){console.log(O)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function K(O){function Q(S){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);E.appendChild(Y);N.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==O||O.folder||/\.drawiolib$/.test(O.name))Q(mxResources.get("noPreview"));else try{null!=O.remoteItem&&(O=O.remoteItem),U=O,N.spin(E),z(O,function(S){N.stop();
+if(U==O)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function P(){var O=y(".odFilesBreadcrumb");if(null!=O){O.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML=
+mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));O.appendChild(S);(function(ba,ea){S.addEventListener("click",function(){e(null);J=J.slice(0,ea);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";O.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),O.appendChild(Q))}}function L(){if(null!=
+H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var O=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;O?u(Q,S,null,H.name):A()}}function u(O,Q,S,Y,ba){function ea(qa){N.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var Aa=null,Ha=0,Na=0;null!=qa&&Na<qa.length;Na++){var Ga=qa[Na];if(1!=fa||!Ga.webUrl||0<Ga.webUrl.indexOf("sharepoint.com/sites/")||
0>Ga.webUrl.indexOf("sharepoint.com/")){var Fa=Ga.displayName||Ga.name,Ea=mxUtils.htmlEntities(Ga.description||Fa);fa&&(Ga.folder=2==fa?{isRoot:!0}:!0);var La=null!=Ga.folder;if(!g||La){var za=document.createElement("tr");za.className=Ha++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ka=document.createElement("img");ka.src="/images/"+(La?"folder.png":"file.png");ka.className="odFileImg";ta.appendChild(ka);za.appendChild(ta);ta=document.createElement("td");
-La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Fa);La.setAttribute("title",Ea);ta.appendChild(La);za.appendChild(ta);Ca.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,S=N,x||e(H));(function(oa,sa){za.addEventListener("dblclick",t);za.addEventListener("click",function(){Aa!=sa&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=sa,Aa.className+=" odRowSelected",H=oa,S=N,x||e(H))})})(Ga,za)}}}0==Ha?(qa=document.createElement("div"),
-qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(qa)):va.appendChild(Ca);O();V=!1}if(!V){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=D&&(D.innerHTML="",D.style.top="50%");var Z=V=!0,fa=0;W=arguments;var aa=setTimeout(function(){V=Z=!1;P.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";P.spin(va);switch(N){case "recent":M=[{name:mxResources.get("recent",
-null,"Recent"),driveId:N}];var ja=m()||{};var Ba=[],Da;for(Da in ja)Ba.push(ja[Da]);clearTimeout(aa);ea(Ba);return;case "shared":ja="/me/drive/sharedWithMe";M=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:N}];break;case "sharepoint":ja="/sites?search=";M=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:N}];fa=1;break;case "site":M.push({name:Y,driveId:N,folderId:Q,siteId:R});ja="/sites/"+R+"/drives";fa=2;break;case "subsite":M.push({name:Y,driveId:N,
-folderId:Q,siteId:R});ja="/drives/"+R+(Q?"/items/"+Q:"/root")+"/children";break;case "search":N=S;M=[{driveId:N,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ja=N?"/drives/"+N+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?M=[{driveId:N}]:M.push({name:Y,driveId:N,folderId:Q}),ja=(N?"/drives/"+N:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}fa||(ja+=(0<ja.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Fa);La.setAttribute("title",Ea);ta.appendChild(La);za.appendChild(ta);Ca.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,R=O,x||e(H));(function(oa,sa){za.addEventListener("dblclick",L);za.addEventListener("click",function(){Aa!=sa&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=sa,Aa.className+=" odRowSelected",H=oa,R=O,x||e(H))})})(Ga,za)}}}0==Ha?(qa=document.createElement("div"),
+qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(qa)):va.appendChild(Ca);P();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=W=!0,fa=0;V=arguments;var aa=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";N.spin(va);switch(O){case "recent":J=[{name:mxResources.get("recent",
+null,"Recent"),driveId:O}];var ja=m()||{};var Ba=[],Da;for(Da in ja)Ba.push(ja[Da]);clearTimeout(aa);ea(Ba);return;case "shared":ja="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:O}];break;case "sharepoint":ja="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:O}];fa=1;break;case "site":J.push({name:Y,driveId:O,folderId:Q,siteId:S});ja="/sites/"+S+"/drives";fa=2;break;case "subsite":J.push({name:Y,driveId:O,
+folderId:Q,siteId:S});ja="/drives/"+S+(Q?"/items/"+Q:"/root")+"/children";break;case "search":O=R;J=[{driveId:O,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ja=O?"/drives/"+O+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?J=[{driveId:O}]:J.push({name:Y,driveId:O,folderId:Q}),ja=(O?"/drives/"+O:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}fa||(ja+=(0<ja.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
f(ja,function(qa){if(Z){clearTimeout(aa);qa=qa.value||[];for(var Ca=x||fa?qa:[],Aa=0;!fa&&!x&&Aa<qa.length;Aa++){var Ha=qa[Aa],Na=Ha.file?Ha.file.mimeType:null;(Ha.folder||"text/html"==Na||"text/xml"==Na||"application/xml"==Na||"image/png"==Na||/\.svg$/.test(Ha.name)||/\.html$/.test(Ha.name)||/\.xml$/.test(Ha.name)||/\.png$/.test(Ha.name)||/\.drawio$/.test(Ha.name)||/\.drawiolib$/.test(Ha.name))&&Ca.push(Ha)}ea(Ca)}},function(qa){if(Z){clearTimeout(aa);var Ca=null;try{Ca=JSON.parse(qa.responseText).error.message}catch(Aa){}d(mxResources.get("errorFetchingFolder",
-null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){K.className=K.className.replace("odCatSelected","");K=N;K.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var E="";null==e&&(e=I,E='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"];
-Q[N.id]=N;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});E='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+
+null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));W=!1;N.stop()}})}}function D(O){M.className=M.className.replace("odCatSelected","");M=O;M.className+=" odCatSelected"}function B(O){W||(T=null,u("search",null,null,null,O))}var C="";null==e&&(e=K,C='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var O=null;try{O=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return O});null==n&&(n=function(O){if(null!=O){var Q=m()||{};delete O["@microsoft.graph.downloadUrl"];
+Q[O.id]=O;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});C='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+
mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+
-E+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+C+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(G?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(G?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,F=null,H=null,S=null,V=!1,M=[],W=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");X.appendChild(u);u.type="text/css";u.id="mxODPickerCss";u.appendChild(document.createTextNode(G))}b.innerHTML=
-E;var D=y(".odPreview"),K=y("#odFiles");b=function(N,Q){Q=Q||document;return Q.querySelectorAll(N)}(".odCatListTitle");for(E=0;E<b.length;E++)b[E].addEventListener("click",function(){H=U=null;if(!V)switch(L(this),this.id){case "odFiles":z();break;case "odRecent":z("recent");break;case "odShared":z("shared");break;case "odSharepoint":z("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(N){var Q=this;null!=T&&clearTimeout(T);13==N.keyCode?C(Q.value):T=setTimeout(function(){C(Q.value)},
-500)});y("#refreshOD").addEventListener("click",function(){null!=W&&(e(null),z.apply(this,W))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",B);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&L(y("#odSharepoint")),M=q,z(k.driveId,k.folderId,k.siteId,k.name)):z()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
+var N=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,F=null,H=null,R=null,W=!1,J=[],V=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");X.appendChild(t);t.type="text/css";t.id="mxODPickerCss";t.appendChild(document.createTextNode(G))}b.innerHTML=
+C;var E=y(".odPreview"),M=y("#odFiles");b=function(O,Q){Q=Q||document;return Q.querySelectorAll(O)}(".odCatListTitle");for(C=0;C<b.length;C++)b[C].addEventListener("click",function(){H=U=null;if(!W)switch(D(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(O){var Q=this;null!=T&&clearTimeout(T);13==O.keyCode?B(Q.value):T=setTimeout(function(){B(Q.value)},
+500)});y("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),u.apply(this,V))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",A);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&D(y("#odSharepoint")),J=q,u(k.driveId,k.folderId,k.siteId,k.name)):u()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(m.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(m)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
@@ -12568,12 +12569,12 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var f=0;f<e.length;f++)e[f].unregister();null!=b&&b()}})};
-App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var t=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var L=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(t);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[t,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(t){if(null!=t)for(var z=0;z<t.length;z++)if(!y[t[z]])throw Error(mxResources.get("invalidInput")+
-' "'+t[z])+'"';return!0},y={},A;for(A in App.pluginRegistry)y[App.pluginRegistry[A]]=!0;var B=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=B&&x(B.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(B));if(null!=B.merge){var I=localStorage.getItem(Editor.configurationKey);if(null!=I)try{var O=JSON.parse(I);for(A in B.merge)O[A]=B.merge[A];B=O}catch(t){window.location.hash="",alert(t)}else B=B.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
-(localStorage.setItem(Editor.configurationKey,JSON.stringify(B)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(t){window.location.hash="",alert(t)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(L);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[L,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(L){if(null!=L)for(var u=0;u<L.length;u++)if(!y[L[u]])throw Error(mxResources.get("invalidInput")+
+' "'+L[u])+'"';return!0},y={},z;for(z in App.pluginRegistry)y[App.pluginRegistry[z]]=!0;var A=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=A&&x(A.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(A));if(null!=A.merge){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{var P=JSON.parse(K);for(z in A.merge)P[z]=A.merge[z];A=P}catch(L){window.location.hash="",alert(L)}else A=A.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+(localStorage.setItem(Editor.configurationKey,JSON.stringify(A)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(L){window.location.hash="",alert(L)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
q))},function(p){p=document.getElementById("geStatus");null!=p&&(p.innerHTML="Error loading page. <a>Please try refreshing.</a>",p.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var l=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(l)&&0<l?(DrawioFile.prototype.autosaveDelay=l,EditorUi.debug("Setting autosaveDelay",l)):EditorUi.debug("Invalid autosaveDelay",l)}null!=mxSettings.settings.defaultEdgeLength&&(l=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(l)&&0<l?(Graph.prototype.defaultEdgeLength=l,EditorUi.debug("Using defaultEdgeLength",l)):EditorUi.debug("Invalid defaultEdgeLength",l))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(l=
0;l<Menus.prototype.defaultFonts.length;l++){var p=Menus.prototype.defaultFonts[l];"string"!==typeof p&&null!=p.fontFamily&&null!=p.fontUrl&&Graph.addFont(p.fontFamily,p.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(l,p,q,x,y){EditorUi.logError("Global: "+(null!=l?l:""),p,q,x,y,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
@@ -12634,9 +12635,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,m=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),n=mxUtils.bind(this,function(G){window.clearTimeout(m);c&&e(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,d=v.backgroundImage,g=null!=v.themes&&"darkTheme"==v.defaultThemeName;if(null!=this.pages&&(g||this.currentPage!=this.pages[0])){var k=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=
this.editor.graph.setBackgroundImage;var l=this.pages[0];this.currentPage==l?v.setBackgroundImage(d):null!=l.viewState&&null!=l.viewState&&(d=l.viewState.backgroundImage,v.setBackgroundImage(d));v.getGlobalVariable=function(G){return"page"==G?l.getName():"pagenumber"==G?1:k.apply(this,arguments)};v.getGlobalVariable=k;document.body.appendChild(v.container);v.model.setRoot(l.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{v!=this.editor.graph&&
-null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(P){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var A=b/q.width;
-A=Math.min(1,Math.min(3*b/(4*q.height),A));var B=Math.floor(q.x),I=Math.floor(q.y);p.setAttribute("width",Math.ceil(A*(q.width+4)));p.setAttribute("height",Math.ceil(A*(q.height+4)));var O=p.getContext("2d");O.scale(A,A);O.translate(-B,-I);var t=v.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";O.save();O.fillStyle=t;O.fillRect(B,I,Math.ceil(q.width+4),Math.ceil(q.height+4));O.restore();if(null!=d){var z=new Image;z.src=d.src;O.drawImage(z,d.x*A,d.y*A,d.width*A,d.height*A)}var L=new mxJsCanvas(p),
-C=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var E=new mxImageExport;E.drawShape=function(G,P){G.shape instanceof mxShape&&G.shape.checkBounds()&&(P.save(),P.translate(.5,.5),G.shape.paint(P),P.translate(-.5,-.5),P.restore())};E.drawText=function(G,P){};E.drawState(v.getView().getState(v.model.root),C);C.finish(mxUtils.bind(this,function(){try{E.drawState(v.getView().getState(v.model.root),L),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
+null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(N){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var z=b/q.width;
+z=Math.min(1,Math.min(3*b/(4*q.height),z));var A=Math.floor(q.x),K=Math.floor(q.y);p.setAttribute("width",Math.ceil(z*(q.width+4)));p.setAttribute("height",Math.ceil(z*(q.height+4)));var P=p.getContext("2d");P.scale(z,z);P.translate(-A,-K);var L=v.background;if(null==L||""==L||L==mxConstants.NONE)L="#ffffff";P.save();P.fillStyle=L;P.fillRect(A,K,Math.ceil(q.width+4),Math.ceil(q.height+4));P.restore();if(null!=d){var u=new Image;u.src=d.src;P.drawImage(u,d.x*z,d.y*z,d.width*z,d.height*z)}var D=new mxJsCanvas(p),
+B=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var C=new mxImageExport;C.drawShape=function(G,N){G.shape instanceof mxShape&&G.shape.checkBounds()&&(N.save(),N.translate(.5,.5),G.shape.paint(N),N.translate(-.5,-.5),N.restore())};C.drawText=function(G,N){};C.drawState(v.getView().getState(v.model.root),B);B.finish(mxUtils.bind(this,function(){try{C.drawState(v.getView().getState(v.model.root),D),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
null}n(p)}));f=!0}}catch(G){f=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}f||window.clearTimeout(m);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var m=new Date;m.setYear(m.getFullYear()+1);document.cookie="MODE="+e+"; expires="+m.toUTCString()}}catch(n){}}})();
@@ -12710,26 +12711,26 @@ this.drive.insertFile(b,e,v,mxUtils.bind(this,function(p){k();this.fileCreated(p
function(p,q){var x=new LocalFile(this,e,q.name,null,p,q);x.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,f,n,m,g)}),l,!0)}),mxUtils.bind(this,function(p){"AbortError"!=p.name&&l(p)}),this.createFileSystemOptions(b))):(k(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,m,g))}catch(p){k(),this.handleError(p)}}};
App.prototype.fileCreated=function(b,e,f,c,m){var n=window.location.pathname;null!=e&&0<e.length&&(n+="?libs="+e);null!=m&&0<m.length&&(n+="?clibs="+m);n=this.getUrl(n);b.getMode()!=App.MODE_DEVICE&&(n+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var d=window.location.protocol+"//"+window.location.hostname+n,g=v,k=null;null!=v&&/\.svg$/i.test(b.getTitle())&&
(k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(k.container),g=this.decodeNodeIntoGraph(g,k));b.setData(this.createFileData(v,k,b,d));null!=k&&k.container.parentNode.removeChild(k.container);var l=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){l();var q=this.getCurrentFile();null==f&&null!=q&&(f=!q.isModified()&&null==q.getMode());var x=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var A=[],B=m.split(";"),I=0;I<B.length;I++)A.push(decodeURIComponent(B[I]));this.loadLibraries(A)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var z=[],A=m.split(";"),K=0;K<A.length;K++)z.push(decodeURIComponent(A[K]));this.loadLibraries(z)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=c&&c(),window.openWindow(n,null,y))});b.constructor==LocalFile?p():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(q){l();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
App.prototype.loadFile=function(b,e,f,c,m){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var g=mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var y=this.getCurrentFile();
window.location.hash=null!=y?y.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(x){null!=x?(this.fileLoaded(new StorageFile(this,x,b)),null!=c&&c()):g({message:mxResources.get("fileNotFound")})}),g)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var k=decodeURIComponent(b.substring(1));"<"!=k.charAt(0)&&(k=Graph.decompress(k));k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);k.getHash=function(){return b};this.fileLoaded(k);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(x,y){this.spinner.stop();this.fileLoaded(new EmbedFile(this,x,y));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var l=decodeURIComponent(b.substring(1)),p=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=l.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var x=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=l.substring(31,l.lastIndexOf("&ex"));this.loadFile("G"+y,e,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+y},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=l,B=l.lastIndexOf("."),I=A.lastIndexOf("/");B>I&&0<I&&(A=A.substring(I+1,B),B=l.substring(B),
-this.useCanvasForExport||".png"!=B||(B=".drawio"),".svg"===B||".xml"===B||".html"===B||".png"===B||".drawio"===B)&&(y=A+B)}x=new LocalFile(this,x,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);x.getHash=function(){return b};this.fileLoaded(x,!0)?null!=c&&c():p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var l=decodeURIComponent(b.substring(1)),p=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=l.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var x=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=l.substring(31,l.lastIndexOf("&ex"));this.loadFile("G"+y,e,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+y},window.location.hash="#"+z.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=l,A=l.lastIndexOf("."),K=z.lastIndexOf("/");A>K&&0<K&&(z=z.substring(K+1,A),A=l.substring(A),
+this.useCanvasForExport||".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(y=z+A)}x=new LocalFile(this,x,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);x.getHash=function(){return b};this.fileLoaded(x,!0)?null!=c&&c():p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){p()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(k=null,"G"==b.charAt(0)?k=this.drive:"D"==b.charAt(0)?k=this.dropbox:"W"==b.charAt(0)?k=this.oneDrive:"H"==b.charAt(0)?k=this.gitHub:"A"==b.charAt(0)?k=this.gitLab:"T"==b.charAt(0)&&(k=this.trello),null==k)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(y.getHash=function(){return q+b},window.location.hash="#"+y.getHash()):x==y&&null==x.getMode()&&
-(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var y=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null,y,null,null,"#"+q+b):y()}))}}),
+(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var y=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null,y,null,null,"#"+q+b):y()}))}}),
v=this.getCurrentFile(),d=mxUtils.bind(this,function(){m||null==v||!v.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?d():null==v||e?d():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,d)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(k,l){l||mxSettings.removeCustomLibrary(k);delete this.loadedLibraries[k]}),c=0,m=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var k=b.length-1;0<=k;k--)null!=m[k]&&this.loadLibrary(m[k],k<=n);null!=e&&e()}});if(null!=b)for(var d=0;d<b.length;d++){var g=encodeURIComponent(decodeURIComponent(b[d]));
-mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(I){m[l]=I;c--;v()}),q=mxUtils.bind(this,function(I){f(k,I);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var I=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,I,mxUtils.bind(this,function(O){".scratchpad"==I&&null==
-O&&(O=this.emptyLibraryXml);null!=O?p(new StorageLibrary(this,O,I)):q()}),q)}catch(O){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(I){null!=I&&0<I.length?p(new UrlLibrary(this,I,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var A={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(I){try{p(new RemoteLibrary(this,
-I,A))}catch(O){q()}}),function(){q()})}catch(I){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(I){p(I)},q)}catch(I){q()}else{var B=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(B=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(B=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(B=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(B=this.dropbox):"W"==x&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(B=this.oneDrive);null!=B?B.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(I){try{p(I)}catch(O){q()}}),function(I){q()}):q(!0)}}})(g,d)}v()}};
+mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(K){m[l]=K;c--;v()}),q=mxUtils.bind(this,function(K){f(k,K);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var K=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,K,mxUtils.bind(this,function(P){".scratchpad"==K&&null==
+P&&(P=this.emptyLibraryXml);null!=P?p(new StorageLibrary(this,P,K)):q()}),q)}catch(P){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(K){null!=K&&0<K.length?p(new UrlLibrary(this,K,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var z={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(K){try{p(new RemoteLibrary(this,
+K,z))}catch(P){q()}}),function(){q()})}catch(K){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(K){p(K)},q)}catch(K){q()}else{var A=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==x&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(K){try{p(K)}catch(P){q()}}),function(K){q()}):q(!0)}}})(g,d)}v()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=
@@ -12759,7 +12760,7 @@ window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))
App.prototype.showAuthDialog=function(b,e,f,c){var m=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(n){try{null!=f&&f(n,mxUtils.bind(this,function(){this.hideDialog();m()}))}catch(v){this.editor.setStatus(mxUtils.htmlEntities(v.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(n){null!=c&&c(n);n&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,e,f,c,m,n,v,d){var g=e;/\.svg$/i.test(g)||(g=g.substring(0,e.lastIndexOf("."))+c);var k=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(k=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",b,!0);k||(l.responseType="blob");if(d)for(var p in d)l.setRequestHeader(p,d[p]);l.onload=mxUtils.bind(this,function(){if(200<=
l.status&&299>=l.status){var x=null;k?(x=JSON.parse(l.responseText),x=this.base64ToBlob(x.content,"application/octet-stream")):x=new Blob([l.response],{type:"application/octet-stream"});this.importVisio(x,mxUtils.bind(this,function(y){m(new LocalFile(this,y,g,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});l.onerror=n;l.send()}else{var q=mxUtils.bind(this,function(x){try{if(/\.pdf$/i.test(e)){var y=Editor.extractGraphModelFromPdf(x);null!=y&&0<y.length&&m(new LocalFile(this,
-y,g,!0))}else/\.png$/i.test(e)?(y=this.extractGraphModelFromPng(x),null!=y?m(new LocalFile(this,y,g,!0)):m(new LocalFile(this,x,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(x,b)?this.parseFileData(x,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?m(new LocalFile(this,A.responseText,g,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):m(new LocalFile(this,x,g,!0))}catch(A){null!=n&&n(A)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
+y,g,!0))}else/\.png$/i.test(e)?(y=this.extractGraphModelFromPng(x),null!=y?m(new LocalFile(this,y,g,!0)):m(new LocalFile(this,x,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(x,b)?this.parseFileData(x,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?m(new LocalFile(this,z.responseText,g,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):m(new LocalFile(this,x,g,!0))}catch(z){null!=n&&n(z)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);k?mxUtils.get(b,mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){if(null!=m){x=JSON.parse(x.getText());var y=x.content;"base64"===x.encoding&&(y=/\.png$/i.test(e)?"data:image/png;base64,"+y:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+y:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y));q(y)}}else null!=n&&n({code:App.ERROR_UNKNOWN})}),function(){null!=n&&n({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},d):null!=v?v(b,q,n,f):this.editor.loadUrl(b,q,n,f,null,null,null,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
@@ -12793,8 +12794,8 @@ p.setAttribute("height","50");p.setAttribute("border","0");p.setAttribute("src",
this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(x)})));return k});c=!0;var v=document.createElement("table");v.style.borderSpacing="0";v.style.fontSize="10pt";v.style.width="100%";v.style.padding="10px";for(var d=0;d<m.length;d++)v.appendChild(f(m[d]));this.userPanel.appendChild(v);f=document.createElement("div");f.style.textAlign=
"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";v=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){n(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));v.className="geBtn";v.style.float="right";f.appendChild(v);v=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var g=this.drive.createAuthWin();g.blur();window.focus();n(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0,g)}),mxResources.get("closingFile")+"...")}));v.className="geBtn";v.style.margin="0px";f.appendChild(v);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(g,k,l,p){if(null!=g){c&&this.userPanel.appendChild(document.createElement("hr"));
-c=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var x=document.createElement("tbody"),y=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=k){var B=document.createElement("img");B.setAttribute("width","40");B.setAttribute("height","40");B.setAttribute("border","0");B.setAttribute("src",k);B.style.marginRight="6px";A.appendChild(B)}y.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,g.displayName);null!=g.email&&(mxUtils.br(A),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,g.email),A.appendChild(k));null!=p&&(g=document.createElement("div"),g.style.marginTop="4px",k=document.createElement("i"),mxUtils.write(k,p),g.appendChild(k),A.appendChild(g));y.appendChild(A);x.appendChild(y);
+c=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var x=document.createElement("tbody"),y=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=k){var A=document.createElement("img");A.setAttribute("width","40");A.setAttribute("height","40");A.setAttribute("border","0");A.setAttribute("src",k);A.style.marginRight="6px";z.appendChild(A)}y.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,g.displayName);null!=g.email&&(mxUtils.br(z),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,g.email),z.appendChild(k));null!=p&&(g=document.createElement("div"),g.style.marginTop="4px",k=document.createElement("i"),mxUtils.write(k,p),g.appendChild(k),z.appendChild(g));y.appendChild(z);x.appendChild(y);
q.appendChild(x);this.userPanel.appendChild(q);g=document.createElement("div");g.style.textAlign="center";g.style.padding="10px";g.style.whiteSpace="nowrap";null!=l&&(l=mxUtils.button(mxResources.get("signOut"),l),l.className="geBtn",g.appendChild(l));this.userPanel.appendChild(g)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==DropboxFile){var k=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==OneDriveFile){var k=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var g=this.getCurrentFile();if(null!=g&&g.constructor==GitHubFile){var k=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});g.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -12808,157 +12809,158 @@ null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);c.appendChild(m);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function f(t,z,L){this.ui=t;this.previousExtFonts=this.extFonts=z;this.prevCustomFonts=this.customFonts=L}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function f(u,D,B){this.ui=u;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=B}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),g=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),k="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));c.actions.addAction("new...",function(){var t=c.isOffline();if(t||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var z=new NewDialog(c,t,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,t?350:620,t?70:460,!0,!0,function(C){c.sidebar.hideTooltip();C&&null==c.getCurrentFile()&&c.showSplash()});
-z.init()}else{var L=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};t=new TemplatesDialog(c,function(C,E,G){var P=G.libs,J=G.clibs;c.pickFolder(c.mode,function(F){c.createFile(E,C,null!=P&&0<P.length?P:null,null,function(){c.hideDialog()},null,F,null,null!=J&&0<J.length?J:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,E,G){var P=new Date;P.setDate(P.getDate()-
-7);c.drive.listFiles(null,P,G?!0:!1,function(J){for(var F=[],H=0;H<J.items.length;H++)F.push(L(J.items[H]));C(F)},E)},function(C,E,G,P){c.drive.listFiles(C,null,P?!0:!1,function(J){for(var F=[],H=0;H<J.items.length;H++)F.push(L(J.items[H]));E(F)},G)},function(C,E,G){c.drive.getFile(C.id,function(P){E(P.data)},G)},null,null,!1,!1);c.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
-!m.isCellLocked(m.getDefaultParent())){var t=new NewDialog(c,null,!1,function(z){c.hideDialog();if(null!=z){var L=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(z,Math.max(L.x,20),Math.max(L.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(t.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});t.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
+c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var D=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(D.container,u?350:620,u?70:460,!0,!0,function(C){c.sidebar.hideTooltip();C&&null==c.getCurrentFile()&&c.showSplash()});
+D.init()}else{var B=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};u=new TemplatesDialog(c,function(C,G,N){var I=N.libs,F=N.clibs;c.pickFolder(c.mode,function(H){c.createFile(G,C,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,H,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,G,N){var I=new Date;I.setDate(I.getDate()-
+7);c.drive.listFiles(null,I,N?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));C(H)},G)},function(C,G,N,I){c.drive.listFiles(C,null,I?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));G(H)},N)},function(C,G,N){c.drive.getFile(C.id,function(I){G(I.data)},N)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
+!m.isCellLocked(m.getDefaultParent())){var u=new NewDialog(c,null,!1,function(D){c.hideDialog();if(null!=D){var B=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(D,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShareCursorPosition()});l=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShowRemoteCursors()});l=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});l=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});l=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});l=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
-l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,["points","inches","millimeters","meters"],z)})));l=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});l.setEnabled(c.canvasSupported&&9!=document.documentMode);
+l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,["points","inches","millimeters","meters"],D)})));l=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});l.setEnabled(c.canvasSupported&&9!=document.documentMode);
l.setToggleAction(!0);l.setSelectedCallback(function(){return null!=c.ruler});l=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});l.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;l.setToggleAction(!0);l.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(c);c.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(t){m.isEnabled()&&(null==this.freehandWindow&&(t=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,t?120:84,t)),m.freehand.isDrawing()?
-m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatXml"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-t.appendChild(L);var C=c.addCheckbox(t,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),E=c.addCheckbox(t,mxResources.get("compressed"),!0),G=c.addCheckbox(t,mxResources.get("allPages"),!z,z);G.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?G.setAttribute("disabled","disabled"):G.removeAttribute("disabled")});t=new CustomDialog(c,t,mxUtils.bind(this,function(){c.downloadFile("xml",!E.checked,null,!C.checked,z||!G.checked)}),null,mxResources.get("export"));c.showDialog(t.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(t,z,L,C,E,G,P,J,F){P=[];F&&P.push("tags=%7B%7D");t=new EmbedDialog(c,c.createLink(t,z,L,C,E,G,null,!0,P));c.showDialog(t.container,450,240,!0,!0);t.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(t){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,t,function(z,L,C,E,G,P,J,F,H,S,V){c.createHtml(z,L,C,E,G,P,J,F,H,S,V,mxUtils.bind(this,function(M,W){var U=c.getBaseFilename(J);M='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(U)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+M+"\n"+W+"\n</body>\n</html>";c.saveData(U+(".drawio"==U.substring(U.lenth-7)?"":".drawio")+
-".html","html",M,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var t=null==c.pages||1>=c.pages.length,z=document.createElement("div");z.style.whiteSpace="nowrap";var L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatPdf"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(L);var C=function(){J!=this&&this.checked?
-(W.removeAttribute("disabled"),W.checked=!m.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};L=200;var E=1,G=null;if(c.pdfPageExport&&!t){var P=function(){V.value=Math.max(1,Math.min(E,Math.max(parseInt(V.value),parseInt(H.value))));H.value=Math.max(1,Math.min(E,Math.min(parseInt(V.value),parseInt(H.value))))},J=c.addRadiobox(z,"pages",mxResources.get("allPages"),!0),F=c.addRadiobox(z,"pages",mxResources.get("pages")+":",!1,null,!0),H=document.createElement("input");H.style.cssText=
-"margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("type","number");H.setAttribute("min","1");H.style.width="50px";z.appendChild(H);var S=document.createElement("span");mxUtils.write(S,mxResources.get("to"));z.appendChild(S);var V=H.cloneNode(!0);z.appendChild(V);mxEvent.addListener(H,"focus",function(){F.checked=!0});mxEvent.addListener(V,"focus",function(){F.checked=!0});mxEvent.addListener(H,"change",P);mxEvent.addListener(V,"change",P);if(null!=c.pages&&(E=c.pages.length,null!=c.currentPage))for(P=
-0;P<c.pages.length;P++)if(c.currentPage==c.pages[P]){G=P+1;H.value=G;V.value=G;break}H.setAttribute("max",E);V.setAttribute("max",E);mxUtils.br(z);var M=c.addRadiobox(z,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),W=c.addCheckbox(z,mxResources.get("crop"),!1,!0),U=c.addCheckbox(z,mxResources.get("grid"),!1,!1);mxEvent.addListener(J,"change",C);mxEvent.addListener(F,"change",C);mxEvent.addListener(M,"change",C);L+=64}else M=c.addCheckbox(z,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
-W=c.addCheckbox(z,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),U=c.addCheckbox(z,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(M,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var X=null,u=null;if(EditorUi.isElectronApp||C)u=c.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),L+=30;C&&(X=c.addCheckbox(z,mxResources.get("transparentBackground"),!1),L+=30);z=new CustomDialog(c,
-z,mxUtils.bind(this,function(){var D=null;if(!t){D=parseInt(H.value);var K=parseInt(V.value);D=J.checked||D==G&&K==G?null:{from:Math.max(0,Math.min(E-1,D-1)),to:Math.max(0,Math.min(E-1,K-1))}}c.downloadFile("pdf",null,null,!M.checked,t?!0:!J.checked&&null==D,!W.checked,null!=X&&X.checked,null,null,U.checked,null!=u&&u.checked,D)}),null,mxResources.get("export"));c.showDialog(z.container,300,L,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
-c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function t(){null!=z&&z.removeDraft();c.fileLoaded(null)}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var t=
-m.getSelectionCell(),z=m.view.getState(t);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(t=new EditShapeDialog(c,t,mxResources.get("editShape")+":",630,400),c.showDialog(t.container,640,480,!0,!1),t.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(t,z){c.spinner.stop();t=new RevisionDialog(c,t,z);c.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,
-function(t){c.handleError(t)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var t=c.getCurrentFile();null!=t&&(window.drawdata=
-c.getFileData(),t=null!=t.getTitle()?t.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(l=c.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(c);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!c.isMathEnabled();m.model.execute(t)}),l.setToggleAction(!0),l.setSelectedCallback(function(){return c.isMathEnabled()}),
-l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var t=
-m.getSelectionCells(),z=[],L=0;L<t.length;L++)m.getModel().isVertex(t[L])&&z.push(t[L]);0<z.length&&(t=new EditGeometryDialog(c,z),c.showDialog(t.container,200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
-null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var t=new BackgroundImageDialog(c,function(z){c.setBackgroundImage(z)});c.showDialog(t.container,400,170,!0,!0);t.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(t,z,L,C,E,G,P,J,F,H,S,V,M,W,U){F=parseInt(t);!isNaN(F)&&0<F&&(U?c.downloadFile("remoteSvg",null,null,L,null,J,z,t,P,null,E):c.exportSvg(F/100,z,L,C,E,G,P,!J,!1,H,V,M,W))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,z,L,C,E,G,P,J,F,H,S,V,M){t=parseInt(t);!isNaN(t)&&
-0<t&&c.exportImage(t/100,z,L,C,E,P,!J,!1,null,S,null,V,M)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,z,L,C,E){c.downloadFile(z?"xmlpng":"png",null,null,t,null,null,L,C,E)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(t,z,L,C,E,G,P,J,F,H,S,V,M){t=parseInt(t);!isNaN(t)&&0<t&&c.exportImage(t/100,!1,L,C,!1,P,!J,!1,"jpeg",S,null,V,M)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,z,L,C,E){c.downloadFile("jpeg",null,null,t,null,null,null,C,E)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
-z=mxUtils.getXml(0==t.length?c.editor.getGraphXml():m.encodeCells(t));c.copyImage(t,z)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
+Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(u){m.isEnabled()&&(null==this.freehandWindow&&(u=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)),m.freehand.isDrawing()?
+m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var D=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+u.appendChild(B);var C=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),G=c.addCheckbox(u,mxResources.get("compressed"),!0),N=c.addCheckbox(u,mxResources.get("allPages"),!D,D);N.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!G.checked,null,!C.checked,D||!N.checked)}),null,mxResources.get("export"));c.showDialog(u.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,D,B,C,G,N,I,F,H){I=[];H&&I.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,null,!0,I));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,U){var X=c.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=function(){F!=this&&this.checked?
+(U.removeAttribute("disabled"),U.checked=!m.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};B=200;var G=1,N=null;if(c.pdfPageExport&&!u){var I=function(){J.value=Math.max(1,Math.min(G,Math.max(parseInt(J.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(J.value),parseInt(R.value))))},F=c.addRadiobox(D,"pages",mxResources.get("allPages"),!0),H=c.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
+"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";D.appendChild(R);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));D.appendChild(W);var J=R.cloneNode(!0);D.appendChild(J);mxEvent.addListener(R,"focus",function(){H.checked=!0});mxEvent.addListener(J,"focus",function(){H.checked=!0});mxEvent.addListener(R,"change",I);mxEvent.addListener(J,"change",I);if(null!=c.pages&&(G=c.pages.length,null!=c.currentPage))for(I=
+0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){N=I+1;R.value=N;J.value=N;break}R.setAttribute("max",G);J.setAttribute("max",G);mxUtils.br(D);var V=c.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),U=c.addCheckbox(D,mxResources.get("crop"),!1,!0),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",C);mxEvent.addListener(H,"change",C);mxEvent.addListener(V,"change",C);B+=64}else V=c.addCheckbox(D,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
+U=c.addCheckbox(D,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(V,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var t=null,E=null;if(EditorUi.isElectronApp||C)E=c.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;C&&(t=c.addCheckbox(D,mxResources.get("transparentBackground"),!1),B+=30);D=new CustomDialog(c,
+D,mxUtils.bind(this,function(){var M=null;if(!u){M=parseInt(R.value);var T=parseInt(J.value);M=F.checked||M==N&&T==N?null:{from:Math.max(0,Math.min(G-1,M-1)),to:Math.max(0,Math.min(G-1,T-1))}}c.downloadFile("pdf",null,null,!V.checked,u?!0:!F.checked&&null==M,!U.checked,null!=t&&t.checked,null,null,X.checked,null!=E&&E.checked,M)}),null,mxResources.get("export"));c.showDialog(D.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
+c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function u(){null!=D&&D.removeDraft();c.fileLoaded(null)}var D=c.getCurrentFile();null!=D&&D.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var u=
+m.getSelectionCell(),D=m.view.getState(u);null!=D&&null!=D.shape&&null!=D.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,D){c.spinner.stop();u=new RevisionDialog(c,u,D);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,
+function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=
+c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(u),null,!0))});"undefined"!==typeof MathJax&&(l=c.actions.addAction("mathematicalTypesetting",function(){var u=new ChangePageSetup(c);u.ignoreColor=!0;u.ignoreImage=!0;u.mathEnabled=!c.isMathEnabled();m.model.execute(u)}),l.setToggleAction(!0),l.setSelectedCallback(function(){return c.isMathEnabled()}),
+l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=
+m.getSelectionCells(),D=[],B=0;B<u.length;B++)m.getModel().isVertex(u[B])&&D.push(u[B]);0<D.length&&(u=new EditGeometryDialog(c,D),c.showDialog(u.container,200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
+null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=new BackgroundImageDialog(c,function(D){c.setBackgroundImage(D)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(u,D,B,C,G,N,I,F,H,R,W,J,V,U,X){H=parseInt(u);!isNaN(H)&&0<H&&(X?c.downloadFile("remoteSvg",null,null,B,null,F,D,u,I,null,G):c.exportSvg(H/100,D,B,C,G,N,I,!F,!1,R,J,V,U))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&
+0<u&&c.exportImage(u/100,D,B,C,G,I,!F,!1,null,W,null,J,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile(D?"xmlpng":"png",null,null,u,null,null,B,C,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,C,!1,I,!F,!1,"jpeg",W,null,J,V)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile("jpeg",null,null,u,null,null,null,C,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
+D=mxUtils.getXml(0==u.length?c.editor.getGraphXml():m.encodeCells(u));c.copyImage(u,D)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",
-function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var t=new FeedbackDialog(c);c.showDialog(t.container,610,360,!0,!1);t.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):
c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});l=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=c.actions.addAction("findReplace...",mxUtils.bind(this,function(t,z){var L=(t=m.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))?"findReplace":"find";z=L+"Window";if(null==this[z]){var C=t?"min"==uiTheme?330:
-300:240;this[z]=new FindWindow(c,document.body.offsetWidth-(C+20),100,C,t?"min"==uiTheme?304:288:170,t);this[z].window.addListener("show",function(){c.fireEvent(new mxEventObject(L))});this[z].window.addListener("hide",function(){c.fireEvent(new mxEventObject(L))});this[z].window.setVisible(!0)}else this[z].window.setVisible(!this[z].window.isVisible())}),null,null,Editor.ctrlKey+"+F");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){var t=m.isEnabled()?"findReplaceWindow":
-"findWindow";return null!=this[t]&&this[t].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==c.pages||1>=c.pages.length;if(t)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatVsdx"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(L);var C=c.addCheckbox(z,mxResources.get("allPages"),
-!t,t);C.style.marginBottom="16px";t=new CustomDialog(c,z,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var z=
-document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(t);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(E){mxEvent.getSource(E)!=t&&(t.checked=!t.checked)});header=z}var L=localStorage.getItem(Editor.configurationKey);z=[[mxResources.get("reset"),function(E,G){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(E)?(localStorage.removeItem(Editor.settingsKey),
-localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(P){c.handleError(P)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");null!=C&&"1"==urlParams.sketch&&z.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||z.push([mxResources.get("share"),function(E,G){if(0<G.value.length)try{var P=JSON.parse(G.value),J=window.location.protocol+"//"+window.location.host+
-"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(P)),F=new EmbedDialog(c,J);c.showDialog(F.container,450,240,!0);F.init()}catch(H){c.handleError(H)}else c.handleError({message:mxResources.get("invalidInput")})}]);z=new TextareaDialog(c,mxResources.get("configuration")+":",null!=L?JSON.stringify(JSON.parse(L),null,2):"",function(E){if(null!=E)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),E==L)c.hideDialog();else{if(0<E.length){var G=JSON.parse(E);
-localStorage.setItem(Editor.configurationKey,JSON.stringify(G))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(P){c.handleError(P)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",z,t.parentNode);c.showDialog(z.container,620,460,!0,!1);z.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,z){var L=mxUtils.bind(this,
-function(E){var G=""==E?mxResources.get("automatic"):mxLanguageMap[E],P=null;""!=G&&(P=t.addItem(G,null,mxUtils.bind(this,function(){mxSettings.setLanguage(E);mxSettings.save();mxClient.language=E;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),z),(E==mxLanguage||""==E&&null==mxLanguage)&&t.addCheckmark(P,Editor.checkmarkImage));return P});L("");t.addSeparator(z);for(var C in mxLanguageMap)L(C)})));var x=Menus.prototype.createMenubar;
-Menus.prototype.createMenubar=function(t){var z=x.apply(this,arguments);if(null!=z&&"1"!=urlParams.noLangIcon){var L=this.get("language");if(null!=L){L=z.addMenu("",L.funct);L.setAttribute("title",mxResources.get("language"));L.style.width="16px";L.style.paddingTop="2px";L.style.paddingLeft="4px";L.style.zIndex="1";L.style.position="absolute";L.style.display="block";L.style.cursor="pointer";L.style.right="17px";"atlas"==uiTheme?(L.style.top="6px",L.style.right="15px"):L.style.top="min"==uiTheme?"2px":
-"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex="1";L.appendChild(C);mxUtils.setOpacity(L,40);"1"==urlParams.winCtrls&&(L.style.right="95px",L.style.width="19px",L.style.height="19px",L.style.webkitAppRegion="no-drag",C.style.webkitAppRegion=
-"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)L.style.opacity="0.85",L.style.filter="invert(100%)";document.body.appendChild(L);z.langIcon=L}}return z}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var t=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(z){if(0<z.length)try{var L=JSON.parse(z);
-c.executeLayoutList(L);c.customLayoutConfig=L}catch(C){c.handleError(C),null!=window.console&&console.error(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(t.container,620,460,!0,!0);t.init()});l=this.get("layout");var y=l.funct;l.funct=function(t,z){y.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){function L(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?J():c.spinner.spin(document.body,
-mxResources.get("loading"))&&(c.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",J)})})}):mxscript("js/extensions.min.js",J))}var C=null,E=20,G=20,P=!0,J=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&P){var X=c.editor.graph,u=new mxOrgChartLayout(X,C,
-E,G),D=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(D=X.getSelectionCell());u.execute(D);P=!1}},F=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");F.appendChild(H);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var V=0;V<H.length;V++){var M=document.createElement("option");mxUtils.write(M,H[V]);M.value=V;2==V&&M.setAttribute("selected","selected");S.appendChild(M)}mxEvent.addListener(S,"change",function(){C=S.value});F.appendChild(S);H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,
-mxResources.get("parentChildSpacing")+": ");F.appendChild(H);var W=document.createElement("input");W.type="number";W.value=E;W.style.width="200px";W.style.boxSizing="border-box";F.appendChild(W);mxEvent.addListener(W,"change",function(){E=W.value});H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("siblingSpacing")+": ");F.appendChild(H);var U=document.createElement("input");U.type="number";U.value=G;U.style.width=
-"200px";U.style.boxSizing="border-box";F.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});F=new CustomDialog(c,F,function(){null==C&&(C=2);L()});c.showDialog(F.container,355,140,!0,!0)},z,null,n());t.addSeparator(z);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var L=new mxParallelEdgeLayout(m);L.checkOverlap=!0;L.spacing=20;c.executeLayout(function(){L.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}),z);t.addSeparator(z);
-c.menus.addMenuItem(t,"runLayout",z,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,z){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(t,["about"],z);else{var L=t.addItem("Search:",null,null,z,null,null,!1);L.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";L.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,
-"keydown",mxUtils.bind(this,function(E){var G=mxUtils.trim(C.value);13==E.keyCode&&0<G.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(G)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:G}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==E.keyCode&&(C.value="")}));L.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,
-function(E){document.activeElement!=C&&C.focus();mxEvent.consume(E)},function(E){mxEvent.consume(E)},function(E){mxEvent.consume(E)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),z),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates",
-"-"],z),this.addMenuItems(t,["forkme","-","about"],z)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),z)}"1"==urlParams.test&&(t.addSeparator(z),this.addSubmenu("testDevelop",t,z))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var t=prompt("Language Code",Graph.diagramLanguage||"");null!=t&&(Graph.diagramLanguage=0<t.length?t:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
+this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=c.actions.addAction("findReplace...",mxUtils.bind(this,function(u,D){var B=(u=m.isEnabled()&&(null==D||!mxEvent.isShiftDown(D)))?"findReplace":"find";D=B+"Window";if(null==this[D]){var C=u?"min"==uiTheme?330:
+300:240;this[D]=new FindWindow(c,document.body.offsetWidth-(C+20),100,C,u?"min"==uiTheme?304:288:170,u);this[D].window.addListener("show",function(){c.fireEvent(new mxEventObject(B))});this[D].window.addListener("hide",function(){c.fireEvent(new mxEventObject(B))});this[D].window.setVisible(!0)}else this[D].window.setVisible(!this[D].window.isVisible())}),null,null,Editor.ctrlKey+"+F");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){var u=m.isEnabled()?"findReplaceWindow":
+"findWindow";return null!=this[u]&&this[u].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var u=null==c.pages||1>=c.pages.length;if(u)c.exportVisio();else{var D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=c.addCheckbox(D,mxResources.get("allPages"),
+!u,u);C.style.marginBottom="16px";u=new CustomDialog(c,D,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var D=
+document.createElement("span");D.style["float"]="right";D.style.cursor="pointer";D.style.userSelect="none";D.style.marginTop="-4px";D.appendChild(u);mxUtils.write(D,mxResources.get("showStartScreen"));mxEvent.addListener(D,"click",function(G){mxEvent.getSource(G)!=u&&(u.checked=!u.checked)});header=D}var B=localStorage.getItem(Editor.configurationKey);D=[[mxResources.get("reset"),function(G,N){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),
+localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(I){c.handleError(I)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,N){if(0<N.value.length)try{var I=JSON.parse(N.value),F=window.location.protocol+"//"+window.location.host+
+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),H=new EmbedDialog(c,F);c.showDialog(H.container,450,240,!0);H.init()}catch(R){c.handleError(R)}else c.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(c,mxResources.get("configuration")+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(G){if(null!=G)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),G==B)c.hideDialog();else{if(0<G.length){var N=JSON.parse(G);
+localStorage.setItem(Editor.configurationKey,JSON.stringify(N))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(I){c.handleError(I)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",D,u.parentNode);c.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,D){var B=mxUtils.bind(this,
+function(G){var N=""==G?mxResources.get("automatic"):mxLanguageMap[G],I=null;""!=N&&(I=u.addItem(N,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),D),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(I,Editor.checkmarkImage));return I});B("");u.addSeparator(D);for(var C in mxLanguageMap)B(C)})));var x=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(u){var D=x.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var B=this.get("language");if(null!=B){B=D.addMenu("",B.funct);B.setAttribute("title",mxResources.get("language"));B.style.width="16px";B.style.paddingTop="2px";B.style.paddingLeft="4px";B.style.zIndex="1";B.style.position="absolute";B.style.display="block";B.style.cursor="pointer";B.style.right="17px";"atlas"==uiTheme?(B.style.top="6px",B.style.right="15px"):B.style.top="min"==uiTheme?"2px":
+"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex="1";B.appendChild(C);mxUtils.setOpacity(B,40);"1"==urlParams.winCtrls&&(B.style.right="95px",B.style.width="19px",B.style.height="19px",B.style.webkitAppRegion="no-drag",C.style.webkitAppRegion=
+"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)B.style.opacity="0.85",B.style.filter="invert(100%)";document.body.appendChild(B);D.langIcon=B}}return D}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(D){if(0<D.length)try{var B=JSON.parse(D);
+c.executeLayoutList(B);c.customLayoutConfig=B}catch(C){c.handleError(C),null!=window.console&&console.error(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,D){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){function B(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?F():c.spinner.spin(document.body,
+mxResources.get("loading"))&&(c.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("js/extensions.min.js",F))}var C=null,G=20,N=20,I=!0,F=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&I){var t=c.editor.graph,E=new mxOrgChartLayout(t,C,
+G,N),M=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(M=t.getSelectionCell());E.execute(M);I=!1}},H=document.createElement("div"),R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("orgChartType")+": ");H.appendChild(R);var W=document.createElement("select");W.style.width="200px";W.style.boxSizing="border-box";R=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var J=0;J<R.length;J++){var V=document.createElement("option");mxUtils.write(V,R[J]);V.value=J;2==J&&V.setAttribute("selected","selected");W.appendChild(V)}mxEvent.addListener(W,"change",function(){C=W.value});H.appendChild(W);R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,
+mxResources.get("parentChildSpacing")+": ");H.appendChild(R);var U=document.createElement("input");U.type="number";U.value=G;U.style.width="200px";U.style.boxSizing="border-box";H.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("siblingSpacing")+": ");H.appendChild(R);var X=document.createElement("input");X.type="number";X.value=N;X.style.width=
+"200px";X.style.boxSizing="border-box";H.appendChild(X);mxEvent.addListener(X,"change",function(){N=X.value});H=new CustomDialog(c,H,function(){null==C&&(C=2);B()});c.showDialog(H.container,355,140,!0,!0)},D,null,n());u.addSeparator(D);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(m);B.checkOverlap=!0;B.spacing=20;c.executeLayout(function(){B.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}),D);u.addSeparator(D);
+c.menus.addMenuItem(u,"runLayout",D,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,D){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],D);else{var B=u.addItem("Search:",null,null,D,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,
+"keydown",mxUtils.bind(this,function(G){var N=mxUtils.trim(C.value);13==G.keyCode&&0<N.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(N)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:N}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,
+function(G){document.activeElement!=C&&C.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickStart website support -".split(" "),D),"1"!=urlParams.disableUpdate&&this.addMenuItems(u,["check4Updates",
+"-"],D),this.addMenuItems(u,["forkme","-","about"],D)):this.addMenuItems(u,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),D)}"1"==urlParams.test&&(u.addSeparator(D),this.addSubmenu("testDevelop",u,D))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var u=prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,
-function(){if(!m.isSelectionEmpty()){var t=m.cloneCells(m.getSelectionCells()),z=m.getBoundingBoxFromGeometry(t);t=m.moveCells(t,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(t)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=m.getGraphBounds(),z=m.view.translate,L=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",t.x/L-z.x,t.y/L-
-z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(J){function F(K){if(null==D[K]){if(D[K]=!0,null!=V[K]){for(;0<V[K].length;){var T=V[K].pop();F(T)}delete V[K]}}else mxLog.debug(H+": Visited: "+K)}var H=J.parentNode.id,S=J.childNodes;J={};
-for(var V={},M=null,W={},U=0;U<S.length;U++){var X=S[U];if(null!=X.id&&0<X.id.length)if(null==J[X.id]){J[X.id]=X.id;var u=X.getAttribute("parent");null==u?null!=M?mxLog.debug(H+": Multiple roots: "+X.id):M=X.id:(null==V[u]&&(V[u]=[]),V[u].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var D={};null==M?mxLog.debug(H+": No root"):(F(M),Object.keys(D).length!=Object.keys(J).length&&
-(mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",V)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var C=mxUtils.parseXml(z),E=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=E&&0<E.length)try{var G=c.getHashValueForPages(E);mxLog.debug("Checksum: ",G)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var P=C.getElementsByTagName("root");for(z=0;z<P.length;z++)L(P[z]);
-mxLog.show()}catch(J){c.handleError(J),null!=window.console&&console.error(J)}});c.showDialog(t.container,620,460,!0,!0);t.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var t=new TextareaDialog(c,"Diff/Sync:","",function(z){var L=c.getCurrentFile();if(0<z.length&&null!=L)try{var C=JSON.parse(z);L.patch([C],null,!0);c.hideDialog()}catch(E){c.handleError(E)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(z,L){A=c.getPagesForXml(c.getFileData(!0));
-t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(z,L){try{t.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),t.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):t.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2);c.showDialog(t.container,620,460,!0,!0);t.init()}else c.alert("No pages")}));
-c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=c.getCurrentFile();console.log("editorUi",c,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(t.theirPages));console.log("diff ownPages/theirPages",c.diffPages(t.ownPages,t.theirPages));var z=t.getShadowPages();null!=z&&(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",
-c.diffPages(z,t.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(t.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(t.theirPages,z)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(t.theirPages,t.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(t.sync.snapshot,
-c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(t.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(t.theirPages,c.pages)))}null!=t&&console.log("Shadow pages",[c.getXmlForPages(t.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var t=c.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&
-(console.log("patching actualPages to shadowPages",t.patch([c.diffPages(t.shadowPages,c.pages)])),t.ownPages=c.clonePages(c.pages),t.theirPages=c.clonePages(c.pages),t.shadowPages=c.clonePages(c.pages),null!=t.sync&&(t.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var t=new mxImageExport,z=m.getGraphBounds(),L=m.view.scale,C=mxUtils.createXmlDocument(),
-E=C.createElement("output");C.appendChild(E);C=new mxXmlCanvas2D(E);C.translate(Math.floor((1-z.x)/L),Math.floor((1-z.y)/L));C.scale(1/L);var G=0,P=C.save;C.save=function(){G++;P.apply(this,arguments)};var J=C.restore;C.restore=function(){G--;J.apply(this,arguments)};var F=t.drawShape;t.drawShape=function(H){mxLog.debug("entering shape",H,G);F.apply(this,arguments);mxLog.debug("leaving shape",H,G)};t.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(E));mxLog.debug("stateCounter",
-G)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),z)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,
-!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){m.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(c,t,mxResources.get("editShape")+":",630,400),c.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=n;c.actions.put("embedHtml",
-new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(z,L,C,E,G,P,J,F,H,S,V){c.createHtml(z,L,C,E,G,P,J,F,H,S,V,mxUtils.bind(this,function(M,W){var U=new EmbedDialog(c,M+"\n"+W,null,null,function(){var X=window.open(),u=X.document;if(null!=u){"CSS1Compat"===document.compatMode&&
-u.writeln("<!DOCTYPE html>");u.writeln("<html>");u.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');u.writeln("<body>");u.writeln(M);var D=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;D&&u.writeln(W);u.writeln("</body>");u.writeln("</html>");u.close();if(!D){var K=X.document.createElement("div");K.marginLeft="26px";K.marginTop="26px";mxUtils.write(K,mxResources.get("updatingDocument"));D=X.document.createElement("img");
-D.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");D.style.marginLeft="6px";K.appendChild(D);X.document.body.insertBefore(K,X.document.body.firstChild);window.setTimeout(function(){var T=document.createElement("script");T.type="text/javascript";T.src=/<script.*?src="(.*?)"/.exec(W)[1];u.body.appendChild(T);K.parentNode.removeChild(K)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(U.container,450,240,!0,
-!0);U.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var t=c.getCurrentFile();null!=t&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(z){c.spinner.stop();null!=z?(z=new EmbedDialog(c,'<img src="'+(t.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+t.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",
-new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(t,z,L,C,E,G){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(t,z,L,C,E,G,function(P){c.spinner.stop();P=new EmbedDialog(c,P);c.showDialog(P.container,450,240,!0,!0);P.init()},function(P){c.spinner.stop();c.handleError(P)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(t,
-z,L,C,E,G){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(t,z,L,C,E,G,function(P){c.spinner.stop();P=new EmbedDialog(c,P);c.showDialog(P.container,450,240,!0,!0);P.init()},function(P){c.spinner.stop();c.handleError(P)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),
-null,"100%",Math.ceil(t.height/m.view.scale)+2,function(z,L,C,E,G,P,J,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(S){c.spinner.stop();var V=[];H&&V.push("tags=%7B%7D");S=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+J+";height:"+F+';" src="'+c.createLink(z,L,C,E,G,P,S,null,V)+'"></iframe>');c.showDialog(S.container,450,240,!0,!0);S.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=
-document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));t.appendChild(z);mxEvent.addListener(z,"click",function(L){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(L)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(L,C,E,G,P,J,F,H,S){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var M=["border=0"];S&&M.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(L,C,E,G,P,J,V,null,M,!0));c.showDialog(V.container,450,240,!0,!0);V.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
-"...",function(){c.showPublishLinkDialog(null,null,null,null,function(t,z,L,C,E,G,P,J,F){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(H){c.spinner.stop();var S=[];F&&S.push("tags=%7B%7D");H=new EmbedDialog(c,c.createLink(t,z,L,C,E,G,H,null,S));c.showDialog(H.container,450,240,!0,!0);H.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
-c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();t=new GoogleSitesDialog(c,t);c.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",
-function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var t=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(c.actions.get("save").funct=function(t){m.isEditing()&&m.stopEditing();var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var L=c.createLoadMessage("save");L.xml=z;t&&(L.exit=!0);z=JSON.stringify(L)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));t=c.getCurrentFile();null==t||t.constructor==
-EmbedFile||t.constructor==LocalFile&&null==t.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var t=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(z,
-"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,z){c.isExportToCanvas()?(this.addMenuItems(t,["exportPng"],z),c.jpgSupported&&this.addMenuItems(t,["exportJpg"],z)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],z);this.addMenuItems(t,["exportSvg","-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(t,
-["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(t,["exportVsdx"],z);this.addMenuItems(t,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(t.addSeparator(z),this.addMenuItem(t,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,z){function L(G){G.pickFile(function(P){c.spinner.spin(document.body,
-mxResources.get("loading"))&&G.getFile(P,function(J){var F="data:image/"==J.getData().substring(0,11)?E(J.getTitle()):"text/xml";/\.svg$/i.test(J.getTitle())&&!c.editor.isDataSvg(J.getData())&&(J.setData(Editor.createSvgDataUri(J.getData())),F="image/svg+xml");C(J.getData(),F,J.getTitle())},function(J){c.handleError(J,null!=J?mxResources.get("errorLoadingFile"):null)},G==c.drive)},!0)}var C=mxUtils.bind(this,function(G,P,J){var F=m.view,H=m.getGraphBounds(),S=m.snap(Math.ceil(Math.max(0,H.x/F.scale-
-F.translate.x)+4*m.gridSize)),V=m.snap(Math.ceil(Math.max(0,(H.y+H.height)/F.scale-F.translate.y)+4*m.gridSize));"data:image/"==G.substring(0,11)?c.loadImage(G,mxUtils.bind(this,function(M){var W=!0,U=mxUtils.bind(this,function(){c.resizeImage(M,G,mxUtils.bind(this,function(X,u,D){X=W?Math.min(1,Math.min(c.maxImageSize/u,c.maxImageSize/D)):1;c.importFile(G,P,S,V,Math.round(u*X),Math.round(D*X),J,function(K){c.spinner.stop();m.setSelectionCells(K);m.scrollCellToVisible(m.getSelectionCell())})}),W)});
-G.length>c.resampleThreshold?c.confirmImageResize(function(X){W=X;U()}):U()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(G,P,S,V,0,0,J,function(M){c.spinner.stop();m.setSelectionCells(M);m.scrollCellToVisible(m.getSelectionCell())})}),E=mxUtils.bind(this,function(G){var P="text/xml";/\.png$/i.test(G)?P="image/png":/\.jpe?g$/i.test(G)?P="image/jpg":/\.gif$/i.test(G)?P="image/gif":/\.pdf$/i.test(G)&&(P="application/pdf");return P});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){L(c.drive)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){L(c.oneDrive)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){L(c.dropbox)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){L(c.gitHub)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){L(c.gitLab)},z);null!=c.trello?t.addItem(mxResources.get("trello")+
-"...",null,function(){L(c.trello)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+
-"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("import"),function(P){if(null!=P&&0<P.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var J=/(\.png)($|\?)/i.test(P)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(P),function(F){C(F,J,P)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==J)}},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},z))}))).isEnabled=n;
-this.put("theme",new Menu(mxUtils.bind(this,function(t,z){var L="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=t.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},z);"kennedy"!=L&&"atlas"!=L&&"dark"!=L&&"min"!=L&&"sketch"!=L&&t.addCheckmark(C,Editor.checkmarkImage);t.addSeparator(z);C=t.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},
-z);"kennedy"==L&&t.addCheckmark(C,Editor.checkmarkImage);C=t.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},z);"min"==L&&t.addCheckmark(C,Editor.checkmarkImage);C=t.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},z);"atlas"==L&&t.addCheckmark(C,Editor.checkmarkImage);if("dark"==L||!mxClient.IS_IE&&!mxClient.IS_IE11)C=t.addItem(mxResources.get("dark"),
-null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},z),"dark"==L&&t.addCheckmark(C,Editor.checkmarkImage);t.addSeparator(z);C=t.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},z);"sketch"==L&&t.addCheckmark(C,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==
-LocalFile&&null!=t.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(L,C){t.invalidFileHandle=null;t.fileHandle=L;t.title=C.name;t.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(t.getTitle()));else{var z=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(L){null!=L&&0<L.length&&null!=t&&L!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(L,
-mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(L){if(null!=L&&0<L.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,340,96,!0,
-!0);z.init()}}));l.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};l.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var t=c.getCurrentFile();if(null!=t){var z=c.getCopyFilename(t);t.constructor==DriveFile?(z=new CreateDialog(c,z,mxUtils.bind(this,function(L,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),L):("download"==C&&(C=App.MODE_GOOGLE),null!=L&&0<L.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
-t.saveAs(L,mxUtils.bind(this,function(E){t.desc=E;t.save(!1,mxUtils.bind(this,function(){c.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),mxUtils.bind(this,function(E){c.handleError(E)})):c.createFile(L,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(z.container,420,380,!0,!0),
-z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=c.getCurrentFile();if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var z=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var L=0;L<t.desc.parents.length;L++)if(t.desc.parents[L].isRoot){z=!0;break}c.pickFolder(t.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&t.move(C,mxUtils.bind(this,
-function(E){c.spinner.stop()}),mxUtils.bind(this,function(E){c.handleError(E)}))}),null,!0,z)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,["publishLink"],z)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
-function(){try{var t=c.getCurrentFile();null!=t&&t.share()}catch(z){c.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,z){var L=c.getCurrentFile();null==L||L.getMode()!=App.MODE_GOOGLE&&L.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(L.getTitle())||this.addMenuItems(t,["liveImage","-"],z);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(t,["embedIframe"],z);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(t,
-"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),z)})));c.addInsertItem=function(t,z,L,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&t.addItem(L,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var E=new ParseDialog(c,L,C);c.showDialog(E.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else E=new CreateGraphDialog(c,L,C),c.showDialog(E.container,620,420,!0,!1);E.init()}),z,null,n())};
-var B=function(t,z,L,C){var E=new mxCell(t,new mxGeometry(0,0,z,L),C);E.vertex=!0;t=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([E],!0));E.geometry.x=t.x;E.geometry.y=t.y;m.getModel().beginUpdate();try{E=m.addCell(E),m.fireEvent(new mxEventObject("cellsInserted","cells",[E]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(E);m.setSelectionCell(E);m.container.focus();m.editAfterInsert&&m.startEditing(E);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(E))},
-0);return E};c.actions.put("insertText",new Action(mxResources.get("text"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(B("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",120,60,
-"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&B("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=
-mxUtils.bind(this,function(t,z,L){for(var C=0;C<L.length;C++)"-"==L[C]?t.addSeparator(z):c.addInsertItem(t,z,mxResources.get(L[C])+"...",L[C])});this.put("insert",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(t,["insertTemplate"],z);t.addSeparator(z);this.addSubmenu("insertLayout",t,z,mxResources.get("layout"));
-this.addSubmenu("insertAdvanced",t,z,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){c.addInsertMenuItems(t,z,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,z){c.addInsertMenuItems(t,z,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},z,null,n())})));
-this.put("openRecent",new Menu(function(t,z){var L=c.getRecent();if(null!=L){for(var C=0;C<L.length;C++)(function(E){var G=E.mode;G==App.MODE_GOOGLE?G="googleDrive":G==App.MODE_ONEDRIVE&&(G="oneDrive");t.addItem(E.title+" ("+mxResources.get(G)+")",null,function(){c.loadFile(E.id)},z)})(L[C]);t.addSeparator(z)}t.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(t,z){null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},
-z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},
-z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):k&&"function"===
-typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,
-"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},z))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(t,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
-z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+
-"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z)})),this.put("openLibraryFrom",new Menu(function(t,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):g&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):d&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);t.addSeparator(z);null!=c.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);null!=c.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);null!=c.trello?t.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},z):k&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);t.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(t.addSeparator(z),t.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&c.spinner.spin(document.body,
-mxResources.get("loading"))){var E=C;c.editor.isCorsEnabledForUrl(C)||(E=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(E,function(G){if(200<=G.getStatus()&&299>=G.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,G.getText(),C))}catch(P){c.handleError(P,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
-c.showDialog(L.container,300,80,!0,!0);L.init()},z));"1"==urlParams.confLib&&(t.addSeparator(z),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-l=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));l=this.get("viewPanels");var I=l.funct;l.funct=
-function(t,z){I.apply(this,arguments);c.menus.addMenuItems(t,["tags"],z);c.commentsSupported()&&c.menus.addMenuItems(t,["comments"],z)};this.put("view",new Menu(mxUtils.bind(this,function(t,z){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var L=this.addMenuItem(t,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(L,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,z);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),z);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",z);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(t,
-["-","fullscreen"],z)})));if(EditorUi.isElectronApp){var O="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();O=!O;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return O});c.actions.addAction("openDevTools",function(){c.openDevTools()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,z){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",t,z),t.addSeparator(z));"1"!=urlParams.embed&&
-(this.addSubmenu("theme",t,z),t.addSeparator(z));if("undefined"!==typeof MathJax){var L=this.addMenuItem(t,"mathematicalTypesetting",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(L,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck"],z);this.addMenuItems(t,["copyConnect","collapseExpand","-"],z);"1"!=urlParams.embed&&(L=c.getCurrentFile(),null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(t,
-["showRemoteCursors","shareCursor"],z),this.addMenuItems(t,["autosave"],z));t.addSeparator(z);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",z);this.addMenuItems(t,["-","editDiagram"],z);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(z);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],z);this.addMenuItems(t,["configuration"],z);EditorUi.isElectronApp&&this.addMenuItems(t,["openDevTools"],z);t.addSeparator(z);
-"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(G){return{id:G.id,isExt:!0,url:G.downloadUrl,title:G.title,imgUrl:G.thumbnailLink,changedBy:G.lastModifyingUserName,lastModifiedOn:G.modifiedDate}}var E=new TemplatesDialog(c,function(G){console.log(arguments)},null,null,null,"user",function(G,P,J){var F=new Date;F.setDate(F.getDate()-7);c.drive.listFiles(null,F,J?!0:!1,function(H){for(var S=[],V=0;V<H.items.length;V++)S.push(C(H.items[V]));G(S)},P)},function(G,P,J,
-F){c.drive.listFiles(G,null,F?!0:!1,function(H){for(var S=[],V=0;V<H.items.length;V++)S.push(C(H.items[V]));P(S)},J)},function(G,P,J){c.drive.getFile(G.id,function(F){P(F.data)},J)},null,function(G){G({Test:[]},1)},!0,!1);c.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",z))})));this.put("file",new Menu(mxUtils.bind(this,function(t,z){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,z),this.addSubmenu("exportAs",t,z),this.addSubmenu("embed",
-t,z),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],z),this.addSubmenu("newLibrary",t,z),this.addSubmenu("openLibraryFrom",t,z)),c.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],z),this.addMenuItems(t,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],z):(this.addMenuItems(t,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],z))),"1"!=
-urlParams.noExitBtn&&this.addMenuItems(t,["exit"],z);else{var L=this.editorUi.getCurrentFile();if(null!=L&&L.constructor==DriveFile){L.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],z);this.addMenuItems(t,["save","-","share"],z);var C=this.addMenuItem(t,"synchronize",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(z)}else this.addMenuItems(t,["new"],z);this.addSubmenu("openFrom",
-t,z);isLocalStorage&&this.addSubmenu("openRecent",t,z);null!=L&&L.constructor==DriveFile?this.addMenuItems(t,["new","-","rename","makeCopy","moveToFolder"],z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==L||L.constructor==LocalFile&&null==L.fileHandle||(t.addSeparator(z),C=this.addMenuItem(t,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs","-"],z),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==L||this.addMenuItems(t,["share","-"],z),this.addMenuItems(t,["rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],z):(this.addMenuItems(t,["makeCopy"],z),null!=L&&L.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],z)));t.addSeparator(z);this.addSubmenu("importFrom",t,z);this.addSubmenu("exportAs",t,z);t.addSeparator(z);
-this.addSubmenu("embed",t,z);this.addSubmenu("publish",t,z);t.addSeparator(z);this.addSubmenu("newLibrary",t,z);this.addSubmenu("openLibraryFrom",t,z);c.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],z);null!=L&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=L.getTitle()?L.getTitle():c.defaultFilename,(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(t,["-","properties"]));this.addMenuItems(t,
-["-","pageSetup"],z);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],z);this.addMenuItems(t,["-","close"])}})));f.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var z=t.extFonts,L=0;null!=z&&L<z.length;L++){var C=document.getElementById("extFont_"+z[L].name);
-null!=C&&C.parentNode.removeChild(C)}t.extFonts=[];for(L=0;null!=this.previousExtFonts&&L<this.previousExtFonts.length;L++)this.ui.editor.graph.addExtFont(this.previousExtFonts[L].name,this.previousExtFonts[L].url);this.previousExtFonts=z};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,z){for(var L=mxUtils.bind(this,function(V,M,W,U,X){var u=c.editor.graph;U=this.styleChange(t,U||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[V,null!=M?encodeURIComponent(M):null,null]:[V],null,z,function(){"1"!=urlParams["ext-fonts"]?u.setFont(V,M):(document.execCommand("fontname",!1,V),u.addExtFont(V,M));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[V,null!=M?encodeURIComponent(M):null,null]:[V],"cells",[u.cellEditor.getEditingCell()]))},function(){u.updateLabelElements(u.getSelectionCells(),
-function(D){D.removeAttribute("face");D.style.fontFamily=null;"PRE"==D.nodeName&&u.replaceElement(D,"div")});"1"==urlParams["ext-fonts"]&&u.addExtFont(V,M)});W&&(W=document.createElement("span"),W.className="geSprite geSprite-delete",W.style.cursor="pointer",W.style.display="inline-block",U.firstChild.nextSibling.nextSibling.appendChild(W),mxEvent.addListener(W,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(D){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()];
-for(var K=0;K<this.customFonts.length;K++)if(this.customFonts[K].name==V&&this.customFonts[K].url==M){this.customFonts.splice(K,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var T=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=T&&0<T.length)for(K=0;K<T.length;K++)if(T[K].name==V){T.splice(K,1);break}var N=mxUtils.clone(this.customFonts);for(K=0;K<N.length;K++)if(N[K].name==V){N.splice(K,1);break}K=new f(this.editorUi,T,N);this.editorUi.editor.graph.model.execute(K)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(D)})));Graph.addFont(V,M);U.firstChild.nextSibling.style.fontFamily=V;null!=X&&U.setAttribute("title",X)}),C={},E=0;E<this.defaultFonts.length;E++){var G=this.defaultFonts[E];"string"===typeof G?L(G):null!=G.fontFamily&&null!=G.fontUrl&&(C[encodeURIComponent(G.fontFamily)+"@"+encodeURIComponent(G.fontUrl)]=!0,L(G.fontFamily,G.fontUrl))}t.addSeparator(z);if("1"!=urlParams["ext-fonts"]){G=function(V){var M=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!C[M]){for(var W=
-V.name,U=0;null!=J[W.toLowerCase()];)W=V.name+" ("+ ++U+")";null==P[M]&&(F.push({name:V.name,url:V.url,label:W,title:V.url}),J[W.toLowerCase()]=V,P[M]=V)}};var P={},J={},F=[];for(E=0;E<this.customFonts.length;E++)G(this.customFonts[E]);for(var H in Graph.recentCustomFonts)G(Graph.recentCustomFonts[H]);F.sort(function(V,M){return V.label<M.label?-1:V.label>M.label?1:0});if(0<F.length){for(E=0;E<F.length;E++)L(F[E].name,F[E].url,!0,F[E].label,F[E].url);t.addSeparator(z)}t.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);t.addSeparator(z)}else{H=this.editorUi.editor.graph.extFonts;if(null!=H&&0<H.length){G={};var S=!1;for(E=0;E<this.customFonts.length;E++)G[this.customFonts[E].name]=!0;for(E=0;E<H.length;E++)G[H[E].name]||(this.customFonts.push(H[E]),S=!0);S&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(E=
-0;E<this.customFonts.length;E++)H=this.customFonts[E].name,G=this.customFonts[E].url,L(H,G,!0),this.editorUi.editor.graph.addExtFont(H,G,!0);t.addSeparator(z);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),z);t.addSeparator(z)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,M=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],W=
-"s",U=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var X=V.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&(M=Graph.stripQuotes(X.fontFamily),U=Graph.getFontUrl(M,null),null!=U&&(Graph.isGoogleFontUrl(U)?(U=null,W="g"):W="w")))}else X=V.getView().getState(V.getSelectionCell()),null!=X&&(M=X.style[mxConstants.STYLE_FONTFAMILY]||M,"1"!=urlParams["ext-fonts"]?(X=X.style.fontSource,null!=X&&(X=decodeURIComponent(X),Graph.isGoogleFontUrl(X)?W="g":(W="w",U=X))):(W=X.style.FType||
-W,"w"==W&&(U=this.editorUi.editor.graph.extFonts,X=null,null!=U&&(X=U.find(function(D){return D.name==M})),U=null!=X?X.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var u=null;document.activeElement==V.cellEditor.textarea&&(u=V.cellEditor.saveSelection());W=new FontDialog(this.editorUi,M,U,W,mxUtils.bind(this,function(D,K,T){null!=u&&(V.cellEditor.restoreSelection(u),u=null);
-if(null!=D&&0<D.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(D,K);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,D),V.setCellStyles("fontSource",null!=K?encodeURIComponent(K):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,D),"s"!=T&&(V.setCellStyles("FType",T),0==K.indexOf("http://")&&(K=PROXY_URL+"?url="+encodeURIComponent(K)),this.editorUi.editor.graph.addExtFont(D,
-K)));T=!0;for(var N=0;N<this.customFonts.length;N++)if(this.customFonts[N].name==D){T=!1;break}T&&(this.customFonts.push({name:D,url:K}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+function(){if(!m.isSelectionEmpty()){var u=m.cloneCells(m.getSelectionCells()),D=m.getBoundingBoxFromGeometry(u);u=m.moveCells(u,-D.x,-D.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+D.width+", "+D.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(u)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=m.getGraphBounds(),D=m.view.translate,B=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",u.x/B-D.x,u.y/B-
+D.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(D){if(0<D.length)try{var B=function(F){function H(T){if(null==M[T]){if(M[T]=!0,null!=J[T]){for(;0<J[T].length;){var O=J[T].pop();H(O)}delete J[T]}}else mxLog.debug(R+": Visited: "+T)}var R=F.parentNode.id,W=F.childNodes;F={};
+for(var J={},V=null,U={},X=0;X<W.length;X++){var t=W[X];if(null!=t.id&&0<t.id.length)if(null==F[t.id]){F[t.id]=t.id;var E=t.getAttribute("parent");null==E?null!=V?mxLog.debug(R+": Multiple roots: "+t.id):V=t.id:(null==J[E]&&(J[E]=[]),J[E].push(t.id))}else U[t.id]=t.id}W=Object.keys(U);0<W.length?(W=R+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var M={};null==V?mxLog.debug(R+": No root"):(H(V),Object.keys(M).length!=Object.keys(F).length&&
+(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",J)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var N=c.getHashValueForPages(G);mxLog.debug("Checksum: ",N)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var I=C.getElementsByTagName("root");for(D=0;D<I.length;D++)B(I[D]);
+mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(D){var B=c.getCurrentFile();if(0<D.length&&null!=B)try{var C=JSON.parse(D);B.patch([C],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,B){z=c.getPagesForXml(c.getFileData(!0));
+u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)}],["Diff",function(D,B){try{u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==z?(z=c.getPagesForXml(c.getFileData(!0)),u.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)):u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));
+c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var D=u.getShadowPages();null!=D&&(console.log("Checksum shadowPages",c.getHashValueForPages(D)),console.log("diff shadowPages/ownPages",
+c.diffPages(D,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,D)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,D)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,
+c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&
+(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var u=new mxImageExport,D=m.getGraphBounds(),B=m.view.scale,C=mxUtils.createXmlDocument(),
+G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/B),Math.floor((1-D.y)/B));C.scale(1/B);var N=0,I=C.save;C.save=function(){N++;I.apply(this,arguments)};var F=C.restore;C.restore=function(){N--;F.apply(this,arguments)};var H=u.drawShape;u.drawShape=function(R){mxLog.debug("entering shape",R,N);H.apply(this,arguments);mxLog.debug("leaving shape",R,N)};u.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",
+N)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),D)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,
+!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(u){m.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",
+new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,U){var X=new EmbedDialog(c,V+"\n"+U,null,null,function(){var t=window.open(),E=t.document;if(null!=E){"CSS1Compat"===document.compatMode&&
+E.writeln("<!DOCTYPE html>");E.writeln("<html>");E.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');E.writeln("<body>");E.writeln(V);var M=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;M&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!M){var T=t.document.createElement("div");T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));M=t.document.createElement("img");
+M.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");M.style.marginLeft="6px";T.appendChild(M);t.document.body.insertBefore(T,t.document.body.firstChild);window.setTimeout(function(){var O=document.createElement("script");O.type="text/javascript";O.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(O);T.parentNode.removeChild(T)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,
+!0);X.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(D){c.spinner.stop();null!=D?(D=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?D:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(D.container,450,240,!0,!0),D.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",
+new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(u,
+D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),
+null,"100%",Math.ceil(u.height/m.view.scale)+2,function(D,B,C,G,N,I,F,H,R){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var J=[];R&&J.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+H+';" src="'+c.createLink(D,B,C,G,N,I,W,null,J)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var u=
+document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));u.appendChild(D);mxEvent.addListener(D,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,C,G,N,I,F,H,R,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(J){c.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(B,C,G,N,I,F,J,null,V,!0));c.showDialog(J.container,450,240,!0,!0);J.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,D,B,C,G,N,I,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(R){c.spinner.stop();var W=[];H&&W.push("tags=%7B%7D");R=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,R,null,W));c.showDialog(R.container,450,240,!0,!0);R.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
+c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",
+function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){m.isEditing()&&m.stopEditing();var D="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");B.xml=D;u&&(B.exit=!0);D=JSON.stringify(B)}(window.opener||window.parent).postMessage(D,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==
+EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var D="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(D,
+"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,D){c.isExportToCanvas()?(this.addMenuItems(u,["exportPng"],D),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],D)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],D);this.addMenuItems(u,["exportSvg","-"],D);c.isOffline()||c.printPdfExport?this.addMenuItems(u,
+["exportPdf"],D):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],D);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],D);this.addMenuItems(u,["-","exportHtml","exportXml","exportUrl"],D);c.isOffline()||(u.addSeparator(D),this.addMenuItem(u,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,D){function B(N){N.pickFile(function(I){c.spinner.spin(document.body,
+mxResources.get("loading"))&&N.getFile(I,function(F){var H="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),H="image/svg+xml");C(F.getData(),H,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},N==c.drive)},!0)}var C=mxUtils.bind(this,function(N,I,F){var H=m.view,R=m.getGraphBounds(),W=m.snap(Math.ceil(Math.max(0,R.x/H.scale-
+H.translate.x)+4*m.gridSize)),J=m.snap(Math.ceil(Math.max(0,(R.y+R.height)/H.scale-H.translate.y)+4*m.gridSize));"data:image/"==N.substring(0,11)?c.loadImage(N,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){c.resizeImage(V,N,mxUtils.bind(this,function(t,E,M){t=U?Math.min(1,Math.min(c.maxImageSize/E,c.maxImageSize/M)):1;c.importFile(N,I,W,J,Math.round(E*t),Math.round(M*t),F,function(T){c.spinner.stop();m.setSelectionCells(T);m.scrollCellToVisible(m.getSelectionCell())})}),U)});
+N.length>c.resampleThreshold?c.confirmImageResize(function(t){U=t;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(N,I,W,J,0,0,F,function(V){c.spinner.stop();m.setSelectionCells(V);m.scrollCellToVisible(m.getSelectionCell())})}),G=mxUtils.bind(this,function(N){var I="text/xml";/\.png$/i.test(N)?I="image/png":/\.jpe?g$/i.test(N)?I="image/jpg":/\.gif$/i.test(N)?I="image/gif":/\.pdf$/i.test(N)&&(I="application/pdf");return I});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},D);null!=c.trello?u.addItem(mxResources.get("trello")+
+"...",null,function(){B(c.trello)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+
+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(I),function(H){C(H,F,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},D))}))).isEnabled=n;
+this.put("theme",new Menu(mxUtils.bind(this,function(u,D){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=B&&"atlas"!=B&&"dark"!=B&&"min"!=B&&"sketch"!=B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},
+D);"kennedy"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},D);"min"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},D);"atlas"==B&&u.addCheckmark(C,Editor.checkmarkImage);if("dark"==B||!mxClient.IS_IE&&!mxClient.IS_IE11)C=u.addItem(mxResources.get("dark"),
+null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},D),"dark"==B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},D);"sketch"==B&&u.addCheckmark(C,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();if(null!=u)if(u.constructor==
+LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){u.invalidFileHandle=null;u.fileHandle=B;u.title=C.name;u.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var D=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,D,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=u&&B!=u.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&u.rename(B,
+mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),u.constructor==DriveFile||u.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(D.container,340,96,!0,
+!0);D.init()}}));l.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};l.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(null!=u){var D=c.getCopyFilename(u);u.constructor==DriveFile?(D=new CreateDialog(c,D,mxUtils.bind(this,function(B,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),B):("download"==C&&(C=App.MODE_GOOGLE),null!=B&&0<B.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
+u.saveAs(B,mxUtils.bind(this,function(G){u.desc=G;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),mxUtils.bind(this,function(G){c.handleError(G)})):c.createFile(B,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(D.container,420,380,!0,!0),
+D.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),D)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var D=!1;if(u.getMode()==App.MODE_GOOGLE&&null!=u.desc.parents)for(var B=0;B<u.desc.parents.length;B++)if(u.desc.parents[B].isRoot){D=!0;break}c.pickFolder(u.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(C,mxUtils.bind(this,
+function(G){c.spinner.stop()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),null,!0,D)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,["publishLink"],D)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
+function(){try{var u=c.getCurrentFile();null!=u&&u.share()}catch(D){c.handleError(D)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,D){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(u,["liveImage","-"],D);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],D);navigator.standalone||c.isOffline()||this.addMenuItems(u,["embedIframe"],D);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,
+"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),D)})));c.addInsertItem=function(u,D,B,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var G=new ParseDialog(c,B,C);c.showDialog(G.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(c,B,C),c.showDialog(G.container,620,420,!0,!1);G.init()}),D,null,n())};
+var A=function(u,D,B,C){var G=new mxCell(u,new mxGeometry(0,0,D,B),C);G.vertex=!0;u=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([G],!0));G.geometry.x=u.x;G.geometry.y=u.y;m.getModel().beginUpdate();try{G=m.addCell(G),m.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(G);m.setSelectionCell(G);m.container.focus();m.editAfterInsert&&m.startEditing(G);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(G))},
+0);return G};c.actions.put("insertText",new Action(mxResources.get("text"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",120,60,
+"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=
+mxUtils.bind(this,function(u,D,B){for(var C=0;C<B.length;C++)"-"==B[C]?u.addSeparator(D):c.addInsertItem(u,D,mxResources.get(B[C])+"...",B[C])});this.put("insert",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),D);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],D);u.addSeparator(D);this.addSubmenu("insertLayout",u,D,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",u,D,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,D){c.addInsertMenuItems(u,D,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,D){c.addInsertMenuItems(u,D,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},D,null,n())})));
+this.put("openRecent",new Menu(function(u,D){var B=c.getRecent();if(null!=B){for(var C=0;C<B.length;C++)(function(G){var N=G.mode;N==App.MODE_GOOGLE?N="googleDrive":N==App.MODE_ONEDRIVE&&(N="oneDrive");u.addItem(G.title+" ("+mxResources.get(N)+")",null,function(){c.loadFile(G.id)},D)})(B[C]);u.addSeparator(D)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},D)}));this.put("openFrom",new Menu(function(u,D){null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},
+D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},
+D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},D):k&&"function"===
+typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,
+"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},D))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(u,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+
+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},D)})),this.put("openLibraryFrom",new Menu(function(u,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&c.spinner.spin(document.body,
+mxResources.get("loading"))){var G=C;c.editor.isCorsEnabledForUrl(C)||(G=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(G,function(N){if(200<=N.getStatus()&&299>=N.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,N.getText(),C))}catch(I){c.handleError(I,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
+c.showDialog(B.container,300,80,!0,!0);B.init()},D));"1"==urlParams.confLib&&(u.addSeparator(D),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},D))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+l=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var u=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));l=this.get("viewPanels");var K=l.funct;l.funct=
+function(u,D){K.apply(this,arguments);c.menus.addMenuItems(u,["tags"],D);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],D)};this.put("view",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],D);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(u,"scratchpad",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(u,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",u,D);this.addMenuItems(u,"- scrollbars tooltips ruler - grid guides".split(" "),D);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(u,"shadowVisible",D);this.addMenuItems(u,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),D);"1"!=urlParams.sketch&&this.addMenuItems(u,
+["-","fullscreen"],D)})));if(EditorUi.isElectronApp){var P="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();P=!P;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return P});var L="1"==urlParams.enableStoreBkp;l=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();L=!L});l.setToggleAction(!0);l.setSelectedCallback(function(){return L});c.actions.addAction("openDevTools",function(){c.openDevTools()})}this.put("extras",
+new Menu(mxUtils.bind(this,function(u,D){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",u,D),u.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",u,D),u.addSeparator(D));if("undefined"!==typeof MathJax){var B=this.addMenuItem(u,"mathematicalTypesetting",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp"],D);this.addMenuItems(u,
+["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],D),this.addMenuItems(u,["autosave"],D));u.addSeparator(D);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",D);this.addMenuItems(u,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(u,["diagramLanguage"]);u.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&
+this.addMenuItems(u,["showStartScreen"],D);this.addMenuItems(u,["configuration"],D);EditorUi.isElectronApp&&this.addMenuItems(u,["openDevTools"],D);u.addSeparator(D);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(c,function(N){console.log(arguments)},null,null,null,"user",function(N,I,F){var H=
+new Date;H.setDate(H.getDate()-7);c.drive.listFiles(null,H,F?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));N(W)},I)},function(N,I,F,H){c.drive.listFiles(N,null,H?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));I(W)},F)},function(N,I,F){c.drive.getFile(N.id,function(H){I(H.data)},F)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",D))})));
+this.put("file",new Menu(mxUtils.bind(this,function(u,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,D),this.addSubmenu("exportAs",u,D),this.addSubmenu("embed",u,D),"1"==urlParams.libraries&&(this.addMenuItems(u,["-"],D),this.addSubmenu("newLibrary",u,D),this.addSubmenu("openLibraryFrom",u,D)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D),this.addMenuItems(u,["-","pageSetup","print","-","rename"],D),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?
+"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],D):(this.addMenuItems(u,["save"],D),"1"==urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,["exit"],D);else{var B=this.editorUi.getCurrentFile();if(null!=B&&B.constructor==DriveFile){B.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],D);this.addMenuItems(u,["save","-","share"],D);var C=this.addMenuItem(u,"synchronize",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");u.addSeparator(D)}else this.addMenuItems(u,["new"],D);this.addSubmenu("openFrom",u,D);isLocalStorage&&this.addSubmenu("openRecent",u,D);null!=B&&B.constructor==DriveFile?this.addMenuItems(u,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(u.addSeparator(D),C=this.addMenuItem(u,"synchronize",D),(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(u,["-","save","saveAs","-"],D),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(u,["share","-"],D),this.addMenuItems(u,["rename"],D),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],D):(this.addMenuItems(u,["makeCopy"],D),null!=B&&B.constructor==OneDriveFile&&
+this.addMenuItems(u,["moveToFolder"],D)));u.addSeparator(D);this.addSubmenu("importFrom",u,D);this.addSubmenu("exportAs",u,D);u.addSeparator(D);this.addSubmenu("embed",u,D);this.addSubmenu("publish",u,D);u.addSeparator(D);this.addSubmenu("newLibrary",u,D);this.addSubmenu("openLibraryFrom",u,D);c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D);null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&
+null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(u,["-","properties"]));this.addMenuItems(u,["-","pageSetup"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],D);this.addMenuItems(u,["-","close"])}})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));
+this.extFonts=this.previousExtFonts;for(var D=u.extFonts,B=0;null!=D&&B<D.length;B++){var C=document.getElementById("extFont_"+D[B].name);null!=C&&C.parentNode.removeChild(C)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,D){for(var B=mxUtils.bind(this,function(J,V,U,X,t){var E=c.editor.graph;
+X=this.styleChange(u,X||J,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],null,D,function(){"1"!=urlParams["ext-fonts"]?E.setFont(J,V):(document.execCommand("fontname",!1,J),E.addExtFont(J,V));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values",
+"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),function(M){M.removeAttribute("face");M.style.fontFamily=null;"PRE"==M.nodeName&&E.replaceElement(M,"div")});"1"==urlParams["ext-fonts"]&&E.addExtFont(J,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),
+mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(M){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[J.toLowerCase()];for(var T=0;T<this.customFonts.length;T++)if(this.customFonts[T].name==J&&this.customFonts[T].url==V){this.customFonts.splice(T,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var O=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=O&&0<O.length)for(T=0;T<O.length;T++)if(O[T].name==J){O.splice(T,
+1);break}var Q=mxUtils.clone(this.customFonts);for(T=0;T<Q.length;T++)if(Q[T].name==J){Q.splice(T,1);break}T=new f(this.editorUi,O,Q);this.editorUi.editor.graph.model.execute(T)}this.editorUi.hideCurrentMenu();mxEvent.consume(M)})));Graph.addFont(J,V);X.firstChild.nextSibling.style.fontFamily=J;null!=t&&X.setAttribute("title",t)}),C={},G=0;G<this.defaultFonts.length;G++){var N=this.defaultFonts[G];"string"===typeof N?B(N):null!=N.fontFamily&&null!=N.fontUrl&&(C[encodeURIComponent(N.fontFamily)+"@"+
+encodeURIComponent(N.fontUrl)]=!0,B(N.fontFamily,N.fontUrl))}u.addSeparator(D);if("1"!=urlParams["ext-fonts"]){N=function(J){var V=encodeURIComponent(J.name)+(null==J.url?"":"@"+encodeURIComponent(J.url));if(!C[V]){for(var U=J.name,X=0;null!=F[U.toLowerCase()];)U=J.name+" ("+ ++X+")";null==I[V]&&(H.push({name:J.name,url:J.url,label:U,title:J.url}),F[U.toLowerCase()]=J,I[V]=J)}};var I={},F={},H=[];for(G=0;G<this.customFonts.length;G++)N(this.customFonts[G]);for(var R in Graph.recentCustomFonts)N(Graph.recentCustomFonts[R]);
+H.sort(function(J,V){return J.label<V.label?-1:J.label>V.label?1:0});if(0<H.length){for(G=0;G<H.length;G++)B(H[G].name,H[G].url,!0,H[G].label,H[G].url);u.addSeparator(D)}u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),D);u.addSeparator(D)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){N={};var W=!1;for(G=0;G<this.customFonts.length;G++)N[this.customFonts[G].name]=
+!0;for(G=0;G<R.length;G++)N[R[G].name]||(this.customFonts.push(R[G]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=0;G<this.customFonts.length;G++)R=this.customFonts[G].name,N=this.customFonts[G].url,B(R,N,!0),this.editorUi.editor.graph.addExtFont(R,N,!0);u.addSeparator(D);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var J=new f(this.editorUi,[],[]);c.editor.graph.model.execute(J)}),
+D);u.addSeparator(D)}}u.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var J=this.editorUi.editor.graph,V=J.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",X=null;if("1"!=urlParams["ext-fonts"]&&J.isEditing()){var t=J.getSelectedEditingElement();null!=t&&(t=mxUtils.getCurrentStyle(t),null!=t&&(V=Graph.stripQuotes(t.fontFamily),X=Graph.getFontUrl(V,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else t=J.getView().getState(J.getSelectionCell()),
+null!=t&&(V=t.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(t=t.style.fontSource,null!=t&&(t=decodeURIComponent(t),Graph.isGoogleFontUrl(t)?U="g":(U="w",X=t))):(U=t.style.FType||U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,t=null,null!=X&&(t=X.find(function(M){return M.name==V})),X=null!=t?t.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var E=null;
+document.activeElement==J.cellEditor.textarea&&(E=J.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(M,T,O){null!=E&&(J.cellEditor.restoreSelection(E),E=null);if(null!=M&&0<M.length)if("1"!=urlParams["ext-fonts"]&&J.isEditing())J.setFont(M,T);else{J.getModel().beginUpdate();try{J.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,M),J.setCellStyles("fontSource",null!=T?encodeURIComponent(T):null),J.setCellStyles("FType",
+null)):(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,M),"s"!=O&&(J.setCellStyles("FType",O),0==T.indexOf("http://")&&(T=PROXY_URL+"?url="+encodeURIComponent(T)),this.editorUi.editor.graph.addExtFont(M,T)));O=!0;for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==M){O=!1;break}O&&(this.customFonts.push({name:M,url:T}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{J.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,
+380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),D,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))}
@@ -13012,7 +13014,7 @@ EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.s
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(f){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return e};
EditorUi.prototype.createControlTab=function(b,e,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=e;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var m=new mxPopupMenu(mxUtils.bind(this,function(d,g){var k=mxUtils.bind(this,function(){for(var x=0;x<this.pages.length;x++)mxUtils.bind(this,function(y){var A=d.addItem(this.pages[y].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[y])}),g),B=this.pages[y].getId();A.setAttribute("title",this.pages[y].getName()+" ("+(y+1)+"/"+this.pages.length+")"+(null!=B?" ["+B+"]":""));this.pages[y]==this.currentPage&&d.addCheckmark(A,Editor.checkmarkImage)})(x)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
+var m=new mxPopupMenu(mxUtils.bind(this,function(d,g){var k=mxUtils.bind(this,function(){for(var x=0;x<this.pages.length;x++)mxUtils.bind(this,function(y){var z=d.addItem(this.pages[y].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[y])}),g),A=this.pages[y].getId();z.setAttribute("title",this.pages[y].getName()+" ("+(y+1)+"/"+this.pages.length+")"+(null!=A?" ["+A+"]":""));this.pages[y]==this.currentPage&&d.addCheckmark(z,Editor.checkmarkImage)})(x)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),g)});e||k();if(this.editor.graph.isEnabled()){e||(d.addSeparator(g),l());var p=this.currentPage;if(null!=p){d.addSeparator(g);var q=p.getName();d.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(p)}),g);d.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(p,p.getName())}),g);e||d.addSeparator(g);d.addItem(mxResources.get("duplicateIt",[q]),null,mxUtils.bind(this,function(){this.duplicatePage(p,
mxResources.get("copyOf",[p.getName()]))}),g)}}e&&(d.addSeparator(g),l(),d.addSeparator(g),k())}));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var n=mxEvent.getClientX(c),v=mxEvent.getClientY(c);m.popup(n,v,null,c);this.setCurrentMenu(m);mxEvent.consume(c)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
@@ -13030,35 +13032,35 @@ g=new EmbedDialog(this,this.getLinkForPage(b,n,g));this.showDialog(g.container,4
c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var m=f.ownerDocument.createElement("diagram");m.setAttribute("id",f.getAttribute("relatedPage"));m.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(m);m=f.getAttribute("viewState");null!=m&&(c.relatedPage.viewState=JSON.parse(m),f.removeAttribute("viewState"));f=f.cloneNode(!0);m=f.firstChild;if(null!=m)for(c.relatedPage.root=e.decodeCell(m,
!1),c=m.nextSibling,m.parentNode.removeChild(m),m=c;null!=m;){c=m.nextSibling;if(m.nodeType==mxConstants.NODETYPE_ELEMENT){var n=m.getAttribute("id");null==e.lookup(n)&&e.decodeCell(m)}m.parentNode.removeChild(m);m=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,m,n,v,d){m=null!=m?m:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=n.slice(),k=0;k<n.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[k]),"treeFolding","0")&&this.foldTreeCell(c,n[k]);n=g;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
function(c,m){this.model.beginUpdate();try{var n=[];this.traverse(m,!0,mxUtils.bind(this,function(d,g){var k=null!=g&&this.isTreeEdge(g);k&&n.push(g);d==m||null!=g&&!k||n.push(d);return(null==g||k)&&(d==m||!this.model.isCollapsed(d))}));this.model.setCollapsed(m,c);for(var v=0;v<n.length;v++)this.model.setVisible(n[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,m,n,v,d,g){return this.model.filterCells(this.getEdges(c,
-m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return A.isVertex(H)&&n(H)}function m(H){var S=
-!1;null!=H&&(S="1"==y.getCurrentCellStyle(H).treeMoving);return S}function n(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),S="tree"==(null!=S?S.style:y.getCellStyle(H)).containerType);return S}function v(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),y.view.getState(H),S=null!=(null!=S?S.style:y.getCellStyle(H)).childLayout);return S}function d(H){H=y.view.getState(H);if(null!=H){var S=y.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=y.view.getState(S[0]),null!=S&&(S=S.absolutePoints,
-null!=S&&0<S.length&&(S=S[S.length-1],null!=S)))){if(S.y==H.y&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(S.y==H.y+H.height&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(S.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,S){S=null!=S?S:!0;y.model.beginUpdate();try{var V=y.model.getParent(H),M=y.getIncomingTreeEdges(H),W=y.cloneCells([M[0],H]);y.model.setTerminal(W[0],y.model.getTerminal(M[0],
-!0),!0);var U=d(H),X=V.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=S?H.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=S?H.geometry.height+10:-W[1].geometry.height-10;y.view.currentRoot!=V&&(W[1].geometry.x-=X.x,W[1].geometry.y-=X.y);var u=y.view.getState(H),D=y.view.scale;if(null!=u){var K=mxRectangle.fromRectangle(u);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?K.x+=(S?H.geometry.width+10:-W[1].geometry.width-10)*D:K.y+=(S?
-H.geometry.height+10:-W[1].geometry.height-10)*D;var T=y.getOutgoingTreeEdges(y.model.getTerminal(M[0],!0));if(null!=T){for(var N=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=M=0;Q<T.length;Q++){var R=y.model.getTerminal(T[Q],!1);if(U==d(R)){var Y=y.view.getState(R);R!=H&&null!=Y&&(N&&S!=Y.getCenterX()<u.getCenterX()||!N&&S!=Y.getCenterY()<u.getCenterY())&&mxUtils.intersects(K,Y)&&(M=10+Math.max(M,(Math.min(K.x+K.width,Y.x+Y.width)-Math.max(K.x,Y.x))/D),X=10+Math.max(X,(Math.min(K.y+
-K.height,Y.y+Y.height)-Math.max(K.y,Y.y))/D))}}N?X=0:M=0;for(Q=0;Q<T.length;Q++)if(R=y.model.getTerminal(T[Q],!1),U==d(R)&&(Y=y.view.getState(R),R!=H&&null!=Y&&(N&&S!=Y.getCenterX()<u.getCenterX()||!N&&S!=Y.getCenterY()<u.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(ea,Z){var fa=null!=Z&&y.isTreeEdge(Z);fa&&ba.push(Z);(null==Z||fa)&&ba.push(ea);return null==Z||fa});y.moveCells(ba,(S?1:-1)*M,(S?1:-1)*X)}}}return y.addCells(W,V)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
-try{var S=d(H),V=y.getIncomingTreeEdges(H),M=y.cloneCells([V[0],H]);y.model.setTerminal(V[0],M[1],!1);y.model.setTerminal(M[0],M[1],!0);y.model.setTerminal(M[0],H,!1);var W=y.model.getParent(H),U=W.geometry,X=[];y.view.currentRoot!=W&&(M[1].geometry.x-=U.x,M[1].geometry.y-=U.y);y.traverse(H,!0,function(K,T){var N=null!=T&&y.isTreeEdge(T);N&&X.push(T);(null==T||N)&&X.push(K);return null==T||N});var u=H.geometry.width+40,D=H.geometry.height+40;S==mxConstants.DIRECTION_SOUTH?u=0:S==mxConstants.DIRECTION_NORTH?
-(u=0,D=-D):S==mxConstants.DIRECTION_WEST?(u=-u,D=0):S==mxConstants.DIRECTION_EAST&&(D=0);y.moveCells(X,u,D);return y.addCells(M,W)}finally{y.model.endUpdate()}}function l(H,S){y.model.beginUpdate();try{var V=y.model.getParent(H),M=y.getIncomingTreeEdges(H),W=d(H);0==M.length&&(M=[y.createEdge(V,null,"",null,null,y.createCurrentEdgeStyle())],W=S);var U=y.cloneCells([M[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
-if(null!=X)try{var u=JSON.parse(X),D;for(D in u)y.setCellStyles(D,u[D],[U[0]]),"edgeStyle"==D&&"elbowEdgeStyle"==u[D]&&y.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}M=y.getOutgoingTreeEdges(H);var K=V.geometry;S=[];y.view.currentRoot==V&&(K=new mxRectangle);for(X=0;X<M.length;X++){var T=y.model.getTerminal(M[X],!1);null!=T&&S.push(T)}var N=y.view.getBounds(S),Q=y.view.translate,R=y.view.scale;W==mxConstants.DIRECTION_SOUTH?
-(U[1].geometry.x=null==N?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(N.x+N.width)/R-Q.x-K.x+10,U[1].geometry.y+=U[1].geometry.height-K.y+40):W==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==N?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(N.x+N.width)/R-Q.x+-K.x+10,U[1].geometry.y-=U[1].geometry.height+K.y+40):(U[1].geometry.x=W==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+K.x+40):U[1].geometry.x+(U[1].geometry.width-K.x+40),U[1].geometry.y=null==N?H.geometry.y+
-(H.geometry.height-U[1].geometry.height)/2:(N.y+N.height)/R-Q.y+-K.y+10);return y.addCells(U,V)}finally{y.model.endUpdate()}}function p(H,S,V){H=y.getOutgoingTreeEdges(H);V=y.view.getState(V);var M=[];if(null!=V&&null!=H){for(var W=0;W<H.length;W++){var U=y.view.getState(y.model.getTerminal(H[W],!1));null!=U&&(!S&&Math.min(U.x+U.width,V.x+V.width)>=Math.max(U.x,V.x)||S&&Math.min(U.y+U.height,V.y+V.height)>=Math.max(U.y,V.y))&&M.push(U)}M.sort(function(X,u){return S?X.x+X.width-u.x-u.width:X.y+X.height-
-u.y-u.height})}return M}function q(H,S){var V=d(H),M=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==M&&V!=S?x.actions.get("selectParent").funct():V==S?(S=y.getOutgoingTreeEdges(H),null!=S&&0<S.length&&y.setSelectionCell(y.model.getTerminal(S[0],!1))):(V=y.getIncomingTreeEdges(H),null!=V&&0<V.length&&(M=p(y.model.getTerminal(V[0],!0),M,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(M,H),0<=H&&(H+=S==mxConstants.DIRECTION_NORTH||
-S==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=M.length-1&&y.setSelectionCell(M[H].cell)))))}var x=this,y=x.editor.graph,A=y.getModel(),B=x.menus.createPopupMenu;x.menus.createPopupMenu=function(H,S,V){B.apply(this,arguments);if(1==y.getSelectionCount()){S=y.getSelectionCell();var M=y.getOutgoingTreeEdges(S);H.addSeparator();0<M.length&&(c(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,V),this.addMenuItems(H,["selectDescendants"],null,V));c(y.getSelectionCell())?(H.addSeparator(),
-0<y.getIncomingTreeEdges(S).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,V)):0<y.model.getEdgeCount(S)&&this.addMenuItems(H,["selectConnections"],null,V)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var S=[],V=0;V<H.length;V++)S.push(y.model.getTerminal(H[V],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
-1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var S=[],V=0;V<H.length;V++)S.push(y.model.getTerminal(H[V],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,S){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=S&&mxEvent.isAltDown(S))y.setSelectionCells(y.model.getTreeEdges(H,null==S||!mxEvent.isShiftDown(S),null==S||!mxEvent.isControlDown(S)));else{var V=[];y.traverse(H,!0,function(M,W){var U=null!=W&&y.isTreeEdge(W);U&&V.push(W);null!=W&&!U||null!=S&&mxEvent.isShiftDown(S)||V.push(M);return null==W||U})}y.setSelectionCells(V)}},null,null,"Alt+Shift+D");
-var I=y.removeCells;y.removeCells=function(H,S){S=null!=S?S:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));S&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var V=[],M=0;M<H.length;M++){var W=H[M];A.isEdge(W)&&n(W)&&(V.push(W),W=A.getTerminal(W,!1));if(c(W)){var U=[];y.traverse(W,!0,function(X,u){var D=null!=u&&y.isTreeEdge(u);D&&U.push(u);(null==u||D)&&U.push(X);return null==u||D});0<U.length&&(V=V.concat(U),W=y.getIncomingTreeEdges(H[M]),H=H.concat(W))}else null!=W&&V.push(H[M])}H=
-V;return I.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,S,V){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,V))};var O=y.duplicateCells;y.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var V=H.slice(0),M=0;M<V.length;M++){var W=y.view.getState(V[M]);if(null!=W&&c(W.cell)){var U=y.getIncomingTreeEdges(W.cell);for(W=0;W<U.length;W++)mxUtils.remove(U[W],H)}}this.model.beginUpdate();try{var X=O.call(this,H,S);if(X.length==H.length)for(M=0;M<H.length;M++)if(c(H[M])){var u=
-y.getIncomingTreeEdges(X[M]);U=y.getIncomingTreeEdges(H[M]);if(0==u.length&&0<U.length){var D=this.cloneCell(U[0]);this.addEdge(D,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[M])}}}finally{this.model.endUpdate()}return X};var t=y.moveCells;y.moveCells=function(H,S,V,M,W,U,X){var u=null;this.model.beginUpdate();try{var D=W,K=this.getCurrentCellStyle(W);if(null!=H&&c(W)&&"1"==mxUtils.getValue(K,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
-!0)){W=y.model.getParent(H[T]);break}if(null!=D&&W!=D&&null!=this.view.getState(H[0])){var N=y.getIncomingTreeEdges(H[0]);if(0<N.length){var Q=y.view.getState(y.model.getTerminal(N[0],!0));if(null!=Q){var R=y.view.getState(D);null!=R&&(S=(R.getCenterX()-Q.getCenterX())/y.view.scale,V=(R.getCenterY()-Q.getCenterY())/y.view.scale)}}}}u=t.apply(this,arguments);if(null!=u&&null!=H&&u.length==H.length)for(T=0;T<u.length;T++)if(this.model.isEdge(u[T]))c(D)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[T],
-!0))&&this.model.setTerminal(u[T],D,!0);else if(c(H[T])&&(N=y.getIncomingTreeEdges(H[T]),0<N.length))if(!M)c(D)&&0>mxUtils.indexOf(H,this.model.getTerminal(N[0],!0))&&this.model.setTerminal(N[0],D,!0);else if(0==y.getIncomingTreeEdges(u[T]).length){K=D;if(null==K||K==y.model.getParent(H[T]))K=y.model.getTerminal(N[0],!0);M=this.cloneCell(N[0]);this.addEdge(M,y.getDefaultParent(),K,u[T])}}finally{this.model.endUpdate()}return u};if(null!=x.sidebar){var z=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
-function(H,S,V,M){var W=y.model,U=null;W.beginUpdate();try{if(U=z.apply(this,arguments),c(H))for(var X=0;X<U.length;X++)if(W.isEdge(U[X])&&null==W.getTerminal(U[X],!0)){W.setTerminal(U[X],H,!0);var u=y.getCellGeometry(U[X]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return U}}var L={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},C=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
-!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var S=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?S=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(S=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=S&&0<S.length)1==S.length&&y.model.isEdge(S[0])?y.setSelectionCell(y.model.getTerminal(S[0],!1)):y.setSelectionCell(S[S.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
-y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var V=L[H.keyCode];null!=V&&(V.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(M){x.handleError(M)}mxEvent.isConsumed(H)||C.apply(this,arguments)};var E=y.connectVertex;y.connectVertex=function(H,S,V,M,W,U,X){var u=y.getIncomingTreeEdges(H);if(c(H)){var D=d(H),K=D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return D==S||0==u.length?l(H,S):K==T?k(H):g(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};y.getSubtree=function(H){var S=
-[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(V,M){var W=null!=M&&y.isTreeEdge(M);W&&0>mxUtils.indexOf(S,M)&&S.push(M);(null==M||W)&&0>mxUtils.indexOf(S,V)&&S.push(V);return null==M||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return z.isVertex(H)&&n(H)}function m(H){var R=
+!1;null!=H&&(R="1"==y.getCurrentCellStyle(H).treeMoving);return R}function n(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),R="tree"==(null!=R?R.style:y.getCellStyle(H)).containerType);return R}function v(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),y.view.getState(H),R=null!=(null!=R?R.style:y.getCellStyle(H)).childLayout);return R}function d(H){H=y.view.getState(H);if(null!=H){var R=y.getIncomingTreeEdges(H.cell);if(0<R.length&&(R=y.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
+null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==H.y&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==H.y+H.height&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,R){R=null!=R?R:!0;y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=y.cloneCells([J[0],H]);y.model.setTerminal(V[0],y.model.getTerminal(J[0],
+!0),!0);var U=d(H),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?H.geometry.height+10:-V[1].geometry.height-10;y.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var t=y.view.getState(H),E=y.view.scale;if(null!=t){var M=mxRectangle.fromRectangle(t);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?M.x+=(R?H.geometry.width+10:-V[1].geometry.width-10)*E:M.y+=(R?
+H.geometry.height+10:-V[1].geometry.height-10)*E;var T=y.getOutgoingTreeEdges(y.model.getTerminal(J[0],!0));if(null!=T){for(var O=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=J=0;Q<T.length;Q++){var S=y.model.getTerminal(T[Q],!1);if(U==d(S)){var Y=y.view.getState(S);S!=H&&null!=Y&&(O&&R!=Y.getCenterX()<t.getCenterX()||!O&&R!=Y.getCenterY()<t.getCenterY())&&mxUtils.intersects(M,Y)&&(J=10+Math.max(J,(Math.min(M.x+M.width,Y.x+Y.width)-Math.max(M.x,Y.x))/E),X=10+Math.max(X,(Math.min(M.y+
+M.height,Y.y+Y.height)-Math.max(M.y,Y.y))/E))}}O?X=0:J=0;for(Q=0;Q<T.length;Q++)if(S=y.model.getTerminal(T[Q],!1),U==d(S)&&(Y=y.view.getState(S),S!=H&&null!=Y&&(O&&R!=Y.getCenterX()<t.getCenterX()||!O&&R!=Y.getCenterY()<t.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(ea,Z){var fa=null!=Z&&y.isTreeEdge(Z);fa&&ba.push(Z);(null==Z||fa)&&ba.push(ea);return null==Z||fa});y.moveCells(ba,(R?1:-1)*J,(R?1:-1)*X)}}}return y.addCells(V,W)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
+try{var R=d(H),W=y.getIncomingTreeEdges(H),J=y.cloneCells([W[0],H]);y.model.setTerminal(W[0],J[1],!1);y.model.setTerminal(J[0],J[1],!0);y.model.setTerminal(J[0],H,!1);var V=y.model.getParent(H),U=V.geometry,X=[];y.view.currentRoot!=V&&(J[1].geometry.x-=U.x,J[1].geometry.y-=U.y);y.traverse(H,!0,function(M,T){var O=null!=T&&y.isTreeEdge(T);O&&X.push(T);(null==T||O)&&X.push(M);return null==T||O});var t=H.geometry.width+40,E=H.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?t=0:R==mxConstants.DIRECTION_NORTH?
+(t=0,E=-E):R==mxConstants.DIRECTION_WEST?(t=-t,E=0):R==mxConstants.DIRECTION_EAST&&(E=0);y.moveCells(X,t,E);return y.addCells(J,V)}finally{y.model.endUpdate()}}function l(H,R){y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=d(H);0==J.length&&(J=[y.createEdge(W,null,"",null,null,y.createCurrentEdgeStyle())],V=R);var U=y.cloneCells([J[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
+if(null!=X)try{var t=JSON.parse(X),E;for(E in t)y.setCellStyles(E,t[E],[U[0]]),"edgeStyle"==E&&"elbowEdgeStyle"==t[E]&&y.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}J=y.getOutgoingTreeEdges(H);var M=W.geometry;R=[];y.view.currentRoot==W&&(M=new mxRectangle);for(X=0;X<J.length;X++){var T=y.model.getTerminal(J[X],!1);null!=T&&R.push(T)}var O=y.view.getBounds(R),Q=y.view.translate,S=y.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(U[1].geometry.x=null==O?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(O.x+O.width)/S-Q.x-M.x+10,U[1].geometry.y+=U[1].geometry.height-M.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==O?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(O.x+O.width)/S-Q.x+-M.x+10,U[1].geometry.y-=U[1].geometry.height+M.y+40):(U[1].geometry.x=V==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+M.x+40):U[1].geometry.x+(U[1].geometry.width-M.x+40),U[1].geometry.y=null==O?H.geometry.y+
+(H.geometry.height-U[1].geometry.height)/2:(O.y+O.height)/S-Q.y+-M.y+10);return y.addCells(U,W)}finally{y.model.endUpdate()}}function p(H,R,W){H=y.getOutgoingTreeEdges(H);W=y.view.getState(W);var J=[];if(null!=W&&null!=H){for(var V=0;V<H.length;V++){var U=y.view.getState(y.model.getTerminal(H[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&J.push(U)}J.sort(function(X,t){return R?X.x+X.width-t.x-t.width:X.y+X.height-
+t.y-t.height})}return J}function q(H,R){var W=d(H),J=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST)==J&&W!=R?x.actions.get("selectParent").funct():W==R?(R=y.getOutgoingTreeEdges(H),null!=R&&0<R.length&&y.setSelectionCell(y.model.getTerminal(R[0],!1))):(W=y.getIncomingTreeEdges(H),null!=W&&0<W.length&&(J=p(y.model.getTerminal(W[0],!0),J,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(J,H),0<=H&&(H+=R==mxConstants.DIRECTION_NORTH||
+R==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=J.length-1&&y.setSelectionCell(J[H].cell)))))}var x=this,y=x.editor.graph,z=y.getModel(),A=x.menus.createPopupMenu;x.menus.createPopupMenu=function(H,R,W){A.apply(this,arguments);if(1==y.getSelectionCount()){R=y.getSelectionCell();var J=y.getOutgoingTreeEdges(R);H.addSeparator();0<J.length&&(c(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,W),this.addMenuItems(H,["selectDescendants"],null,W));c(y.getSelectionCell())?(H.addSeparator(),
+0<y.getIncomingTreeEdges(R).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,W)):0<y.model.getEdgeCount(R)&&this.addMenuItems(H,["selectConnections"],null,W)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
+1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
+!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,R){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=R&&mxEvent.isAltDown(R))y.setSelectionCells(y.model.getTreeEdges(H,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var W=[];y.traverse(H,!0,function(J,V){var U=null!=V&&y.isTreeEdge(V);U&&W.push(V);null!=V&&!U||null!=R&&mxEvent.isShiftDown(R)||W.push(J);return null==V||U})}y.setSelectionCells(W)}},null,null,"Alt+Shift+D");
+var K=y.removeCells;y.removeCells=function(H,R){R=null!=R?R:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));R&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var W=[],J=0;J<H.length;J++){var V=H[J];z.isEdge(V)&&n(V)&&(W.push(V),V=z.getTerminal(V,!1));if(c(V)){var U=[];y.traverse(V,!0,function(X,t){var E=null!=t&&y.isTreeEdge(t);E&&U.push(t);(null==t||E)&&U.push(X);return null==t||E});0<U.length&&(W=W.concat(U),V=y.getIncomingTreeEdges(H[J]),H=H.concat(V))}else null!=V&&W.push(H[J])}H=
+W;return K.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,R,W){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var P=y.duplicateCells;y.duplicateCells=function(H,R){H=null!=H?H:this.getSelectionCells();for(var W=H.slice(0),J=0;J<W.length;J++){var V=y.view.getState(W[J]);if(null!=V&&c(V.cell)){var U=y.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],H)}}this.model.beginUpdate();try{var X=P.call(this,H,R);if(X.length==H.length)for(J=0;J<H.length;J++)if(c(H[J])){var t=
+y.getIncomingTreeEdges(X[J]);U=y.getIncomingTreeEdges(H[J]);if(0==t.length&&0<U.length){var E=this.cloneCell(U[0]);this.addEdge(E,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[J])}}}finally{this.model.endUpdate()}return X};var L=y.moveCells;y.moveCells=function(H,R,W,J,V,U,X){var t=null;this.model.beginUpdate();try{var E=V,M=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(M,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
+!0)){V=y.model.getParent(H[T]);break}if(null!=E&&V!=E&&null!=this.view.getState(H[0])){var O=y.getIncomingTreeEdges(H[0]);if(0<O.length){var Q=y.view.getState(y.model.getTerminal(O[0],!0));if(null!=Q){var S=y.view.getState(E);null!=S&&(R=(S.getCenterX()-Q.getCenterX())/y.view.scale,W=(S.getCenterY()-Q.getCenterY())/y.view.scale)}}}}t=L.apply(this,arguments);if(null!=t&&null!=H&&t.length==H.length)for(T=0;T<t.length;T++)if(this.model.isEdge(t[T]))c(E)&&0>mxUtils.indexOf(t,this.model.getTerminal(t[T],
+!0))&&this.model.setTerminal(t[T],E,!0);else if(c(H[T])&&(O=y.getIncomingTreeEdges(H[T]),0<O.length))if(!J)c(E)&&0>mxUtils.indexOf(H,this.model.getTerminal(O[0],!0))&&this.model.setTerminal(O[0],E,!0);else if(0==y.getIncomingTreeEdges(t[T]).length){M=E;if(null==M||M==y.model.getParent(H[T]))M=y.model.getTerminal(O[0],!0);J=this.cloneCell(O[0]);this.addEdge(J,y.getDefaultParent(),M,t[T])}}finally{this.model.endUpdate()}return t};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
+function(H,R,W,J){var V=y.model,U=null;V.beginUpdate();try{if(U=u.apply(this,arguments),c(H))for(var X=0;X<U.length;X++)if(V.isEdge(U[X])&&null==V.getTerminal(U[X],!0)){V.setTerminal(U[X],H,!0);var t=y.getCellGeometry(U[X]);t.points=null;null!=t.getTerminalPoint(!0)&&t.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var D={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},B=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
+!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var R=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?R=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(R=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=R&&0<R.length)1==R.length&&y.model.isEdge(R[0])?y.setSelectionCell(y.model.getTerminal(R[0],!1)):y.setSelectionCell(R[R.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
+y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var W=D[H.keyCode];null!=W&&(W.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(H))}}catch(J){x.handleError(J)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var C=y.connectVertex;y.connectVertex=function(H,R,W,J,V,U,X){var t=y.getIncomingTreeEdges(H);if(c(H)){var E=d(H),M=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,T=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return E==R||0==t.length?l(H,R):M==T?k(H):g(H,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};y.getSubtree=function(H){var R=
+[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(W,J){var V=null!=J&&y.isTreeEdge(J);V&&0>mxUtils.indexOf(R,J)&&R.push(J);(null==J||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==J||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(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(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,S){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
+this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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 I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){I.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
function(){var n=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");n.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);n.insert(g);n.insert(v);n.insert(d);return sb.createVertexTemplateFromCells([n],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var n=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
n.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
@@ -13076,27 +13078,27 @@ l.geometry.relative=!0;l.edge=!0;v.insertEdge(l,!0);k.insertEdge(l,!1);n.insert(
v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);return sb.createVertexTemplateFromCells([n,v],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree sub sections",function(){var n=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");n.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");g.geometry.setTerminalPoint(new mxPoint(110,-40),!0);g.geometry.relative=
!0;g.edge=!0;d.insertEdge(g,!1);return sb.createVertexTemplateFromCells([v,g,n,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(C,E){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.formatWindow){E="1"==urlParams.sketch?Math.max(10,C.diagramContainer.clientWidth-241):Math.max(10,C.diagramContainer.clientWidth-248);var P="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);C.formatWindow=new n(C,mxResources.get("format"),E,P,240,G,function(F){var H=
-C.createFormat(F);H.init();C.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});C.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.formatWindow.window.fit()}));C.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else C.formatWindow.window.setVisible(null!=E?E:!C.formatWindow.window.isVisible())}else{if(null==C.formatElt){C.formatElt=m();var J=C.createFormat(C.formatElt);J.init();C.formatElt.style.border="none";C.formatElt.style.width=
-"240px";C.formatElt.style.borderLeft="1px solid gray";C.formatElt.style.right="0px";C.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}))}G=C.diagramContainer.parentNode;null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),G.style.right="0px"):(G.parentNode.appendChild(C.formatElt),G.style.right=C.formatElt.style.width)}}function e(C,E){function G(H,S){var V=C.menus.get(H);H=F.addMenu(S,mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));H.style.cssText=
-"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";E.appendChild(H);return H}var P=document.createElement("div");P.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";P.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";
-J.innerHTML="+";P.appendChild(J);mxUtils.write(P,mxResources.get("moreShapes"));E.appendChild(P);mxEvent.addListener(P,"click",function(){C.actions.get("shapes").funct()});var F=new Menubar(C,E);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?P.style.bottom="0":null!=C.actions.get("newLibrary")?(P=document.createElement("div"),P.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-P.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),P.appendChild(J),E.appendChild(P),mxEvent.addListener(P,"click",C.actions.get("newLibrary").funct),P=document.createElement("div"),P.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",P.className="geTitle",J=document.createElement("span"),
-J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),P.appendChild(J),E.appendChild(P),mxEvent.addListener(P,"click",C.actions.get("openLibrary").funct)):(P=G("newLibrary",mxResources.get("newLibrary")),P.style.boxSizing="border-box",P.style.paddingRight="6px",P.style.paddingLeft="6px",P.style.height="32px",P.style.left="0",P=G("openLibraryFrom",mxResources.get("openLibraryFrom")),P.style.borderLeft="1px solid lightgray",P.style.boxSizing="border-box",P.style.paddingRight=
-"6px",P.style.paddingLeft="6px",P.style.height="32px",P.style.left="50%");E.appendChild(C.sidebar.container);E.style.overflow="hidden"}function f(C,E){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.sidebarWindow){E=Math.min(G.container.clientWidth-10,218);var P="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);C.sidebarWindow=new n(C,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-P)/2):56,E-6,P-6,function(J){e(C,J)});C.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.sidebarWindow.window.fit()}));C.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);C.sidebarWindow.window.setVisible(!0);C.getLocalData("sidebar",function(J){C.sidebar.showEntries(J,null,!0)});C.restoreLibraries()}else C.sidebarWindow.window.setVisible(null!=E?E:!C.sidebarWindow.window.isVisible())}else null==
-C.sidebarElt&&(C.sidebarElt=m(),e(C,C.sidebarElt),C.sidebarElt.style.border="none",C.sidebarElt.style.width="210px",C.sidebarElt.style.borderRight="1px solid gray"),G=C.diagramContainer.parentNode,null!=C.sidebarElt.parentNode?(C.sidebarElt.parentNode.removeChild(C.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(C.sidebarElt),G.style.left=C.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(C){}var m=function(){var C=document.createElement("div");C.className="geSidebarContainer";C.style.position="absolute";C.style.width="100%";C.style.height="100%";C.style.border="1px solid whiteSmoke";C.style.overflowX="hidden";C.style.overflowY="auto";return C},n=function(C,E,G,P,J,F,H){var S=m();H(S);this.window=new mxWindow(E,S,G,P,J,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(V,M){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;V=Math.max(0,Math.min(V,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));M=Math.max(0,Math.min(M,W-U.clientHeight-2));this.getX()==V&&this.getY()==M||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(V){null==V&&(V=window.event);return null!=V&&C.isSelectionAllowed(V)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
+EditorUi.initMinimalTheme=function(){function b(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){C="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),C,N,240,G,function(F){var H=
+B.createFormat(F);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=C?C:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var I=B.createFormat(B.formatElt);I.init();B.formatElt.style.border="none";B.formatElt.style.width=
+"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,C){function G(H,R){var W=B.menus.get(H);H=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));H.style.cssText=
+"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";C.appendChild(H);return H}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";
+I.innerHTML="+";N.appendChild(I);mxUtils.write(N,mxResources.get("moreShapes"));C.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var F=new Menubar(B,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+N.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",I=document.createElement("span"),
+I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("openLibrary").funct)):(N=G("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=G("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight=
+"6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");C.appendChild(B.sidebar.container);C.style.overflow="hidden"}function f(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){C=Math.min(G.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new n(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-N)/2):56,C-6,N-6,function(I){e(B,I)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);B.getLocalData("sidebar",function(I){B.sidebar.showEntries(I,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=C?C:!B.sidebarWindow.window.isVisible())}else null==
+B.sidebarElt&&(B.sidebarElt=m(),e(B,B.sidebarElt),B.sidebarElt.style.border="none",B.sidebarElt.style.width="210px",B.sidebarElt.style.borderRight="1px solid gray"),G=B.diagramContainer.parentNode,null!=B.sidebarElt.parentNode?(B.sidebarElt.parentNode.removeChild(B.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(B.sidebarElt),G.style.left=B.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,C,G,N,I,F,H){var R=m();H(R);this.window=new mxWindow(C,R,G,N,I,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(W,J){var V=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;W=Math.max(0,Math.min(W,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));J=Math.max(0,Math.min(J,V-U.clientHeight-2));this.getX()==W&&this.getY()==J||mxWindow.prototype.setLocation.apply(this,
+arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&B.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(C){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(C);null==urlParams.dark&&(mxSettings.settings.darkMode=C,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");v.setAttribute("charset","UTF-8");v.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(C){if(Editor.darkMode!=C){var E=this.editor.graph;Editor.darkMode=C;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";E.view.gridColor=Editor.isDarkMode()?E.view.defaultDarkGridColor:E.view.defaultGridColor;E.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";E.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";E.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";E.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";E.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";E.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";E.loadStylesheet();null!=this.actions.layersWindow&&(C=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,C&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=E.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=E.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=E.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-E.shapeForegroundColor;Graph.prototype.defaultThemeName=E.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+EditorUi.prototype.setDarkMode=function(B){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(B);null==urlParams.dark&&(mxSettings.settings.darkMode=B,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");v.setAttribute("charset","UTF-8");v.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(B){if(Editor.darkMode!=B){var C=this.editor.graph;Editor.darkMode=B;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";C.view.gridColor=Editor.isDarkMode()?C.view.defaultDarkGridColor:C.view.defaultGridColor;C.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";C.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";C.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";C.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";C.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.loadStylesheet();null!=this.actions.layersWindow&&(B=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,B&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=C.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=C.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=C.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+C.shapeForegroundColor;Graph.prototype.defaultThemeName=C.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==v.parentNode&&document.getElementsByTagName("head")[0].appendChild(v):null!=v.parentNode&&v.parentNode.removeChild(v)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -13106,155 +13108,155 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var g=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,
-E){null!=E.shortcut&&900>c&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",E.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";
-C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";C.style.cssFloat="right";C.setAttribute("title",mxResources.get("changeUser"));if("none"!=C.style.display){C.style.display="inline-block";var E=this.getCurrentFile();if(null!=E&&E.isRealtimeEnabled()&&E.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var P=E.getRealtimeError();E=E.getRealtimeState();var J=mxResources.get("realtimeCollaboration");1==E?(G.src=Editor.syncImage,J+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,J=null!=P&&null!=P.message?J+(" ("+P.message+")"):J+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",J);C.style.paddingRight="4px";C.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var C=
-this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var C=document.createElement("div");C.style.display="inline-block";C.style.position="relative";C.style.marginTop="6px";C.style.marginRight="4px";var E=document.createElement("a");E.className="geMenuItem gePrimaryBtn";E.style.marginLeft="8px";E.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(E,G);E.setAttribute("title",G);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));C.appendChild(E)}}else mxUtils.write(E,mxResources.get("save")),E.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),C.appendChild(E),"1"==urlParams.saveAndExit&&(E=document.createElement("a"),
-mxUtils.write(E,mxResources.get("saveAndExit")),E.setAttribute("title",mxResources.get("saveAndExit")),E.className="geMenuItem",E.style.marginLeft="6px",E.style.padding="6px",mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),C.appendChild(E));"1"!=urlParams.noExitBtn&&(E=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(E,G),E.setAttribute("title",G),E.className="geMenuItem",
-E.style.marginLeft="6px",E.style.padding="6px",mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),C.appendChild(E));this.buttonContainer.appendChild(C);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var x=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(C,E){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,C)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=C.offsetTop-E.height/2+16;return G}var P=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);P.x+=G.x-16;P.y+=G.y;return P};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(C,E,G){var P=this.editorUi.editor.graph;C.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?P.isEnabled()&&(C.addSeparator(),1==P.getSelectionCount()&&this.addMenuItems(C,["-","lockUnlock"],null,G)):1==P.getSelectionCount()?
-(P.isCellFoldable(P.getSelectionCell())&&this.addMenuItems(C,P.isCellCollapsed(E)?["expand"]:["collapse"],null,G),this.addMenuItems(C,["collapsible","-","lockUnlock","enterGroup"],null,G),C.addSeparator(),this.addSubmenu("layout",C)):P.isSelectionEmpty()&&P.isEnabled()?(C.addSeparator(),this.addMenuItems(C,["editData"],null,G),C.addSeparator(),this.addSubmenu("layout",C),this.addSubmenu("insert",C),this.addMenuItems(C,["-","exitGroup"],null,G)):P.isEnabled()&&this.addMenuItems(C,["-","lockUnlock"],
-null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(C,E,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(C,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(C){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=C?C:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(B,
+C){null!=C.shortcut&&900>c&&!mxClient.IS_IOS?B.firstChild.nextSibling.setAttribute("title",C.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var B=this.userElement;B.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+B.style.display;B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.userImage+")";B.style.backgroundPosition="center center";
+B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";B.style.cssFloat="right";B.setAttribute("title",mxResources.get("changeUser"));if("none"!=B.style.display){B.style.display="inline-block";var C=this.getCurrentFile();if(null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
+"12px";var N=C.getRealtimeError();C=C.getRealtimeState();var I=mxResources.get("realtimeCollaboration");1==C?(G.src=Editor.syncImage,I+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,I=null!=N&&null!=N.message?I+(" ("+N.message+")"):I+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",I);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=
+this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var B=document.createElement("div");B.style.display="inline-block";B.style.position="relative";B.style.marginTop="6px";B.style.marginRight="4px";var C=document.createElement("a");C.className="geMenuItem gePrimaryBtn";C.style.marginLeft="8px";C.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(C,G);C.setAttribute("title",G);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));B.appendChild(C)}}else mxUtils.write(C,mxResources.get("save")),C.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),B.appendChild(C),"1"==urlParams.saveAndExit&&(C=document.createElement("a"),
+mxUtils.write(C,mxResources.get("saveAndExit")),C.setAttribute("title",mxResources.get("saveAndExit")),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),B.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,G),C.setAttribute("title",G),C.className="geMenuItem",
+C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),B.appendChild(C));this.buttonContainer.appendChild(B);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var x=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,C){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-C.height/2+16;return G}var N=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(B,C,G){var N=this.editorUi.editor.graph;B.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(B.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==N.getSelectionCount()?
+(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(B,N.isCellCollapsed(C)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],
+null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,C,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);B.apply(this,arguments)};var I=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(C){I.apply(this,arguments);if(C){var E=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=E&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=E||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments);var E=this.editorUi,G=E.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var P=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,F){E.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:J?
-"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};E.addListener("sketchModeChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});C.appendChild(P)}return C};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var C=this.editorUi,E=C.editor.graph;C.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";C.actions.get("createShape").label=mxResources.get("shape")+"...";C.actions.get("outline").label=
-mxResources.get("outline")+"...";C.actions.get("layers").label=mxResources.get("layers")+"...";C.actions.get("tags").label=mxResources.get("tags")+"...";C.actions.get("forkme").visible="1"!=urlParams.sketch;C.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;C.actions.get("comments").label=mxResources.get("comments")+"...";var G=C.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(M){C.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
-G=C.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(M){C.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=C.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(M){C.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});C.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){E.popupMenuHandler.hideMenu();
-C.showImportCsvDialog()}));C.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var M=new ParseDialog(C,"Insert from Text");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var M=new ParseDialog(C,"Insert from Text","formatSql");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(C)},
-null,null,Editor.ctrlKey+"+Shift+K"));C.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(C)})).shortcut=C.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!C.isOffline()&&C.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var M=new ParseDialog(C,mxResources.get("plantUml")+"...","plantUml");C.showDialog(M.container,620,420,!0,!1);M.init()}));C.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var M=
-new ParseDialog(C,mxResources.get("mermaid")+"...","mermaid");C.showDialog(M.container,620,420,!0,!1);M.init()}));var P=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(M,W){var U=this.editorUi.editor.graph,X=U.getSelectionCell();P.call(this,M,X,null,W);this.addMenuItems(M,["editTooltip"],W);U.model.isVertex(X)&&this.addMenuItems(M,["editGeometry"],W);this.addMenuItems(M,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(M,W,U,X){M.addSeparator();this.addSubmenu("editCell",
-M,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();C.menus.addMenuItems(M,["new"],W);C.menus.addSubmenu("openFrom",M,W);isLocalStorage&&this.addSubmenu("openRecent",M,W);M.addSeparator(W);null!=U&&U.constructor==DriveFile?C.menus.addMenuItems(M,["save","rename","makeCopy","moveToFolder"],W):(C.menus.addMenuItems(M,["save","saveAs","-","rename"],W),C.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(M,
-["upload"],W):C.menus.addMenuItems(M,["makeCopy"],W));M.addSeparator(W);null!=U&&(U.isRevisionHistorySupported()&&C.menus.addMenuItems(M,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||C.menus.addMenuItems(M,["synchronize"],W));C.menus.addMenuItems(M,["autosave"],W);if(null!=U&&(M.addSeparator(W),U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(M,["showRemoteCursors","shareCursor"],W),U.constructor==DriveFile&&C.menus.addMenuItems(M,
-["share"],W),null!=C.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():C.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(M,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();C.menus.addSubmenu("extras",M,W,mxResources.get("preferences"));M.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)C.menus.addMenuItems(M,
-"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||C.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&C.menus.addMenuItems(M,["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||C.mode==App.MODE_ATLAS)C.menus.addMenuItems(M,["saveAndExit"],W),null!=U&&U.isRevisionHistorySupported()&&C.menus.addMenuItems(M,["revisionHistory"],W);M.addSeparator(W)}else C.mode==App.MODE_ATLAS?C.menus.addMenuItems(M,
-["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(C.menus.addMenuItems(M,["new"],W),C.menus.addSubmenu("openFrom",M,W),isLocalStorage&&this.addSubmenu("openRecent",M,W),M.addSeparator(W),null!=U&&(U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(M,["showRemoteCursors","shareCursor"],W),U.constructor==DriveFile&&C.menus.addMenuItems(M,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||C.menus.addMenuItems(M,["synchronize"],
-W)),M.addSeparator(W),C.menus.addSubmenu("save",M,W)):C.menus.addSubmenu("file",M,W));C.menus.addSubmenu("exportAs",M,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?C.menus.addMenuItems(M,["import"],W):"1"!=urlParams.noFileMenu&&C.menus.addSubmenu("importFrom",M,W);M.addSeparator(W);"1"!=urlParams.sketch&&C.menus.addMenuItems(M,["outline"],W);C.commentsSupported()&&C.menus.addMenuItems(M,["comments"],W);C.menus.addMenuItems(M,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||
-mxClient.IS_IOS&&navigator.standalone||C.menus.addMenuItems(M,["print"],W);"1"!=urlParams.sketch&&null!=U&&null!=C.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():C.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(M,["-","properties"]));M.addSeparator(W);C.menus.addSubmenu("help",M,W);"1"==urlParams.embed||C.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||C.mode==App.MODE_ATLAS)&&C.menus.addMenuItems(M,["-","exit"],W):"1"!=urlParams.noFileMenu&&
-C.menus.addMenuItems(M,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(M,W){var U=C.getCurrentFile();null!=U&&U.constructor==DriveFile?C.menus.addMenuItems(M,["save","makeCopy","-","rename","moveToFolder"],W):(C.menus.addMenuItems(M,["save","saveAs","-","rename"],W),C.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(M,["upload"],W):C.menus.addMenuItems(M,["makeCopy"],W));C.menus.addMenuItems(M,["-","autosave"],W);null!=U&&U.isRevisionHistorySupported()&&
-C.menus.addMenuItems(M,["-","revisionHistory"],W)})));var J=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(M,W){J.funct(M,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||C.menus.addMenuItems(M,["publishLink"],W);C.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(M.addSeparator(W),C.menus.addSubmenu("embed",M,W))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(M,W){C.menus.addInsertTableCellItem(M,W)})));if("1"==urlParams.sketch){var H=
-this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(M,W){H.funct(M,W);this.addMenuItems(M,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(M,W){null!=F&&C.menus.addSubmenu("language",M,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&C.mode!=App.MODE_ATLAS&&C.menus.addSubmenu("theme",M,W);C.menus.addSubmenu("units",M,W);M.addSeparator(W);"1"!=urlParams.sketch&&C.menus.addMenuItems(M,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
-W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&C.mode!=App.MODE_ATLAS&&C.menus.addMenuItems(M,["-","showStartScreen","search","scratchpad"],W);M.addSeparator(W);"1"==urlParams.sketch?C.menus.addMenuItems(M,"configuration - copyConnect collapseExpand tooltips -".split(" "),W):(C.mode!=App.MODE_ATLAS&&C.menus.addMenuItem(M,"configuration",W),!C.isOfflineApp()&&isLocalStorage&&C.mode!=App.MODE_ATLAS&&C.menus.addMenuItem(M,"plugins",
-W),M.addSeparator(W),C.mode!=App.MODE_ATLAS&&this.addMenuItems(M,["fullscreen"],W));("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(M,["toggleDarkMode"],W);M.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(M,W){C.menus.addMenuItems(M,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var M=this.get("insert"),W=M.funct;M.funct=function(U,
-X){"1"==urlParams.sketch?(C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(U,["insertTemplate"],X),C.menus.addMenuItems(U,["insertImage","insertLink","-"],X),C.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),C.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(W.apply(this,arguments),C.menus.addSubmenu("table",U,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),V=function(M,W,U,X){M.addItem(U,
-null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(C,U,X);C.showDialog(u.container,620,420,!0,!1);u.init()}),W)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(M,W){for(var U=0;U<S.length;U++)"-"==S[U]?M.addSeparator(W):V(M,W,mxResources.get(S[U])+"...",S[U])})))};EditorUi.prototype.installFormatToolbar=function(C){var E=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-E.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(P,J){0<E.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+E.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width=
-"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(da,
-ca,la){var ia=F.menus.get(da),ma=M.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),V);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(da));F.menus.menuCreated(ia,ma,"geMenuItem");null!=la?
-(ma.style.backgroundImage="url("+la+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function E(da,ca,la,ia,ma,ra){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":
-"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.height="30px";pa.style.padding="6px";pa.style.position="relative";pa.style.verticalAlign="top";pa.style.top="0px";"1"==urlParams.sketch&&(pa.style.borderStyle="none",pa.style.boxShadow="none",pa.style.padding="6px",pa.style.margin="0px");null!=F.statusContainer?S.insertBefore(pa,F.statusContainer):S.appendChild(pa);null!=ra?(pa.style.backgroundImage="url("+ra+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat=
+null);A.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){K.apply(this,arguments);if(B){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var P=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=P.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(I,F){C.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:I?
+"1":null},G.getVerticesAndEdges())},{install:function(I){this.listener=function(){I(Editor.sketchMode)};C.addListener("sketchModeChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});B.appendChild(N)}return B};var L=Menus.prototype.init;Menus.prototype.init=function(){L.apply(this,arguments);var B=this.editorUi,C=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
+mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("forkme").visible="1"!=urlParams.sketch;B.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(J){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
+G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(J){B.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(J){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){C.popupMenuHandler.hideMenu();
+B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var J=new ParseDialog(B,"Insert from Text");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var J=new ParseDialog(B,"Insert from Text","formatSql");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(B)},
+null,null,Editor.ctrlKey+"+Shift+K"));B.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(B)})).shortcut=B.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var J=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var J=
+new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(J.container,620,420,!0,!1);J.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(J,V){var U=this.editorUi.editor.graph,X=U.getSelectionCell();N.call(this,J,X,null,V);this.addMenuItems(J,["editTooltip"],V);U.model.isVertex(X)&&this.addMenuItems(J,["editGeometry"],V);this.addMenuItems(J,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(J,V,U,X){J.addSeparator();this.addSubmenu("editCell",
+J,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();B.menus.addMenuItems(J,["new"],V);B.menus.addSubmenu("openFrom",J,V);isLocalStorage&&this.addSubmenu("openRecent",J,V);J.addSeparator(V);null!=U&&U.constructor==DriveFile?B.menus.addMenuItems(J,["save","rename","makeCopy","moveToFolder"],V):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],V),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(J,
+["upload"],V):B.menus.addMenuItems(J,["makeCopy"],V));J.addSeparator(V);null!=U&&(U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||B.menus.addMenuItems(J,["synchronize"],V));B.menus.addMenuItems(J,["autosave"],V);if(null!=U&&(J.addSeparator(V),U.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],V),null!=B.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():
+B.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(J,["-","properties"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();B.menus.addSubmenu("extras",J,V,mxResources.get("preferences"));J.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)B.menus.addMenuItems(J,"new open - synchronize - save saveAs -".split(" "),V);else if("1"==urlParams.embed||B.mode==
+App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&B.menus.addMenuItems(J,["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||B.mode==App.MODE_ATLAS)B.menus.addMenuItems(J,["saveAndExit"],V),null!=U&&U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],V);J.addSeparator(V)}else B.mode==App.MODE_ATLAS?B.menus.addMenuItems(J,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(B.menus.addMenuItems(J,
+["new"],V),B.menus.addSubmenu("openFrom",J,V),isLocalStorage&&this.addSubmenu("openRecent",J,V),J.addSeparator(V),null!=U&&(U.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||B.menus.addMenuItems(J,["synchronize"],V)),J.addSeparator(V),B.menus.addSubmenu("save",J,V)):B.menus.addSubmenu("file",J,V));B.menus.addSubmenu("exportAs",J,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?B.menus.addMenuItems(J,["import"],V):
+"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",J,V);J.addSeparator(V);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,["outline"],V);B.commentsSupported()&&B.menus.addMenuItems(J,["comments"],V);B.menus.addMenuItems(J,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(J,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():
+B.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(J,["-","properties"]));J.addSeparator(V);B.menus.addSubmenu("help",J,V);"1"==urlParams.embed||B.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(J,["-","exit"],V):"1"!=urlParams.noFileMenu&&B.menus.addMenuItems(J,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();null!=U&&U.constructor==DriveFile?B.menus.addMenuItems(J,["save",
+"makeCopy","-","rename","moveToFolder"],V):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],V),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(J,["upload"],V):B.menus.addMenuItems(J,["makeCopy"],V));B.menus.addMenuItems(J,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["-","revisionHistory"],V)})));var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(J,V){I.funct(J,V);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||B.menus.addMenuItems(J,["publishLink"],V);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(J.addSeparator(V),B.menus.addSubmenu("embed",J,V))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(J,V){B.menus.addInsertTableCellItem(J,V)})));if("1"==urlParams.sketch){var H=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(J,V){H.funct(J,V);this.addMenuItems(J,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,
+function(J,V){null!=F&&B.menus.addSubmenu("language",J,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",J,V);B.menus.addSubmenu("units",J,V);J.addSeparator(V);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItems(J,["-",
+"showStartScreen","search","scratchpad"],V);J.addSeparator(V);"1"==urlParams.sketch?B.menus.addMenuItems(J,"configuration - copyConnect collapseExpand tooltips -".split(" "),V):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"configuration",V),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"plugins",V));var U=B.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(J,["-","showRemoteCursors","shareCursor","-"],V);J.addSeparator(V);
+"1"!=urlParams.sketch&&B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],V);J.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,V){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var J=this.get("insert"),V=J.funct;J.funct=function(U,
+X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(U,["insertTemplate"],X),B.menus.addMenuItems(U,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(V.apply(this,arguments),B.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(J,V,U,X){J.addItem(U,
+null,mxUtils.bind(this,function(){var t=new CreateGraphDialog(B,U,X);B.showDialog(t.container,620,420,!0,!1);t.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(J,V){for(var U=0;U<R.length;U++)"-"==R[U]?J.addSeparator(V):W(J,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(B){var C=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+C.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,I){0<C.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+C.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var u=!1;EditorUi.prototype.initFormatWindow=function(){if(!u&&null!=this.formatWindow){u=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width=
+"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(da,
+ca,la){var ia=F.menus.get(da),ma=J.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),W);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(da));F.menus.menuCreated(ia,ma,"geMenuItem");null!=la?
+(ma.style.backgroundImage="url("+la+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function C(da,ca,la,ia,ma,ra){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.height="30px";pa.style.padding="6px";pa.style.position="relative";pa.style.verticalAlign="top";pa.style.top="0px";"1"==urlParams.sketch&&(pa.style.borderStyle="none",pa.style.boxShadow="none",pa.style.padding="6px",pa.style.margin="0px");null!=F.statusContainer?R.insertBefore(pa,F.statusContainer):R.appendChild(pa);null!=ra?(pa.style.backgroundImage="url("+ra+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat=
"no-repeat",pa.style.backgroundSize="24px 24px",pa.style.width="34px"):mxUtils.write(pa,da);mxEvent.addListener(pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(pa,"click",function(na){"disabled"!=pa.getAttribute("disabled")&&ca(na);mxEvent.consume(na)});null==la&&(pa.style.marginRight="4px");null!=ia&&pa.setAttribute("title",ia);null!=ma&&(da=function(){ma.isEnabled()?(pa.removeAttribute("disabled"),pa.style.cursor="pointer"):
(pa.setAttribute("disabled","disabled"),pa.style.cursor="default")},ma.addListener("stateChanged",da),H.addListener("enabledChanged",da),da());return pa}function G(da,ca,la){la=document.createElement("div");la.className="geMenuItem";la.style.display="inline-block";la.style.verticalAlign="top";la.style.marginRight="6px";la.style.padding="0 4px 0 4px";la.style.height="30px";la.style.position="relative";la.style.top="0px";"1"==urlParams.sketch&&(la.style.boxShadow="none");for(var ia=0;ia<da.length;ia++)null!=
-da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding="10px 8px",da[ia].style.width="30px"),da[ia].style.margin="0px",da[ia].style.boxShadow="none",la.appendChild(da[ia]));null!=ca&&mxUtils.setOpacity(la,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?S.insertBefore(la,F.statusContainer):S.appendChild(la);return la}function P(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>N.offsetTop-N.offsetHeight/2?"70px":"10px");else{for(var da=S.firstChild;null!=da;){var ca=da.nextSibling;
-"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}V=S.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var la=null;da||(la=C("diagram"));ca=da?C("diagram",null,Editor.drawLogoImage):null;null!=ca&&(la=ca);G([la,E(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),da?Editor.shapesImage:null),E(mxResources.get("format"),
-F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=C("insert",!0,da?K:null);G([ca,E(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(G([Na,Ga],60),520<=c&&G([oa,640<=c?E("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):
-null,640<=c?E("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=la&&(mxEvent.disableContextMenu(la),mxEvent.addGestureListeners(la,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&F.appIconClicked(ia)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?
-(null==ya&&(ca=M.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",S.appendChild(ca),
-ya=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}L.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,
+da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding="10px 8px",da[ia].style.width="30px"),da[ia].style.margin="0px",da[ia].style.boxShadow="none",la.appendChild(da[ia]));null!=ca&&mxUtils.setOpacity(la,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(la,F.statusContainer):R.appendChild(la);return la}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px");else{for(var da=R.firstChild;null!=da;){var ca=da.nextSibling;
+"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}W=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var la=null;da||(la=B("diagram"));ca=da?B("diagram",null,Editor.drawLogoImage):null;null!=ca&&(la=ca);G([la,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),da?Editor.shapesImage:null),C(mxResources.get("format"),
+F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=B("insert",!0,da?M:null);G([ca,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(G([Na,Ga],60),520<=c&&G([oa,640<=c?C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):
+null,640<=c?C("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=la&&(mxEvent.disableContextMenu(la),mxEvent.addGestureListeners(la,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&F.appIconClicked(ia)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?
+(null==ya&&(ca=J.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ca),
+ya=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}D.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+I.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,
!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),la=F.embedViewport.x+F.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),ra=F.embedViewport.y+
F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(da,la-ca))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ia,ra-ma))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var S=document.createElement("div");S.className="geMenubarContainer";var V=null,M=new Menubar(F,
-S);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var W=F.hideCurrentMenu;F.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var da=F.getCurrentFile();
-if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);S.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else S.removeAttribute("title")};F.setStatusText(F.editor.getStatus());S.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-S.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";J=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(u);J.appendChild(F.titlebar)}var D=
-F.menus.get("viewZoom"),K="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,N="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null;u=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",u);F.addListener("sketchModeChanged",u);var R=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left=
-"10px",Q.style.top="10px",N.style.left="10px",N.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
+(this.initFormatWindow(),I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>I)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,J=new Menubar(F,
+R);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var da=F.getCurrentFile();
+if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);R.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var t=document.createElement("div");t.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(t);I.appendChild(F.titlebar)}var E=
+F.menus.get("viewZoom"),M="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null;t=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",t);F.addListener("sketchModeChanged",t);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left=
+"10px",Q.style.top="10px",O.style.left="10px",O.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
"";else{var da=F.diagramContainer.getAttribute("data-bounds");if(null!=da){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var ca=H.getGraphBounds();da=da.split(" ");F.diagramContainer.style.top=da[0];F.diagramContainer.style.left=da[1];F.diagramContainer.style.width=ca.width+50+"px";F.diagramContainer.style.height=ca.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";N.style.display="";N.style.left=F.diagramContainer.offsetLeft-N.offsetWidth-4+"px";N.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
+rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";O.style.display="";O.style.left=F.diagramContainer.offsetLeft-O.offsetWidth-4+"px";O.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
-F.bottomResizer.style.visibility;S.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});u=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+
-da.width+4,da.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",u);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",u);F.addListener("editInlineStop",mxUtils.bind(this,function(da){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";N.style.display="none"}));if(null!=
-F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=H.freehand){var ea=H.freehand.createStyle;H.freehand.createStyle=function(da){return ea.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){N.className="geToolbarContainer";T.className="geToolbarContainer";Q.className="geToolbarContainer";S.className="geToolbarContainer";F.picker=N;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(S,"mouseenter",function(){F.statusContainer.style.display=
-"inline-block"}),mxEvent.addListener(S,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var fa=mxUtils.bind(this,function(da){null!=F.notificationBtn&&(null!=da?F.notificationBtn.setAttribute("title",da):F.notificationBtn.removeAttribute("title"))});S.style.visibility=20>S.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed)if(F.statusContainer.style.display="inline-block",Z=!0,
-1==F.statusContainer.children.length&&""==F.editor.getStatus())S.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var da=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();fa(da);var ca=F.getCurrentFile();
-ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",fa(null),Z=!0;S.style.visibility=20>S.clientWidth&&!Z?"hidden":""}}));ka=C("diagram",null,Editor.menuImage);
+F.bottomResizer.style.visibility;R.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});t=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+
+da.width+4,da.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",t);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",t);F.addListener("editInlineStop",mxUtils.bind(this,function(da){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";O.style.display="none"}));if(null!=
+F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=H.freehand){var ea=H.freehand.createStyle;H.freehand.createStyle=function(da){return ea.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";T.className="geToolbarContainer";Q.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=O;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display=
+"inline-block"}),mxEvent.addListener(R,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var fa=mxUtils.bind(this,function(da){null!=F.notificationBtn&&(null!=da?F.notificationBtn.setAttribute("title",da):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed)if(F.statusContainer.style.display="inline-block",Z=!0,
+1==F.statusContainer.children.length&&""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var da=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();fa(da);var ca=F.getCurrentFile();
+ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",fa(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));ka=B("diagram",null,Editor.menuImage);
ka.style.boxShadow="none";ka.style.padding="6px";ka.style.margin="0px";Q.appendChild(ka);mxEvent.disableContextMenu(ka);mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";
F.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){N.innerHTML="";if(!va){var da=function(ia,ma,ra){ia=E("",ia.funct,null,ma,ia,ra);ia.style.width="40px";ia.style.opacity="0.7";return ca(ia,null,"pointer")},ca=function(ia,ma,ra){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=ra?ra:"default";ia.style.margin="2px 0px";N.appendChild(ia);mxUtils.br(N);
+"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){O.innerHTML="";if(!va){var da=function(ia,ma,ra){ia=C("",ia.funct,null,ma,ia,ra);ia.style.width="40px";ia.style.opacity="0.7";return ca(ia,null,"pointer")},ca=function(ia,ma,ra){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=ra?ra:"default";ia.style.margin="2px 0px";O.appendChild(ia);mxUtils.br(O);
return ia};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ca(F.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"),!0,!1,null,!0),mxResources.get("note"));ca(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ca(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ia=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
ia.geometry.setTerminalPoint(new mxPoint(0,0),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,0),!1);ia.geometry.points=[];ia.geometry.relative=!0;ia.edge=!0;ca(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,ia.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ia=ia.clone();ia.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ia.geometry.width=H.defaultEdgeLength+20;ia.geometry.setTerminalPoint(new mxPoint(0,
20),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,20),!1);ia=ca(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ia.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ia.style.paddingBottom="14px";ia.style.marginBottom="14px"})();da(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var la=F.actions.get("toggleShapes");da(la,mxResources.get("shapes")+
-" ("+la.shortcut+")",K);ka=C("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer");ka=C("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer")}"1"!=urlParams.embedInline&&N.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(N.style,
-"transform","translate(0, -50%)"),N.style.padding="8px 6px 4px",N.style.top="50%",N.style.bottom="",N.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,ja()):(N.innerHTML="",N.appendChild(aa),mxUtils.setPrefixedStyle(N.style,"transform","translate(0, 0)"),N.style.top="",N.style.bottom="12px",N.style.padding="0px",N.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
-"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));ja();F.addListener("darkModeChanged",ja);F.addListener("sketchModeChanged",ja)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=D){var Ba=function(da){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(da)||mxEvent.isShiftDown(da)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Da=F.actions.get("zoomIn"),
-qa=F.actions.get("zoomOut"),Ca=F.actions.get("resetView");u=F.actions.get("fullscreen");var Aa=F.actions.get("undo"),Ha=F.actions.get("redo"),Na=E("",Aa.funct,null,mxResources.get("undo")+" ("+Aa.shortcut+")",Aa,Editor.undoImage),Ga=E("",Ha.funct,null,mxResources.get("redo")+" ("+Ha.shortcut+")",Ha,Editor.redoImage),Fa=E("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=T){D=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
-"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Fa.parentNode.removeChild(Fa);var Ea=F.actions.get("delete"),La=E("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La);
+" ("+la.shortcut+")",M);ka=B("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer");ka=B("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ca(ka,null,"pointer")}"1"!=urlParams.embedInline&&O.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(O.style,
+"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,ja()):(O.innerHTML="",O.appendChild(aa),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",O.style.padding="0px",O.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));ja();F.addListener("darkModeChanged",ja);F.addListener("sketchModeChanged",ja)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=E){var Ba=function(da){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(da)||mxEvent.isShiftDown(da)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Da=F.actions.get("zoomIn"),
+qa=F.actions.get("zoomOut"),Ca=F.actions.get("resetView");t=F.actions.get("fullscreen");var Aa=F.actions.get("undo"),Ha=F.actions.get("redo"),Na=C("",Aa.funct,null,mxResources.get("undo")+" ("+Aa.shortcut+")",Aa,Editor.undoImage),Ga=C("",Ha.funct,null,mxResources.get("redo")+" ("+Ha.shortcut+")",Ha,Editor.redoImage),Fa=C("",t.funct,null,mxResources.get("fullscreen"),t,Editor.fullscreenImage);if(null!=T){E=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
+"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Fa.parentNode.removeChild(Fa);var Ea=F.actions.get("delete"),La=C("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La);
Ea.addListener("stateChanged",function(){La.style.opacity=Ea.enabled?"":"0.1"});var za=function(){Na.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ga.style.display=Na.style.display;Na.style.opacity=Aa.enabled?"":"0.1";Ga.style.opacity=Ha.enabled?"":"0.1"};Q.appendChild(Na);Q.appendChild(Ga);Aa.addListener("stateChanged",za);Ha.addListener("stateChanged",za);za();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft=
"";ta.style.top="";ta.style.left="";ta.style.height="100%";ta.style.lineHeight="";ta.style.borderStyle="none";ta.style.padding="3px 0";ta.style.margin="0px";ta.style.background="";ta.style.border="";ta.style.boxShadow="none";ta.style.verticalAlign="top";ta.style.width="auto";ta.style.maxWidth="160px";ta.style.position="relative";ta.style.padding="6px";ta.style.textOverflow="ellipsis";ta.style.opacity="0.8";T.appendChild(ta);F.editor.addListener("pagesPatched",Ca);F.editor.addListener("pageSelected",
-Ca);F.editor.addListener("pageRenamed",Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",D);F.addListener("pagesVisibleChanged",D);F.editor.addListener("pagesPatched",D);D();D=E("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);T.appendChild(D);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
-"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Ba);Ba=E("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);T.appendChild(Ba);u.visible&&(T.appendChild(Fa),mxEvent.addListener(document,
-"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=F.actions.get("exit"),T.appendChild(E("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));F.tabContainer.style.visibility="hidden";S.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-Q.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(Q);X.appendChild(T);N.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(N.style.touchAction="none");X.appendChild(N);window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var oa=E("",Ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ca,Editor.zoomFitImage);S.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";ka=M.addMenu("100%",
-D.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(F.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
+Ca);F.editor.addListener("pageRenamed",Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",E);F.addListener("pagesVisibleChanged",E);F.editor.addListener("pagesPatched",E);E();E=C("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);T.appendChild(E);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
+"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Ba);Ba=C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);T.appendChild(Ba);t.visible&&(T.appendChild(Fa),mxEvent.addListener(document,
+"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(t=F.actions.get("exit"),T.appendChild(C("",t.funct,null,mxResources.get("exit"),t,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+Q.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(Q);X.appendChild(T);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(O.style.touchAction="none");X.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var oa=C("",Ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ca,Editor.zoomFitImage);R.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";ka=J.addMenu("100%",
+E.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(F.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
"59px";ka.style.right="0px";ka.style.bottom="0px";ka.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ka.style.backgroundPosition="right 6px center";ka.style.backgroundRepeat="no-repeat";X.appendChild(ka)}(function(da){var ca=mxUtils.bind(this,function(){da.innerHTML="";mxUtils.write(da,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);F.editor.addListener("resetGraphView",ca);F.editor.addListener("pageSelected",ca)})(ka);var sa=
-F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(S);X.appendChild(F.diagramContainer);J.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
-var ya=null;P();mxEvent.addListener(window,"resize",function(){P();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";N.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),F.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor=
-"row-resize";F.diagramContainer.parentNode.appendChild(J);F.bottomResizer=J;var wa=null,ua=null,xa=null,ha=null;mxEvent.addGestureListeners(J,function(da){ha=parseInt(F.diagramContainer.style.height);ua=mxEvent.getClientY(da);H.popupMenuHandler.hideMenu();mxEvent.consume(da)});J=J.cloneNode(!1);J.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(J);F.rightResizer=J;mxEvent.addGestureListeners(J,function(da){xa=parseInt(F.diagramContainer.style.width);wa=mxEvent.getClientX(da);H.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=wa&&(F.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-wa)+"px",ca=!0);null!=ua&&(F.diagramContainer.style.height=Math.max(20,ha+mxEvent.getClientY(da)-ua)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),R(),F.refresh())},function(da){null==wa&&null==
-ua||mxEvent.consume(da);ua=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";N.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var A=[],B=[],I=0;I<this.states.length;I++){var O=this.states[I];O instanceof mxCellState&&(v||!this.graph.isCellSelected(O.cell))&&((q.x>=O.x&&q.x<=O.x+O.width||O.x>=q.x&&O.x<=q.x+q.width)&&(q.y>
-O.y+O.height+4||q.y+q.height+4<O.y)?A.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&B.push(O))}var t=0,z=0,L=O=0,C=0,E=0,G=0,P=0,J=5*x;if(1<A.length){A.push(q);A.sort(function(V,M){return V.y-M.y});var F=!1;I=q==A[0];x=q==A[A.length-1];if(!I&&!x)for(I=1;I<A.length-1;I++)if(q==A[I]){x=A[I-1];I=A[I+1];O=z=L=(I.y-x.y-x.height-q.height)/2;break}for(I=0;I<A.length-1;I++){x=A[I];var H=A[I+1],S=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==z&&0==
-t)z=H,t=1;else if(Math.abs(z-H)<=(S||1==I&&F?y:0))t+=1;else if(1<t&&F){A=A.slice(0,I+1);break}else if(3<=A.length-I&&!F)t=0,O=z=0!=L?L:0,A.splice(0,0==I?1:I),I=-1;else break;0!=O||S||(z=O=H)}3==A.length&&A[1]==q&&(O=0)}if(1<B.length){B.push(q);B.sort(function(V,M){return V.x-M.x});F=!1;I=q==B[0];x=q==B[B.length-1];if(!I&&!x)for(I=1;I<B.length-1;I++)if(q==B[I]){x=B[I-1];I=B[I+1];G=E=P=(I.x-x.x-x.width-q.width)/2;break}for(I=0;I<B.length-1;I++){x=B[I];H=B[I+1];S=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
-if(0==E&&0==C)E=H,C=1;else if(Math.abs(E-H)<=(S||1==I&&F?y:0))C+=1;else if(1<C&&F){B=B.slice(0,I+1);break}else if(3<=B.length-I&&!F)C=0,G=E=0!=P?P:0,B.splice(0,0==I?1:I),I=-1;else break;0!=G||S||(E=G=H)}3==B.length&&B[1]==q&&(G=0)}y=function(V,M,W,U){var X=[];if(U){U=J;var u=0}else U=0,u=J;X.push(new mxPoint(V.x-U,V.y-u));X.push(new mxPoint(V.x+U,V.y+u));X.push(V);X.push(M);X.push(new mxPoint(M.x-U,M.y-u));X.push(new mxPoint(M.x+U,M.y+u));if(null!=W)return W.points=X,W;V=new mxPolyline(X,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);V.dialect=mxConstants.DIALECT_SVG;V.pointerEvents=!1;V.init(p.graph.getView().getOverlayPane());return V};E=function(V,M){if(V&&null!=p.guidesArrHor)for(V=0;V<p.guidesArrHor.length;V++)p.guidesArrHor[V].node.style.visibility="hidden";if(M&&null!=p.guidesArrVer)for(V=0;V<p.guidesArrVer.length;V++)p.guidesArrVer[V].node.style.visibility="hidden"};if(1<C&&C==B.length-1){C=[];P=p.guidesArrHor;k=[];g=0;I=B[0]==q?1:0;F=B[I].y+B[I].height;if(0<G)for(I=0;I<B.length-1;I++)x=
-B[I],H=B[I+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+J,F)),k.push(new mxPoint(H.x-J,F))):q==H?(k.push(new mxPoint(x.x+x.width+J,F)),g=x.x+x.width+G,k.push(new mxPoint(g-J,F))):(k.push(new mxPoint(x.x+x.width+J,F)),k.push(new mxPoint(H.x-J,F)));else x=B[0],I=B[2],g=x.x+x.width+(I.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+J,F)),k.push(new mxPoint(g-J,F)),k.push(new mxPoint(g+q.width+J,F)),k.push(new mxPoint(I.x-J,F));for(I=0;I<k.length;I+=2)B=k[I],G=k[I+1],B=y(B,G,null!=P?
-P[I/2]:null),B.node.style.visibility="visible",B.redraw(),C.push(B);for(I=k.length/2;null!=P&&I<P.length;I++)P[I].destroy();p.guidesArrHor=C;g-=c.x;k=!0}else E(!0);if(1<t&&t==A.length-1){C=[];P=p.guidesArrVer;l=[];d=0;I=A[0]==q?1:0;t=A[I].x+A[I].width;if(0<O)for(I=0;I<A.length-1;I++)x=A[I],H=A[I+1],q==x?(d=H.y-x.height-O,l.push(new mxPoint(t,d+x.height+J)),l.push(new mxPoint(t,H.y-J))):q==H?(l.push(new mxPoint(t,x.y+x.height+J)),d=x.y+x.height+O,l.push(new mxPoint(t,d-J))):(l.push(new mxPoint(t,x.y+
-x.height+J)),l.push(new mxPoint(t,H.y-J)));else x=A[0],I=A[2],d=x.y+x.height+(I.y-x.y-x.height-q.height)/2,l.push(new mxPoint(t,x.y+x.height+J)),l.push(new mxPoint(t,d-J)),l.push(new mxPoint(t,d+q.height+J)),l.push(new mxPoint(t,I.y-J));for(I=0;I<l.length;I+=2)B=l[I],G=l[I+1],B=y(B,G,null!=P?P[I/2]:null,!0),B.node.style.visibility="visible",B.redraw(),C.push(B);for(I=l.length/2;null!=P&&I<P.length;I++)P[I].destroy();p.guidesArrVer=C;d-=c.y;l=!0}else E(!1,!0)}if(k||l)return q=new mxPoint(g,d),A=b.call(this,
-c,q,n,v),k&&!l?q.y=A.y:l&&!k&&(q.x=A.x),A.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;E(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
-n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var E=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(E,G)},z);P&&t.apply(E,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(F.diagramContainer);I.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
+var ya=null;N();mxEvent.addListener(window,"resize",function(){N();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";O.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),F.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(I);F.bottomResizer=I;var wa=null,ua=null,xa=null,ha=null;mxEvent.addGestureListeners(I,function(da){ha=parseInt(F.diagramContainer.style.height);ua=mxEvent.getClientY(da);H.popupMenuHandler.hideMenu();mxEvent.consume(da)});I=I.cloneNode(!1);I.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(I);F.rightResizer=I;mxEvent.addGestureListeners(I,function(da){xa=parseInt(F.diagramContainer.style.width);wa=mxEvent.getClientX(da);H.popupMenuHandler.hideMenu();
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=wa&&(F.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(da)-wa)+"px",ca=!0);null!=ua&&(F.diagramContainer.style.height=Math.max(20,ha+mxEvent.getClientY(da)-ua)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(da){null==wa&&null==
+ua||mxEvent.consume(da);ua=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";T.style.visibility="hidden";O.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var z=[],A=[],K=0;K<this.states.length;K++){var P=this.states[K];P instanceof mxCellState&&(v||!this.graph.isCellSelected(P.cell))&&((q.x>=P.x&&q.x<=P.x+P.width||P.x>=q.x&&P.x<=q.x+q.width)&&(q.y>
+P.y+P.height+4||q.y+q.height+4<P.y)?z.push(P):(q.y>=P.y&&q.y<=P.y+P.height||P.y>=q.y&&P.y<=q.y+q.height)&&(q.x>P.x+P.width+4||q.x+q.width+4<P.x)&&A.push(P))}var L=0,u=0,D=P=0,B=0,C=0,G=0,N=0,I=5*x;if(1<z.length){z.push(q);z.sort(function(W,J){return W.y-J.y});var F=!1;K=q==z[0];x=q==z[z.length-1];if(!K&&!x)for(K=1;K<z.length-1;K++)if(q==z[K]){x=z[K-1];K=z[K+1];P=u=D=(K.y-x.y-x.height-q.height)/2;break}for(K=0;K<z.length-1;K++){x=z[K];var H=z[K+1],R=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==u&&0==
+L)u=H,L=1;else if(Math.abs(u-H)<=(R||1==K&&F?y:0))L+=1;else if(1<L&&F){z=z.slice(0,K+1);break}else if(3<=z.length-K&&!F)L=0,P=u=0!=D?D:0,z.splice(0,0==K?1:K),K=-1;else break;0!=P||R||(u=P=H)}3==z.length&&z[1]==q&&(P=0)}if(1<A.length){A.push(q);A.sort(function(W,J){return W.x-J.x});F=!1;K=q==A[0];x=q==A[A.length-1];if(!K&&!x)for(K=1;K<A.length-1;K++)if(q==A[K]){x=A[K-1];K=A[K+1];G=C=N=(K.x-x.x-x.width-q.width)/2;break}for(K=0;K<A.length-1;K++){x=A[K];H=A[K+1];R=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
+if(0==C&&0==B)C=H,B=1;else if(Math.abs(C-H)<=(R||1==K&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,K+1);break}else if(3<=A.length-K&&!F)B=0,G=C=0!=N?N:0,A.splice(0,0==K?1:K),K=-1;else break;0!=G||R||(C=G=H)}3==A.length&&A[1]==q&&(G=0)}y=function(W,J,V,U){var X=[];if(U){U=I;var t=0}else U=0,t=I;X.push(new mxPoint(W.x-U,W.y-t));X.push(new mxPoint(W.x+U,W.y+t));X.push(W);X.push(J);X.push(new mxPoint(J.x-U,J.y-t));X.push(new mxPoint(J.x+U,J.y+t));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(p.graph.getView().getOverlayPane());return W};C=function(W,J){if(W&&null!=p.guidesArrHor)for(W=0;W<p.guidesArrHor.length;W++)p.guidesArrHor[W].node.style.visibility="hidden";if(J&&null!=p.guidesArrVer)for(W=0;W<p.guidesArrVer.length;W++)p.guidesArrVer[W].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];N=p.guidesArrHor;k=[];g=0;K=A[0]==q?1:0;F=A[K].y+A[K].height;if(0<G)for(K=0;K<A.length-1;K++)x=
+A[K],H=A[K+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+I,F)),k.push(new mxPoint(H.x-I,F))):q==H?(k.push(new mxPoint(x.x+x.width+I,F)),g=x.x+x.width+G,k.push(new mxPoint(g-I,F))):(k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(H.x-I,F)));else x=A[0],K=A[2],g=x.x+x.width+(K.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(g-I,F)),k.push(new mxPoint(g+q.width+I,F)),k.push(new mxPoint(K.x-I,F));for(K=0;K<k.length;K+=2)A=k[K],G=k[K+1],A=y(A,G,null!=N?
+N[K/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=k.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else C(!0);if(1<L&&L==z.length-1){B=[];N=p.guidesArrVer;l=[];d=0;K=z[0]==q?1:0;L=z[K].x+z[K].width;if(0<P)for(K=0;K<z.length-1;K++)x=z[K],H=z[K+1],q==x?(d=H.y-x.height-P,l.push(new mxPoint(L,d+x.height+I)),l.push(new mxPoint(L,H.y-I))):q==H?(l.push(new mxPoint(L,x.y+x.height+I)),d=x.y+x.height+P,l.push(new mxPoint(L,d-I))):(l.push(new mxPoint(L,x.y+
+x.height+I)),l.push(new mxPoint(L,H.y-I)));else x=z[0],K=z[2],d=x.y+x.height+(K.y-x.y-x.height-q.height)/2,l.push(new mxPoint(L,x.y+x.height+I)),l.push(new mxPoint(L,d-I)),l.push(new mxPoint(L,d+q.height+I)),l.push(new mxPoint(L,K.y-I));for(K=0;K<l.length;K+=2)A=l[K],G=l[K+1],A=y(A,G,null!=N?N[K/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=l.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrVer=B;d-=c.y;l=!0}else C(!1,!0)}if(k||l)return q=new mxPoint(g,d),z=b.call(this,
+c,q,n,v),k&&!l?q.y=z.y:l&&!k&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;C(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
+n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var L=b.diagramContainer;p.style.top=L.offsetTop-g+"px";p.style.left=L.offsetLeft-g+"px";p.style.width=(f?0:L.offsetWidth)+g+"px";p.style.height=(f?L.offsetHeight:0)+g+"px"}function n(L,u,D){if(null!=v)return L;var B;return function(){var C=this,G=arguments,N=D&&!B;clearTimeout(B);B=setTimeout(function(){B=null;D||L.apply(C,G)},u);N&&L.apply(C,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
d=window.cancelAnimationFrame||window.mozCancelAnimationFrame,g=this.RULER_THICKNESS,k=this;this.unit=e;var l=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},p=document.createElement("div");p.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){l=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};p.style.background=l.bkgClr;p.style[f?"borderRight":"borderBottom"]="0.5px solid "+l.strokeClr;p.style.borderLeft="0.5px solid "+l.strokeClr});this.updateStyle();document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=b.refresh;b.refresh=
-function(t){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var A=function(t,z,L,C,E){t=Math.round(t);z=Math.round(z);L=Math.round(L);C=Math.round(C);x.beginPath();x.moveTo(t+.5,z+.5);x.lineTo(L+.5,C+.5);x.stroke();E&&(f?(x.save(),x.translate(t,z),
-x.rotate(-Math.PI/2),x.fillText(E,0,0),x.restore()):x.fillText(E,t,z))},B=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var t=y.view.scale,z=y.view.getBackgroundPageBounds(),L=y.view.translate,C=y.pageVisible;L=C?g+(f?z.y-y.container.scrollTop:z.x-y.container.scrollLeft):g+(f?L.y*t-y.container.scrollTop:L.x*t-y.container.scrollLeft);var E=0;C&&(E=y.getPageLayout(),E=f?E.y*y.pageFormat.height:
-E.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var P=G=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;P=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;P=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=t||4<=t?8:16,P=mxConstants.PIXELS_PER_INCH/G,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=P;2<=t?F=P/(2*Math.floor(t/2)):.5>=t&&(F=P*Math.floor(1/t/2)*(k.unit==
-mxConstants.MILLIMETERS?2:1));P=null;z=C?Math.min(L+(f?z.height:z.width),f?q.height:q.width):f?q.height:q.width;if(C)if(x.fillStyle=l.outBkgClr,f){var H=L-g;0<H&&x.fillRect(0,g,g,H);z<q.height&&x.fillRect(0,z,g,q.height)}else H=L-g,0<H&&x.fillRect(g,0,H,g),z<q.width&&x.fillRect(z,0,q.width,g);x.fillStyle=l.fontClr;for(C=C?L:L%(F*t);C<=z;C+=F*t)if(H=Math.round((C-L)/t/F),!(C<g||H==P)){P=H;var S=null;0==H%G&&(S=k.formatText(E+H*F)+"");f?A(g-J[Math.abs(H)%G],C,g,C,S):A(C,g-J[Math.abs(H)%G],C,g,S)}x.lineWidth=
-1;A(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},I=-1,O=function(){null!=v?(null!=d&&d(I),I=v(B)):B()};this.drawRuler=O;this.sizeListener=e=n(function(){var t=y.container;f?(t=t.offsetHeight+g,q.height!=t&&(q.height=t,p.style.height=t+"px",O())):(t=t.offsetWidth+g,q.width!=t&&(q.width=t,p.style.width=t+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var t=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=t&&(k.lastScroll=t,O())},10);
-this.unitListener=function(t,z){k.setUnit(z.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(t){l=t;p.style.background=l.bkgClr;B()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(t,z,L,C){if(f&&4<t.height||
-!f&&4<t.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var E=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=t.y+E.y+g-this.graph.container.scrollTop;var P=0;var J=G+t.height/2;var F=g/2;var H=G+t.height;var S=0;var V=x.getImageData(P,G-1,g,
-3);A(P,G,g,G);G--;var M=x.getImageData(F,J-1,g,3);A(F,J,g,J);J--;var W=x.getImageData(S,H-1,g,3);A(S,H,g,H);H--}else G=0,P=t.x+E.x+g-this.graph.container.scrollLeft,J=g/2,F=P+t.width/2,H=0,S=P+t.width,V=x.getImageData(P-1,G,3,g),A(P,G,P,g),P--,M=x.getImageData(F-1,J,3,g),A(F,J,F,g),F--,W=x.getImageData(S-1,H,3,g),A(S,H,S,g),S--;if(null==k.guidePart||k.guidePart.x1!=P||k.guidePart.y1!=G)k.guidePart={imgData1:V,x1:P,y1:G,imgData2:M,x2:F,y2:J,imgData3:W,x3:S,y3:H}}catch(U){}}else E=k.origGuideMove.apply(this,
-arguments);return E};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var t=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(z){}return t}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(L){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var z=function(L,u,D,B,C){L=Math.round(L);u=Math.round(u);D=Math.round(D);B=Math.round(B);x.beginPath();x.moveTo(L+.5,u+.5);x.lineTo(D+.5,B+.5);x.stroke();C&&(f?(x.save(),x.translate(L,u),
+x.rotate(-Math.PI/2),x.fillText(C,0,0),x.restore()):x.fillText(C,L,u))},A=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var L=y.view.scale,u=y.view.getBackgroundPageBounds(),D=y.view.translate,B=y.pageVisible;D=B?g+(f?u.y-y.container.scrollTop:u.x-y.container.scrollLeft):g+(f?D.y*L-y.container.scrollTop:D.x*L-y.container.scrollLeft);var C=0;B&&(C=y.getPageLayout(),C=f?C.y*y.pageFormat.height:
+C.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var N=G=10;var I=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=L||4<=L?8:16,N=mxConstants.PIXELS_PER_INCH/G,I=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=N;2<=L?F=N/(2*Math.floor(L/2)):.5>=L&&(F=N*Math.floor(1/L/2)*(k.unit==
+mxConstants.MILLIMETERS?2:1));N=null;u=B?Math.min(D+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var H=D-g;0<H&&x.fillRect(0,g,g,H);u<q.height&&x.fillRect(0,u,g,q.height)}else H=D-g,0<H&&x.fillRect(g,0,H,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?D:D%(F*L);B<=u;B+=F*L)if(H=Math.round((B-D)/L/F),!(B<g||H==N)){N=H;var R=null;0==H%G&&(R=k.formatText(C+H*F)+"");f?z(g-I[Math.abs(H)%G],B,g,B,R):z(B,g-I[Math.abs(H)%G],B,g,R)}x.lineWidth=
+1;z(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},K=-1,P=function(){null!=v?(null!=d&&d(K),K=v(A)):A()};this.drawRuler=P;this.sizeListener=e=n(function(){var L=y.container;f?(L=L.offsetHeight+g,q.height!=L&&(q.height=L,p.style.height=L+"px",P())):(L=L.offsetWidth+g,q.width!=L&&(q.width=L,p.style.width=L+"px",P()))},10);this.pageListener=function(){P()};this.scrollListener=c=n(function(){var L=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=L&&(k.lastScroll=L,P())},10);
+this.unitListener=function(L,u){k.setUnit(u.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(L){l=L;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(L,u,D,B){if(f&&4<L.height||
+!f&&4<L.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var C=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=L.y+C.y+g-this.graph.container.scrollTop;var N=0;var I=G+L.height/2;var F=g/2;var H=G+L.height;var R=0;var W=x.getImageData(N,G-1,g,
+3);z(N,G,g,G);G--;var J=x.getImageData(F,I-1,g,3);z(F,I,g,I);I--;var V=x.getImageData(R,H-1,g,3);z(R,H,g,H);H--}else G=0,N=L.x+C.x+g-this.graph.container.scrollLeft,I=g/2,F=N+L.width/2,H=0,R=N+L.width,W=x.getImageData(N-1,G,3,g),z(N,G,N,g),N--,J=x.getImageData(F-1,I,3,g),z(F,I,F,g),F--,V=x.getImageData(R-1,H,3,g),z(R,H,R,g),R--;if(null==k.guidePart||k.guidePart.x1!=N||k.guidePart.y1!=G)k.guidePart={imgData1:W,x1:N,y1:G,imgData2:J,x2:F,y2:I,imgData3:V,x3:R,y3:H}}catch(U){}}else C=k.origGuideMove.apply(this,
+arguments);return C};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var L=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(u){}return L}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var m=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(n){m=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!m){var v=new mxPopupMenu(mxUtils.bind(this,function(k,l){b.menus.addMenuItems(k,["points","inches","millimeters","meters"],l)}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=
!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);v.popup(d,g,null,n);b.setCurrentMenu(v,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(J){g=J};this.setAutoClose=function(J){k=J};this.setAutoInsert=
-function(J){l=J};this.setAutoScroll=function(J){p=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){B=J};this.setSmoothing=function(J){f=J};this.setPerfectFreehandMode=function(J){O=J};this.setBrushSize=function(J){I.size=J};this.getBrushSize=function(){return I.size};var t=function(J){y=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){t(!0)};this.isDrawing=function(){return y};var z=mxUtils.bind(this,function(J){if(c){var F=d.length,H=A&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(J)}}),L=new mxCell;L.edge=!0;var C=function(){var J=b.getCurrentCellStyle(L);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var J=[],F=0;F<v.length;F++)null!=v[F]&&J.push([v[F].x,v[F].y]);J=PerfectFreehand.getStroke(J,I);v=[];for(F=0;F<J.length;F++)v.push({x:J[F][0],y:J[F][1]});v.push(null)}J=v[0].x;var H=v[0].x,S=v[0].y,V=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(J=Math.max(J,v[F].x),H=Math.min(H,v[F].x),S=Math.max(S,
-v[F].y),V=Math.min(V,v[F].y));J-=H;S-=V;if(0<J&&0<S){var M=100/J,W=100/S;v.map(function(K){if(null==K)return K;K.x=(K.x-H)*M;K.y=(K.y-V)*W;return K});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<v.length;F++){var u=v[F];if(null==u){u=!1;X=v[X];var D=v[F-1];!g&&k&&(u=X.x-D.x,D=X.y-D.y,u=Math.sqrt(u*u+D*D)<=b.tolerance);if(g||u)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||u?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+u.x.toFixed(2)+
-'" y="'+u.y.toFixed(2)+'"/>'):U+('<line x="'+u.x.toFixed(2)+'" y="'+u.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,V/U-X.y,J/U,S/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}B&&
-b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}t(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,F){J=F.getProperty("eventName");F=F.getProperty("event");J==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(J=F.getEvent(),y&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var S=C();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",O?S:"none");c.setAttribute("stroke",S);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(S=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",S=S.split(" ").map(function(V){return parseFloat(V)*H}).join(" "),c.setAttribute("stroke-dasharray",S));x=[];J=E(J);G(J);
-n="M"+J.x+" "+J.y;v.push(J);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],I):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(J,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=F.getEvent();J=E(J);G(J);var H=P(0);if(H)if(v.push(H),O){var S=[];for(H=0;H<v.length;H++)S.push([v[H].x,v[H].y]);d=[];for(var V=2;V<x.length;V+=2)H=P(V),S.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(S,I))}else{n+=" L"+
-H.x+" "+H.y;S="";d=[];for(V=2;V<x.length;V+=2)H=P(V),S+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+S)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(J,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z(F.getEvent()),F.consume())})});var E=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(x.push(J);x.length>f;)x.shift()},P=
-function(J){var F=x.length;if(1===F%2||F>=f){var H=0,S=0,V,M=0;for(V=J;V<F;V++)M++,J=x[V],H+=J.x,S+=J.y;return{x:H/M,y:S/M}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(M,W){if(!P){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(W=JSON.stringify({from:z,id:A,type:M,sessionId:e.clientId,userId:U.id,username:U.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),J&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[W]),A++,M=!J&&("cursor"==M||"selectionChange"==M),E&&!M&&V("message",W),M))for(p2pId in C)C[p2pId].send(W)}}function m(M){if(b.shareCursorPosition&&!l.isMouseDown){var W=
-mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,u=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:u,x:Math.round((M.getX()-W.x+l.container.scrollLeft)/X-U.x),y:Math.round((M.getY()-W.y+l.container.scrollTop)/X-U.y)})}}function n(M,W){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=M&&null!=M.cursor&&null!=M.lastCursor)if(null!=M.lastCursor.hide||!b.isShowRemoteCursors()||null!=M.lastCursor.pageId&&M.lastCursor.pageId!=U)M.cursor.style.display="none";
-else{U=function(){var N=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-M.cursor.clientWidth,D)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-M.cursor.clientHeight,K));T.style.opacity=N!=D||Q!=K?0:1;M.cursor.style.left=N+"px";M.cursor.style.top=Q+"px";M.cursor.style.display=""};var X=l.view.translate,u=l.view.scale,D=(X.x+M.lastCursor.x)*u+8,K=(X.y+M.lastCursor.y)*u-12,T=M.cursor.getElementsByTagName("img")[0];
-W?(mxUtils.setPrefixedStyle(M.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(M.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(M,W){function U(){if(null==y[u]){var Y=t[u];null==Y&&(Y=p%x.length,t[u]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[u]={cursor:document.createElement("div"),color:ba,selection:{}};I[W]=u;D=y[u].cursor;D.style.pointerEvents=
-"none";D.style.position="absolute";D.style.display="none";D.style.opacity="0.9";D.style.zIndex=5E3;var ea=document.createElement("img");mxUtils.setPrefixedStyle(ea.style,"transform","rotate(-45deg)translateX(-14px)");ea.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);ea.style.width="10px";D.appendChild(ea);ea=document.createElement("div");ea.style.backgroundColor=ba;ea.style.color=Y;ea.style.fontSize="9pt";ea.style.padding=
-"3px 7px";ea.style.marginTop="8px";ea.style.borderRadius="10px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";mxUtils.write(ea,X);D.appendChild(ea);b.diagramContainer.appendChild(D)}else D=y[u].cursor;K=y[u].selection}if(!P){M=JSON.parse(M);J&&"cursor"!=M.type&&EditorUi.debug("P2PCollab: msg received",[M]);if(null!=W){if(M.from==z||B[M.from]>=M.id){EditorUi.debug("P2PCollab: Dropped Message",M,z,B[M.from]);return}B[M.from]=M.id}var X=
-M.username?M.username:"Anonymous",u=M.sessionId,D,K;null!=y[u]&&(clearTimeout(y[u].inactiveTO),y[u].inactiveTO=setTimeout(function(){g(null,u)},12E4));var T=M.data;switch(M.type){case "cursor":U();y[u].lastCursor=T;n(y[u],!0);break;case "diff":try{M=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(M.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var N=null!=b.currentPage?b.currentPage.getId():null;if(null==
-N||null!=T.pageId&&T.pageId==N){U();for(N=0;N<T.removed.length;N++){var Q=T.removed[N];if(null!=Q){var R=K[Q];delete K[Q];null!=R&&R.destroy()}}for(N=0;N<T.added.length;N++)Q=T.added[N],null!=Q&&(R=l.model.getCell(Q),null!=R&&(K[Q]=l.highlightCell(R,y[u].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",M))}}function d(M,W){if(!J&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:W,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){V("sendSignal",
-{to:M,from:z,signal:X})});U.on("error",function(X){delete L[M];EditorUi.debug("P2PCollab: p2p socket error",X);!P&&W&&U.destroyed&&O[M]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",M),d(M,!0))});U.on("connect",function(){delete L[M];null==C[M]||C[M].destroyed?(C[M]=U,O[M]=!0,EditorUi.debug("P2PCollab: p2p socket connected",M)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",M))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
-M),k(I[M]),delete C[M])});U.on("data",v);return L[M]=U}}function g(M,W){k(W||I[M]);null!=M&&(delete I[M],O[M]=!1)}function k(M){var W=y[M];if(null!=W){var U=W.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=W.cursor&&null!=W.cursor.parentNode&&W.cursor.parentNode.removeChild(W.cursor);clearTimeout(W.inactiveTO);delete y[M]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
-y={},A=1,B={},I={},O={},t={},z,L={},C={},E=!0,G=!1,P=!1,J="0"!=urlParams["no-p2p"],F=!1,H=0,S=null,V=mxUtils.bind(this,function(M,W){if(!P)try{null!=q?(q.send(JSON.stringify({action:M,msg:W})),J||EditorUi.debug("P2PCollab: sending to socket server",[M],[W])):this.joinFile(!0)}catch(U){S=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(M){this.sendMessage("diff",{patch:M})};this.getState=
-function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,D=arguments,K=function(){U=null;X=Date.now();M.apply(u,D)};Date.now()-X>W?K():U=setTimeout(K,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
-c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(M,W){M=function(u){return null!=u?u.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=W.getProperty("added");W=W.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(M):[],added:W?W.map(M):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var M in y)n(y[M])});
-mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(M){if(!P)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),S="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
-q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var W=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);W.addEventListener("open",function(X){q=W;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);M&&e.scheduleCleanup()});W.addEventListener("message",mxUtils.bind(this,function(X){J||EditorUi.debug("P2PCollab: msg received",[X]);var u=JSON.parse(X.data);J&&"message"!=u.action&&EditorUi.debug("P2PCollab: msg received",
-[X]);switch(u.action){case "message":v(u.msg,u.from);break;case "clientsList":X=u.msg;z=X.cId;G=!0;for(u=0;u<X.list.length;u++)d(X.list[u],!0);break;case "signal":X=u.msg;J||(L[X.from]?u=L[X.from]:(u=d(X.from,!1),E=!0),u.signal(X.signal));break;case "newClient":E=!0;break;case "clientLeft":g(u.msg);break;case "sendSignalFailed":X=u.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",X),delete L[X.to],O[X.to]=!1}}));var U=!1;W.addEventListener("close",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket closed",
-W.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",W.joinId);P||1E3==X.code||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",W.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));W.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
-W.joinId);P||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",W.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){S=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in y)k(sessionId);null!=
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,z=!0,A=!1,K={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},P=!1;this.setClosedPath=function(I){g=I};this.setAutoClose=function(I){k=I};this.setAutoInsert=
+function(I){l=I};this.setAutoScroll=function(I){p=I};this.setOpenFill=function(I){q=I};this.setStopClickEnabled=function(I){z=I};this.setSelectInserted=function(I){A=I};this.setSmoothing=function(I){f=I};this.setPerfectFreehandMode=function(I){P=I};this.setBrushSize=function(I){K.size=I};this.getBrushSize=function(){return K.size};var L=function(I){y=I;b.getRubberband().setEnabled(!I);b.graphHandler.setSelectEnabled(!I);b.graphHandler.setMoveEnabled(!I);b.container.style.cursor=I?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){L(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(I){if(c){var F=d.length,H=z&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(I)}}),D=new mxCell;D.edge=!0;var B=function(){var I=b.getCurrentCellStyle(D);I=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+I&&(I=b.shapeForegroundColor);return I};this.createStyle=function(I){var F=";fillColor=none;";P&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+F};this.stopDrawing=function(){if(0<m.length){if(P){for(var I=[],F=0;F<v.length;F++)null!=v[F]&&I.push([v[F].x,v[F].y]);I=PerfectFreehand.getStroke(I,K);v=[];for(F=0;F<I.length;F++)v.push({x:I[F][0],y:I[F][1]});v.push(null)}I=v[0].x;var H=v[0].x,R=v[0].y,W=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(I=Math.max(I,v[F].x),H=Math.min(H,v[F].x),R=Math.max(R,
+v[F].y),W=Math.min(W,v[F].y));I-=H;R-=W;if(0<I&&0<R){var J=100/I,V=100/R;v.map(function(M){if(null==M)return M;M.x=(M.x-H)*J;M.y=(M.y-W)*V;return M});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<v.length;F++){var t=v[F];if(null==t){t=!1;X=v[X];var E=v[F-1];!g&&k&&(t=X.x-E.x,E=X.y-E.y,t=Math.sqrt(t*t+E*E)<=b.tolerance);if(g||t)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||t?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+t.x.toFixed(2)+
+'" y="'+t.y.toFixed(2)+'"/>'):U+('<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,W/U-X.y,I/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}A&&
+b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}L(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,F){I=F.getProperty("eventName");F=F.getProperty("event");I==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(I,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(I=F.getEvent(),y&&!mxEvent.isPopupTrigger(I)&&!mxEvent.isMultiTouchEvent(I))){var H=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var R=B();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",P?R:"none");c.setAttribute("stroke",R);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*H}).join(" "),c.setAttribute("stroke-dasharray",R));x=[];I=C(I);G(I);
+n="M"+I.x+" "+I.y;v.push(I);d=[];c.setAttribute("d",P?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],K):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(I,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=F.getEvent();I=C(I);G(I);var H=N(0);if(H)if(v.push(H),P){var R=[];for(H=0;H<v.length;H++)R.push([v[H].x,v[H].y]);d=[];for(var W=2;W<x.length;W+=2)H=N(W),R.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,K))}else{n+=" L"+
+H.x+" "+H.y;R="";d=[];for(W=2;W<x.length;W+=2)H=N(W),R+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+R)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(I.x-H.x,I.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(I,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(F.getEvent()),F.consume())})});var C=function(I){return mxUtils.convertPoint(b.container,mxEvent.getClientX(I),mxEvent.getClientY(I))},G=function(I){for(x.push(I);x.length>f;)x.shift()},N=
+function(I){var F=x.length;if(1===F%2||F>=f){var H=0,R=0,W,J=0;for(W=I;W<F;W++)J++,I=x[W],H+=I.x,R+=I.y;return{x:H/J,y:R/J}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(J,V){if(!N){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(V=JSON.stringify({from:u,id:z,type:J,sessionId:e.clientId,userId:U.id,username:U.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),I&&"cursor"!=J&&EditorUi.debug("P2PCollab: sending to socket server",[V]),z++,J=!I&&("cursor"==J||"selectionChange"==J),C&&!J&&W("message",V),J))for(p2pId in B)B[p2pId].send(V)}}function m(J){if(b.shareCursorPosition&&!l.isMouseDown){var V=
+mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,t=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:t,x:Math.round((J.getX()-V.x+l.container.scrollLeft)/X-U.x),y:Math.round((J.getY()-V.y+l.container.scrollTop)/X-U.y)})}}function n(J,V){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=J&&null!=J.cursor&&null!=J.lastCursor)if(null!=J.lastCursor.hide||!b.isShowRemoteCursors()||null!=J.lastCursor.pageId&&J.lastCursor.pageId!=U)J.cursor.style.display="none";
+else{U=function(){var O=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-J.cursor.clientWidth,E)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-J.cursor.clientHeight,M));T.style.opacity=O!=E||Q!=M?0:1;J.cursor.style.left=O+"px";J.cursor.style.top=Q+"px";J.cursor.style.display=""};var X=l.view.translate,t=l.view.scale,E=(X.x+J.lastCursor.x)*t+8,M=(X.y+J.lastCursor.y)*t-12,T=J.cursor.getElementsByTagName("img")[0];
+V?(mxUtils.setPrefixedStyle(J.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(J.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(J,V){function U(){if(null==y[t]){var Y=L[t];null==Y&&(Y=p%x.length,L[t]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[t]={cursor:document.createElement("div"),color:ba,selection:{}};K[V]=t;E=y[t].cursor;E.style.pointerEvents=
+"none";E.style.position="absolute";E.style.display="none";E.style.opacity="0.9";E.style.zIndex=5E3;var ea=document.createElement("img");mxUtils.setPrefixedStyle(ea.style,"transform","rotate(-45deg)translateX(-14px)");ea.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);ea.style.width="10px";E.appendChild(ea);ea=document.createElement("div");ea.style.backgroundColor=ba;ea.style.color=Y;ea.style.fontSize="9pt";ea.style.padding=
+"3px 7px";ea.style.marginTop="8px";ea.style.borderRadius="10px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";mxUtils.write(ea,X);E.appendChild(ea);b.diagramContainer.appendChild(E)}else E=y[t].cursor;M=y[t].selection}if(!N){J=JSON.parse(J);I&&"cursor"!=J.type&&EditorUi.debug("P2PCollab: msg received",[J]);if(null!=V){if(J.from==u||A[J.from]>=J.id){EditorUi.debug("P2PCollab: Dropped Message",J,u,A[J.from]);return}A[J.from]=J.id}var X=
+J.username?J.username:"Anonymous",t=J.sessionId,E,M;null!=y[t]&&(clearTimeout(y[t].inactiveTO),y[t].inactiveTO=setTimeout(function(){g(null,t)},12E4));var T=J.data;switch(J.type){case "cursor":U();y[t].lastCursor=T;n(y[t],!0);break;case "diff":try{J=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(J.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var O=null!=b.currentPage?b.currentPage.getId():null;if(null==
+O||null!=T.pageId&&T.pageId==O){U();for(O=0;O<T.removed.length;O++){var Q=T.removed[O];if(null!=Q){var S=M[Q];delete M[Q];null!=S&&S.destroy()}}for(O=0;O<T.added.length;O++)Q=T.added[O],null!=Q&&(S=l.model.getCell(Q),null!=S&&(M[Q]=l.highlightCell(S,y[t].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",J))}}function d(J,V){if(!I&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){W("sendSignal",
+{to:J,from:u,signal:X})});U.on("error",function(X){delete D[J];EditorUi.debug("P2PCollab: p2p socket error",X);!N&&V&&U.destroyed&&P[J]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",J),d(J,!0))});U.on("connect",function(){delete D[J];null==B[J]||B[J].destroyed?(B[J]=U,P[J]=!0,EditorUi.debug("P2PCollab: p2p socket connected",J)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",J))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
+J),k(K[J]),delete B[J])});U.on("data",v);return D[J]=U}}function g(J,V){k(V||K[J]);null!=J&&(delete K[J],P[J]=!1)}function k(J){var V=y[J];if(null!=V){var U=V.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete y[J]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
+y={},z=1,A={},K={},P={},L={},u,D={},B={},C=!0,G=!1,N=!1,I="0"!=urlParams["no-p2p"],F=!1,H=0,R=null,W=mxUtils.bind(this,function(J,V){if(!N)try{null!=q?(q.send(JSON.stringify({action:J,msg:V})),I||EditorUi.debug("P2PCollab: sending to socket server",[J],[V])):this.joinFile(!0)}catch(U){R=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(J){this.sendMessage("diff",{patch:J})};this.getState=
+function(){return null!=q?q.readyState:3};this.getLastError=function(){return R};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,V){},mouseMove:function(J,V){var U,X=-1;return function(){clearTimeout(U);var t=this,E=arguments,M=function(){U=null;X=Date.now();J.apply(t,E)};Date.now()-X>V?M():U=setTimeout(M,V)}}(function(J,V){m(V)},200),mouseUp:function(J,V){m(V)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
+c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(J,V){J=function(t){return null!=t?t.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(J):[],added:V?V.map(J):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var J in y)n(y[J])});
+mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(J){if(!N)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),R="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
+q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(X){q=V;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);J&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(X){I||EditorUi.debug("P2PCollab: msg received",[X]);var t=JSON.parse(X.data);I&&"message"!=t.action&&EditorUi.debug("P2PCollab: msg received",
+[X]);switch(t.action){case "message":v(t.msg,t.from);break;case "clientsList":X=t.msg;u=X.cId;G=!0;for(t=0;t<X.list.length;t++)d(X.list[t],!0);break;case "signal":X=t.msg;I||(D[X.from]?t=D[X.from]:(t=d(X.from,!1),C=!0),t.signal(X.signal));break;case "newClient":C=!0;break;case "clientLeft":g(t.msg);break;case "sendSignalFailed":X=t.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",X),delete D[X.to],P[X.to]=!1}}));var U=!1;V.addEventListener("close",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket closed",
+V.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);N||1E3==X.code||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
+V.joinId);N||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){R=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!N){EditorUi.debug("P2PCollab: destroyed");N=!0;for(sessionId in y)k(sessionId);null!=
this.mouseListeners&&l.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&l.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(l.container,"scroll",this.cursorHandler),l.getView().removeListener(mxEvent.SCALE,this.cursorHandler),l.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),l.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,
-this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var M in C)null!=C[M]&&C[M].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
+this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var J in B)null!=B[J]&&B[J].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js
index 9e72cb06..0623aaf7 100644
--- a/src/main/webapp/js/diagramly/ElectronApp.js
+++ b/src/main/webapp/js/diagramly/ElectronApp.js
@@ -1776,6 +1776,11 @@ mxStencilRegistry.allowEval = false;
{
electron.sendMessage('toggleSpellCheck');
}
+
+ App.prototype.toggleStoreBkp = function()
+ {
+ electron.sendMessage('toggleStoreBkp');
+ }
App.prototype.openDevTools = function()
{
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index a1fc798b..c9c39efc 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -3834,6 +3834,17 @@
spellCheckAction.setToggleAction(true);
spellCheckAction.setSelectedCallback(function() { return enableSpellCheck; });
+ var enableStoreBkp = urlParams['enableStoreBkp'] == '1';
+
+ var storeBkpAction = editorUi.actions.addAction('autoBkp', function()
+ {
+ editorUi.toggleStoreBkp();
+ enableStoreBkp = !enableStoreBkp;
+ });
+
+ storeBkpAction.setToggleAction(true);
+ storeBkpAction.setSelectedCallback(function() { return enableStoreBkp; });
+
editorUi.actions.addAction('openDevTools', function()
{
editorUi.openDevTools();
@@ -3866,7 +3877,7 @@
if (EditorUi.isElectronApp)
{
- this.addMenuItems(menu, ['spellCheck'], parent);
+ this.addMenuItems(menu, ['spellCheck', 'autoBkp'], parent);
}
this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-'], parent);
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 60d72f19..a8c1d10b 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1263,12 +1263,6 @@ EditorUi.initMinimalTheme = function()
{
menu.addSeparator(parent);
- if (file.isRealtimeEnabled() && file.isRealtimeSupported())
- {
- this.addMenuItems(menu, ['showRemoteCursors',
- 'shareCursor'], parent);
- }
-
if (file.constructor == DriveFile)
{
ui.menus.addMenuItems(menu, ['share'], parent);
@@ -1341,13 +1335,7 @@ EditorUi.initMinimalTheme = function()
menu.addSeparator(parent);
if (file != null)
- {
- if (file.isRealtimeEnabled() && file.isRealtimeSupported())
- {
- this.addMenuItems(menu, ['showRemoteCursors',
- 'shareCursor'], parent);
- }
-
+ {
if (file.constructor == DriveFile)
{
ui.menus.addMenuItems(menu, ['share'], parent);
@@ -1551,13 +1539,21 @@ EditorUi.initMinimalTheme = function()
{
ui.menus.addMenuItem(menu, 'plugins', parent);
}
-
- menu.addSeparator(parent);
-
- if (ui.mode != App.MODE_ATLAS)
- {
- this.addMenuItems(menu, ['fullscreen'], parent);
- }
+ }
+
+ var file = ui.getCurrentFile();
+
+ if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ {
+ this.addMenuItems(menu, ['-', 'showRemoteCursors',
+ 'shareCursor', '-'], parent);
+ }
+
+ menu.addSeparator(parent);
+
+ if (urlParams['sketch'] != '1' && ui.mode != App.MODE_ATLAS)
+ {
+ this.addMenuItems(menu, ['fullscreen'], parent);
}
if (urlParams['embedInline'] != '1' && Editor.isDarkMode() ||
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar.js b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
index 92cb70a0..05e96960 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
@@ -300,7 +300,8 @@
if (elts != null)
{
- var vis = (visible != null) ? ((visible) ? 'block' : 'none') : (elts[0].style.display == 'none') ? 'block' : 'none';
+ var vis = (visible != null) ? ((visible) ? 'block' : 'none') :
+ (elts[0].style.display == 'none') ? 'block' : 'none';
for (var i = 0; i < elts.length; i++)
{
@@ -612,44 +613,59 @@
{
if (mxEvent.getSource(evt).nodeName == 'BUTTON')
{
- var title2 = title.cloneNode(true);
- title2.style.backgroundImage = '';
- title2.style.textDecoration = 'none';
- title2.style.fontWeight = 'bold';
- title2.style.fontSize = '14px';
- title2.style.color = 'rgb(80, 80, 80)';
- title2.style.width = '456px';
- title2.style.backgroundColor = '#ffffff';
- title2.style.paddingLeft = '6px';
+ var svgs = content.getElementsByTagName('svg');
+ var w = 456;
+ var h = (Math.ceil(svgs.length / 6) + 1) * this.thumbHeight;
+ var root = Graph.createSvgNode(0, 0, w, h, '#ffffff');
- var btn2 = title2.getElementsByTagName('button')[0];
- btn2.parentNode.removeChild(btn2);
-
- var clone = content.cloneNode(true);
- clone.style.backgroundColor = '#ffffff';
- clone.style.borderColor = 'transparent';
- clone.style.width = '456px';
-
- var parser = new DOMParser();
- var doc = parser.parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">' +
- title2.outerHTML + clone.outerHTML + '</body>', 'text/html');
-
- this.editorUi.editor.convertImages(doc.documentElement, mxUtils.bind(this, function(body)
+ // Adds title
+ var canvas = new mxSvgCanvas2D(root);
+ canvas.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);
+ canvas.setFontStyle(mxConstants.FONT_BOLD);
+ canvas.setFontColor('rgb(80, 80, 80)');
+ canvas.setFontSize(14);
+
+ // Extracts title text
+ var children = title.childNodes;
+
+ for (var i = 0; i < children.length; i++)
{
- var html = '<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" ' +
- 'href="https://www.draw.io/styles/grapheditor.css"></head>' +
- mxUtils.getXml(body) + '</html>';
-
- clone.style.position = 'absolute';
- window.document.body.appendChild(clone);
- var h = clone.clientHeight + 18;
- clone.parentNode.removeChild(clone);
-
- this.editorUi.confirm('Image data created', mxUtils.bind(this, function()
+ if (children[i].nodeType == mxConstants.NODETYPE_TEXT)
{
- new mxXmlRequest(EXPORT_URL, 'w=456&h=' + h + '&html=' + encodeURIComponent(
- Graph.compress(html))).simulate(document, '_blank');
- }), null, mxResources.get('save'), mxResources.get('cancel'));
+ canvas.plainText(6, 0, 0, 0, mxUtils.getTextContent(children[i]));
+
+ break;
+ }
+ }
+
+ for (var i = 0; i < svgs.length; i++)
+ {
+ var svg = svgs[i];
+ var clone = svg.cloneNode(true);
+ clone.removeAttribute('style');
+ clone.setAttribute('width', this.thumbWidth);
+ clone.setAttribute('height', this.thumbHeight);
+ clone.setAttribute('x', 12 + mxUtils.mod(i, 6) * 68);
+ clone.setAttribute('y', 24 + Math.floor(i / 6) * 68);
+ root.appendChild(clone);
+ }
+
+ this.editorUi.editor.convertImages(root, mxUtils.bind(this, function(body)
+ {
+ var canvas = document.createElement('canvas');
+ canvas.width = w;
+ canvas.height = h;
+
+ var img = document.createElement('img');
+ img.onload = mxUtils.bind(this, function()
+ {
+ var ctx = canvas.getContext('2d');
+ ctx.drawImage(img, 0, 0)
+ this.editorUi.saveCanvas(canvas, null, 'png');
+ });
+
+ var xml = Graph.xmlDeclaration + '\n' + Graph.svgDoctype + '\n' + mxUtils.getXml(root);
+ img.src = Editor.createSvgDataUri(xml);
}));
return;
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index 3a3a7315..3b2bb48f 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -1381,6 +1381,70 @@ Graph.createSvgImage = function(w, h, data, coordWidth, coordHeight)
return new mxImage('data:image/svg+xml;base64,' + ((window.btoa) ? btoa(tmp) : Base64.encode(tmp, true)), w, h)
};
+
+/**
+ * Helper function for creating an SVG node.
+ */
+Graph.createSvgNode = function(x, y, w, h, background)
+{
+ var svgDoc = mxUtils.createXmlDocument();
+ var root = (svgDoc.createElementNS != null) ?
+ svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') :
+ svgDoc.createElement('svg');
+
+ if (background != null)
+ {
+ if (root.style != null)
+ {
+ root.style.backgroundColor = background;
+ }
+ else
+ {
+ root.setAttribute('style', 'background-color:' + background);
+ }
+ }
+
+ if (svgDoc.createElementNS == null)
+ {
+ root.setAttribute('xmlns', mxConstants.NS_SVG);
+ root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+ }
+ else
+ {
+ // KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+ root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+ }
+
+ root.setAttribute('version', '1.1');
+ root.setAttribute('width', w + 'px');
+ root.setAttribute('height', h + 'px');
+ root.setAttribute('viewBox', x + ' ' + y + ' ' + w + ' ' + h);
+ svgDoc.appendChild(root);
+
+ return root;
+};
+
+/**
+ * Helper function for creating an SVG node.
+ */
+Graph.htmlToPng = function(html, w, h, fn)
+{
+ var canvas = document.createElement('canvas');
+ canvas.width = w;
+ canvas.height = h;
+
+ var img = document.createElement('img');
+ img.onload = mxUtils.bind(this, function()
+ {
+ var ctx = canvas.getContext('2d');
+ ctx.drawImage(img, 0, 0)
+
+ fn(canvas.toDataURL());
+ });
+
+ img.src = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">' +
+ '<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>');
+};
/**
* Removes all illegal control characters with ASCII code <32 except TAB, LF
@@ -10081,45 +10145,15 @@ if (typeof mxVertexHandler !== 'undefined')
}
// Prepares SVG document that holds the output
- var svgDoc = mxUtils.createXmlDocument();
- var root = (svgDoc.createElementNS != null) ?
- svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
-
- if (background != null)
- {
- if (root.style != null)
- {
- root.style.backgroundColor = background;
- }
- else
- {
- root.setAttribute('style', 'background-color:' + background);
- }
- }
-
- if (svgDoc.createElementNS == null)
- {
- root.setAttribute('xmlns', mxConstants.NS_SVG);
- root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
- }
- else
- {
- // KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
- root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
- }
-
var s = scale / vs;
var w = Math.max(1, Math.ceil(bounds.width * s) + 2 * border) +
((hasShadow && border == 0) ? 5 : 0);
var h = Math.max(1, Math.ceil(bounds.height * s) + 2 * border) +
((hasShadow && border == 0) ? 5 : 0);
-
- root.setAttribute('version', '1.1');
- root.setAttribute('width', w + 'px');
- root.setAttribute('height', h + 'px');
- root.setAttribute('viewBox', ((crisp) ? '-0.5 -0.5' : '0 0') + ' ' + w + ' ' + h);
- svgDoc.appendChild(root);
-
+ var tmp = (crisp) ? -0.5 : 0;
+ var root = Graph.createSvgNode(tmp, tmp, w, h, background);
+ var svgDoc = root.ownerDocument;
+
// Renders graph. Offset will be multiplied with state's scale when painting state.
// TextOffset only seems to affect FF output but used everywhere for consistency.
var group = (svgDoc.createElementNS != null) ?
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index c5b2e4f5..611bf487 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -468,7 +468,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"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.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:"18.0.7",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.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:"18.0.8",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]"!==
@@ -2421,8 +2421,8 @@ this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPatt
n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var L=e.getCellStyle(I,!1),H=[],S=[],V;for(V in L)H.push(L[V]),S.push(V);e.getModel().isEdge(I)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",H,"cells",[I]))}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);
e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<u.length;c++)0>mxUtils.indexOf(d,u[c])&&d.push(u[c]);var m="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),r=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(c=0;c<r.length;c++)for(f=0;f<r[c].length;f++)d.push(r[c][f]);for(c=0;c<k.length;c++)0>mxUtils.indexOf(d,k[c])&&d.push(k[c]);var x=function(I,L,H,S,V,ea,ka){S=null!=S?S:e.currentVertexStyle;V=null!=V?V:e.currentEdgeStyle;ea=null!=ea?ea:!0;H=null!=H?H:e.getModel();if(ka){ka=[];for(var wa=0;wa<I.length;wa++)ka=ka.concat(H.getDescendants(I[wa]));I=ka}H.beginUpdate();try{for(wa=0;wa<I.length;wa++){var W=I[wa];if(L)var Z=["fontSize",
-"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Fa=va[Ja],sa=Fa.indexOf("=");if(0<=sa){var za=Fa.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ga=r[ka];if(0<=mxUtils.indexOf(Ga,za))for(var Ta=0;Ta<Ga.length;Ta++){var eb=mxUtils.indexOf(Z,Ga[Ta]);0<=eb&&Z.splice(eb,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Xa=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
-null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Xa=mxUtils.setStyle(Xa,za,Ya))}Editor.simpleLabels&&(Xa=mxUtils.setStyle(mxUtils.setStyle(Xa,"html",null),"whiteSpace",null));H.setStyle(W,Xa)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
+"fontFamily","fontColor"];else{var oa=H.getStyle(W),va=null!=oa?oa.split(";"):[];Z=d.slice();for(var Ja=0;Ja<va.length;Ja++){var Ga=va[Ja],sa=Ga.indexOf("=");if(0<=sa){var za=Ga.substring(0,sa),ra=mxUtils.indexOf(Z,za);0<=ra&&Z.splice(ra,1);for(ka=0;ka<r.length;ka++){var Ha=r[ka];if(0<=mxUtils.indexOf(Ha,za))for(var Ta=0;Ta<Ha.length;Ta++){var db=mxUtils.indexOf(Z,Ha[Ta]);0<=db&&Z.splice(db,1)}}}}}var Ua=H.isEdge(W);ka=Ua?V:S;var Va=H.getStyle(W);for(Ja=0;Ja<Z.length;Ja++){za=Z[Ja];var Ya=ka[za];
+null!=Ya&&"edgeStyle"!=za&&("shape"!=za||Ua)&&(!Ua||ea||0>mxUtils.indexOf(n,za))&&(Va=mxUtils.setStyle(Va,za,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));H.setStyle(W,Va)}}finally{H.endUpdate()}return I};e.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(I,L){x(L.getProperty("cells"),!0)});this.insertHandler=x;this.createDivs();this.createUi();this.refresh();
var A=mxUtils.bind(this,function(I){null==I&&(I=window.event);return e.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=A,this.menubarContainer.onmousedown=A,this.toolbarContainer.onselectstart=A,this.toolbarContainer.onmousedown=A,this.diagramContainer.onselectstart=A,this.diagramContainer.onmousedown=A,this.sidebarContainer.onselectstart=A,this.sidebarContainer.onmousedown=A,this.formatContainer.onselectstart=A,this.formatContainer.onmousedown=
A,this.footerContainer.onselectstart=A,this.footerContainer.onmousedown=A,null!=this.tabContainer&&(this.tabContainer.onselectstart=A));!this.editor.chromeless||this.editor.editable?(c=function(I){if(null!=I){var L=mxEvent.getSource(I);if("A"==L.nodeName)for(;null!=L;){if("geHint"==L.className)return!0;L=L.parentNode}}return A(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=
c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var C=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();C.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var L=mxUtils.getOffset(this.diagramContainer);
@@ -2486,8 +2486,8 @@ null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.a
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*S.width),this.scale*(this.translate.y+H.y*S.height),this.scale*H.width*S.width,
this.scale*H.height*S.height)};a.getPreferredPageSize=function(H,S,V){H=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,H.width*S.width,H.height*S.height)};var c=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(H,S,V,ea){if(null!=a.container&&!a.isViewer()){V=null!=V?V:0;ea=null!=ea?ea:0;var ka=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,Z=a.view.scale,
-oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Fa=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Fa/oa.width)):Z;S=(Fa-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
-ka.width<Fa||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+oa=mxRectangle.fromRectangle(ka);oa.x=oa.x/Z-W.x;oa.y=oa.y/Z-W.y;oa.width/=Z;oa.height/=Z;W=a.container.scrollTop;var va=a.container.scrollLeft,Ja=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ja+=3;var Ga=a.container.offsetWidth-Ja;Ja=a.container.offsetHeight-Ja;H=H?Math.max(.3,Math.min(S||1,Ga/oa.width)):Z;S=(Ga-H*oa.width)/2/H;var sa=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),sa=Math.max(sa,0));if(wa||
+ka.width<Ga||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(sa-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=va*H/Z;else if(0!=V||0!=ea)ka=a.view.translate,a.view.setTranslate(Math.floor(ka.x+V/Z),Math.floor(ka.y+ea/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(H){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(H){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(H,S,V){k++;
@@ -2779,27 +2779,27 @@ e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mx
2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,c){var f=!0;null!=c&&1==a.length&&(a=this.graph.getCellStyle(a[c]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
Sidebar.prototype.createDragSource=function(a,c,f,e,g){function d(Z,oa){var va=mxUtils.createImage(Z.src);va.style.width=Z.width+"px";va.style.height=Z.height+"px";null!=oa&&va.setAttribute("title",oa);mxUtils.setOpacity(va,Z==this.refreshTarget?30:20);va.style.position="absolute";va.style.cursor="crosshair";return va}function k(Z,oa,va,Ja){null!=Ja.parentNode&&(mxUtils.contains(va,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return va}for(var n=this.editorUi,u=n.editor.graph,
-m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Fa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
+m=null,r=null,x=this,A=0;A<e.length&&(null==r&&u.model.isVertex(e[A])?r=A:null==m&&u.model.isEdge(e[A])&&null==u.model.getTerminal(e[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,va,Ja,Ga){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&L==fa){var sa=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];sa=this.updateShapes(Z.model.isEdge(R.cell)?e[0]:e[r],sa);Z.setSelectionCells(sa)}else null!=
e&&null!=L&&null!=E&&L!=fa?(sa=Z.model.isEdge(E.cell)||null==m?r:m,Z.setSelectionCells(this.dropAndConnect(E.cell,e,I,sa,oa))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(Z.view.getState(Z.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(Z,oa){F.isActive()&&F.reset()});var K=F.mouseDown;F.mouseDown=function(Z){mxEvent.isPopupTrigger(Z)||mxEvent.isMultiTouchEvent(Z)||u.isCellLocked(u.getDefaultParent())||(u.stopEditing(),
K.apply(this,arguments))};var E=null,O=null,R=null,Q=!1,P=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),T=d(this.triangleDown,mxResources.get("connect")),U=d(this.triangleLeft,mxResources.get("connect")),fa=d(this.refreshTarget,mxResources.get("replace")),ha=null,ba=d(this.roundDrop),qa=d(this.roundDrop),I=mxConstants.DIRECTION_NORTH,L=null,H=F.createPreviewElement;F.createPreviewElement=function(Z){var oa=H.apply(this,arguments);mxClient.IS_SVG&&
(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var S=F.dragEnter;F.dragEnter=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");S.apply(this,arguments)};var V=F.dragExit;F.dragExit=function(Z,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");V.apply(this,arguments)};F.dragOver=function(Z,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=L&&this.currentGuide.hide();
-if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Fa=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
-sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ga=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ga=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Fa.x-sa)*va.scale+Ga+"px";this.previewElement.style.top=(Fa.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Fa.width*va.scale+"px",
-this.previewElement.style.height=Fa.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
-this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Fa=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,eb,Ua){return Z.isContainer(Ta.cell)});if(null!=Fa&&!this.graph.isCellConnectable(Fa)&&!this.graph.model.isEdge(Fa)){var sa=this.graph.getModel().getParent(Fa);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
-(Fa=sa)}Z.isCellLocked(Fa)&&(Fa=null);var za=Z.view.getState(Fa);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
+if(null!=this.previewElement){var va=Z.view;if(null!=R&&L==fa)this.previewElement.style.display=Z.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=E&&null!=L){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=Z.model.isEdge(E.cell)||null==m?r:m,Ga=x.getDropAndConnectGeometry(E.cell,e[Ja],I,e),
+sa=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(e[Ja]),ra=Z.model.getParent(E.cell),Ha=va.translate.x*va.scale,Ta=va.translate.y*va.scale;null!=sa&&!sa.relative&&Z.model.isVertex(ra)&&ra!=va.currentRoot&&(Ta=va.getState(ra),Ha=Ta.x,Ta=Ta.y);sa=za.x;za=za.y;Z.model.isEdge(e[Ja])&&(za=sa=0);this.previewElement.style.left=(Ga.x-sa)*va.scale+Ha+"px";this.previewElement.style.top=(Ga.y-za)*va.scale+Ta+"px";1==e.length&&(this.previewElement.style.width=Ga.width*va.scale+"px",
+this.previewElement.style.height=Ga.height*va.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&Z.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*va.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*va.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
+this.previewElement.style.display="")}};var ea=(new Date).getTime(),ka=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,va,Ja){var Ga=mxEvent.isAltDown(Ja)||null==e?null:Z.getCellAt(oa,va,null,null,null,function(Ta,db,Ua){return Z.isContainer(Ta.cell)});if(null!=Ga&&!this.graph.isCellConnectable(Ga)&&!this.graph.model.isEdge(Ga)){var sa=this.graph.getModel().getParent(Ga);this.graph.getModel().isVertex(sa)&&this.graph.isCellConnectable(sa)&&
+(Ga=sa)}Z.isCellLocked(Ga)&&(Ga=null);var za=Z.view.getState(Ga);sa=L=null;wa!=za?(ea=(new Date).getTime(),ka=0,wa=za,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=za&&(this.updateThread=window.setTimeout(function(){null==L&&(wa=za,F.getDropTarget(Z,oa,va,Ja))},this.dropTargetDelay+10))):ka=(new Date).getTime()-ea;if(C&&2500>ka&&null!=za&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(za.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(za.style,
mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(za.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ka||Z.model.isEdge(za.cell))&&ka>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(za)&&(Z.model.isVertex(za.cell)&&null!=r||Z.model.isEdge(za.cell)&&Z.model.isEdge(e[0]))){if(Z.isCellEditable(za.cell)){R=
za;var ra=Z.model.isEdge(za.cell)?Z.view.getPoint(za):new mxPoint(za.getCenterX(),za.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);fa.style.left=Math.floor(ra.x)+"px";fa.style.top=Math.floor(ra.y)+"px";null==ha&&(Z.container.appendChild(fa),ha=fa.parentNode);k(oa,va,ra,fa)}}else null==R||!mxUtils.contains(R,oa,va)||1500<ka&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ha&&(fa.parentNode.removeChild(fa),
-ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ga=E.absolutePoints;null!=ba.parentNode&&(ra=Ga[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ga=Ga[Ga.length-1],sa.add(k(oa,va,new mxRectangle(Ga.x-this.roundDrop.width/2,Ga.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ga&&(ra.x-=
-Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
+ha=null)):null!=R&&null!=ha&&(ra=Z.model.isEdge(R.cell)?Z.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,va,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){sa=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ha=E.absolutePoints;null!=ba.parentNode&&(ra=Ha[0],sa.add(k(oa,va,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Ha=Ha[Ha.length-1],sa.add(k(oa,va,new mxRectangle(Ha.x-this.roundDrop.width/2,Ha.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(E),null!=E.shape&&null!=E.shape.boundingBox&&(ra=mxRectangle.fromRectangle(E.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(E.cell),null!=Ha&&(ra.x-=
+Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),sa.add(k(oa,va,new mxRectangle(ra.x+
ra.width,E.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),sa.add(k(oa,va,new mxRectangle(E.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),T)),sa.add(k(oa,va,new mxRectangle(ra.x-this.triangleLeft.width,E.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),U));null!=sa&&sa.grow(10)}I=mxConstants.DIRECTION_NORTH;L==aa?I=mxConstants.DIRECTION_EAST:L==T||L==
-qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Fa)&&null!=r||Z.model.isVertex(Fa)&&Z.isCellConnectable(Fa));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Fa)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Fa)?
-(Ga=za.absolutePoints,null!=Ga&&(ra=Ga[0],Ga=Ga[Ga.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ga.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ga.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Fa,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Fa,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
-null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ga=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ga&&(ra.x-=Ga.horizontalOffset/2,ra.y-=Ga.verticalOffset/2,ra.width+=Ga.horizontalOffset,ra.height+=Ga.verticalOffset,null!=Ga.rotationShape&&null!=Ga.rotationShape.node&&"hidden"!=Ga.rotationShape.node.style.visibility&&"none"!=Ga.rotationShape.node.style.display&&null!=
-Ga.rotationShape.boundingBox&&ra.add(Ga.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
-(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Fa=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);sa=Z.getModel();if(null!=Fa&&(null!=L||!Z.isSplitTarget(Fa,e,Ja))){for(;null!=Fa&&!Z.isValidDropTarget(Fa,e,Ja)&&sa.isVertex(sa.getParent(Fa));)Fa=sa.getParent(Fa);null!=Fa&&(Z.view.currentRoot==Fa||!Z.isValidRoot(Fa)&&0==Z.getModel().getChildCount(Fa)||Z.isCellLocked(Fa)||sa.isEdge(Fa)||!Z.isValidDropTarget(Fa,e,Ja))&&(Fa=null)}Z.isCellLocked(Fa)&&(Fa=null);return Fa});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
+qa?I=mxConstants.DIRECTION_SOUTH:L==U&&(I=mxConstants.DIRECTION_WEST);null!=R&&L==fa&&(za=R);ra=(null==r||Z.isCellConnectable(e[r]))&&(Z.model.isEdge(Ga)&&null!=r||Z.model.isVertex(Ga)&&Z.isCellConnectable(Ga));if(null!=E&&5E3<=ka||E!=za&&(null==sa||!mxUtils.contains(sa,oa,va)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Ga)?za:null,null!=E&&ra){sa=[ba,qa,P,aa,T,U];for(ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Z.model.isEdge(Ga)?
+(Ha=za.absolutePoints,null!=Ha&&(ra=Ha[0],Ha=Ha[Ha.length-1],sa=Z.tolerance,new mxRectangle(oa-sa,va-sa,2*sa,2*sa),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Ha.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Ha.y-this.roundDrop.height/2)+"px",null==Z.model.getTerminal(Ga,!0)&&Z.container.appendChild(ba),null==Z.model.getTerminal(Ga,!1)&&Z.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(za),
+null!=za.shape&&null!=za.shape.boundingBox&&(ra=mxRectangle.fromRectangle(za.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Ha=this.graph.selectionCellsHandler.getHandler(za.cell),null!=Ha&&(ra.x-=Ha.horizontalOffset/2,ra.y-=Ha.verticalOffset/2,ra.width+=Ha.horizontalOffset,ra.height+=Ha.verticalOffset,null!=Ha.rotationShape&&null!=Ha.rotationShape.node&&"hidden"!=Ha.rotationShape.node.style.visibility&&"none"!=Ha.rotationShape.node.style.display&&null!=
+Ha.rotationShape.boundingBox&&ra.add(Ha.rotationShape.boundingBox)),P.style.left=Math.floor(za.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(ra.x+ra.width)+"px",aa.style.top=Math.floor(za.getCenterY()-this.triangleRight.height/2)+"px",T.style.left=P.style.left,T.style.top=Math.floor(ra.y+ra.height)+"px",U.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",U.style.top=aa.style.top,"eastwest"!=za.style.portConstraint&&
+(Z.container.appendChild(P),Z.container.appendChild(T)),Z.container.appendChild(aa),Z.container.appendChild(U));null!=za&&(O=Z.selectionCellsHandler.getHandler(za.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));Q=!0}else for(sa=[ba,qa,P,aa,T,U],ra=0;ra<sa.length;ra++)null!=sa[ra].parentNode&&sa[ra].parentNode.removeChild(sa[ra]);Q||null==O||O.setHandlesVisible(!0);Ga=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&L==fa?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);sa=Z.getModel();if(null!=Ga&&(null!=L||!Z.isSplitTarget(Ga,e,Ja))){for(;null!=Ga&&!Z.isValidDropTarget(Ga,e,Ja)&&sa.isVertex(sa.getParent(Ga));)Ga=sa.getParent(Ga);null!=Ga&&(Z.view.currentRoot==Ga||!Z.isValidRoot(Ga)&&0==Z.getModel().getChildCount(Ga)||Z.isCellLocked(Ga)||sa.isEdge(Ga)||!Z.isValidDropTarget(Ga,e,Ja))&&(Ga=null)}Z.isCellLocked(Ga)&&(Ga=null);return Ga});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var Z=[ba,qa,fa,P,aa,T,U],oa=0;oa<Z.length;oa++)null!=
Z[oa].parentNode&&Z[oa].parentNode.removeChild(Z[oa]);null!=E&&null!=O&&O.reset();L=ha=R=E=O=null};return F};
Sidebar.prototype.itemClicked=function(a,c,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){c=null;for(var g=0;g<a.length&&null==c;g++)e.model.isVertex(a[g])&&(c=g);null!=c&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),c.drop(e,f,null,a.x,a.y,!0))};
@@ -2860,6 +2860,8 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
Graph.createSvgImage=function(a,c,f,e,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=g?'viewBox="0 0 '+e+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,c)};
+Graph.createSvgNode=function(a,c,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
+k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+c+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,c,f,e){var g=document.createElement("canvas");g.width=c;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
Graph.zapGremlins=function(a){for(var c=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&f.push(a.substring(c));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(c,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){a=mxUtils.getXml(a);return Graph.compress(c?a:Graph.zapGremlins(a))};
Graph.arrayBufferToString=function(a){var c="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)c+=String.fromCharCode(a[e]);return c};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(c){return c.charCodeAt(0)})};
@@ -3059,13 +3061,13 @@ B=this.snap(B));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.move
null==D.get(this.model.getParent(t[G]))&&(ja.offset=null,ja.relative=!1,ja.x=da.x/da.view.scale-da.view.translate.x,ja.y=da.y/da.view.scale-da.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),B);return M.encode(X)};Graph.prototype.isSwimlane=function(t,z){var B=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(B=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==
B};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var B=this.getCurrentCellStyle(z);if(null!=B.expand)return"0"!=B.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,B,D,G,M,X,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(M,X,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,
[t,z,B,D,G,M,X,ia]);this.model.setValue(B,"");var da=this.getChildCells(B,!0);for(z=0;z<da.length;z++){var ja=this.getCellGeometry(da[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(da[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ja=this.getCellGeometry(ta[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[B]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[B]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Ha=this.getCurrentCellStyle(Ba);null!=Ha&&"1"==Ha.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
+null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(B,!1);if(null!=Ba){var Da=this.getCurrentCellStyle(Ba);null!=Da&&"1"==Da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
function(t,z,B){if(z||B)m.apply(this,arguments);else{var D=this.getSelectionCell(),G=null,M=[],X=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(M.push(ia),ia==D)G=M.length-1;else if(t&&null==D&&0<M.length||null!=G&&t&&M.length>G||!t&&0<G)return;for(var da=0;da<this.model.getChildCount(ia);da++)X(this.model.getChildAt(ia,da))});X(this.model.root);0<M.length&&(G=null!=G?mxUtils.mod(G+(t?1:-1),M.length):0,this.setSelectionCell(M[G]))}};
Graph.prototype.swapShapes=function(t,z,B,D,G,M,X){z=!1;if(!D&&null!=G&&1==t.length&&(D=this.view.getState(G),B=this.view.getState(t[0]),null!=D&&null!=B&&(null!=M&&mxEvent.isShiftDown(M)||"umlLifeline"==D.style.shape&&"umlLifeline"==B.style.shape)&&(D=this.getCellGeometry(G),M=this.getCellGeometry(t[0]),null!=D&&null!=M))){z=D.clone();D=M.clone();D.x=z.x;D.y=z.y;z.x=M.x;z.y=M.y;this.model.beginUpdate();try{this.model.setGeometry(G,z),this.model.setGeometry(t[0],D)}finally{this.model.endUpdate()}z=
!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,B,D,G,M,X){if(this.swapShapes(t,z,B,D,G,M,X))return t;X=null!=X?X:{};if(this.isTable(G)){for(var ia=[],da=0;da<t.length;da++)this.isTable(t[da])?ia=ia.concat(this.model.getChildCells(t[da],!0).reverse()):ia.push(t[da]);t=ia}this.model.beginUpdate();try{ia=[];for(da=0;da<t.length;da++)if(null!=G&&this.isTableRow(t[da])){var ja=this.model.getParent(t[da]),ta=this.getCellGeometry(t[da]);this.isTable(ja)&&ia.push(ja);
-if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Ha=this.model.getChildCells(G,!0);if(0<Ha.length){t[da]=D?this.cloneCell(t[da]):t[da];var Na=this.model.getChildCells(t[da],!0),Ma=this.model.getChildCells(Ha[0],!0),Ia=Ma.length-Na.length;if(0<Ia)for(var Ea=
-0;Ea<Ia;Ea++){var Da=this.cloneCell(Na[Na.length-1]);null!=Da&&(Da.value="",this.model.add(t[da],Da))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Na[Na.length+Ea-1]);Na=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<Ma.length;Ea++){var La=this.getCellGeometry(Ma[Ea]),Oa=this.getCellGeometry(Na[Ea]);null!=La&&null!=Oa&&(Oa=Oa.clone(),Oa.width=La.width,this.model.setGeometry(Na[Ea],Oa))}}}}var Ra=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
-this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Ra)}finally{this.model.endUpdate()}return Ra};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
+if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=ta.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=ta.height,this.model.setGeometry(G,Ba));var Da=this.model.getChildCells(G,!0);if(0<Da.length){t[da]=D?this.cloneCell(t[da]):t[da];var Ma=this.model.getChildCells(t[da],!0),La=this.model.getChildCells(Da[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Ea=
+0;Ea<Ia;Ea++){var Fa=this.cloneCell(Ma[Ma.length-1]);null!=Fa&&(Fa.value="",this.model.add(t[da],Fa))}else if(0>Ia)for(Ea=0;Ea>Ia;Ea--)this.model.remove(Ma[Ma.length+Ea-1]);Ma=this.model.getChildCells(t[da],!0);for(Ea=0;Ea<La.length;Ea++){var Oa=this.getCellGeometry(La[Ea]),Pa=this.getCellGeometry(Ma[Ea]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Ea],Pa))}}}}var Na=r.apply(this,arguments);for(da=0;da<ia.length;da++)!D&&this.model.contains(ia[da])&&0==this.model.getChildCount(ia[da])&&
+this.model.remove(ia[da]);D&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var B=[];this.model.beginUpdate();try{for(var D=0;D<t.length;D++)if(this.isTableCell(t[D])){var G=this.model.getParent(t[D]),M=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(M)?0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M)&&B.push(M):this.labelChanged(t[D],
"")}else{if(this.isTableRow(t[D])&&(M=this.model.getParent(t[D]),0>mxUtils.indexOf(t,M)&&0>mxUtils.indexOf(B,M))){for(var X=this.model.getChildCells(M,!0),ia=0,da=0;da<X.length;da++)0<=mxUtils.indexOf(t,X[da])&&ia++;ia==X.length&&B.push(M)}B.push(t[D])}B=x.apply(this,[B,z])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(t,z,B){B=null!=B?B:new Graph;for(var D=0;D<z.length;D++)null!=z[D]&&B.updateCustomLinksForCell(t,z[D],B)};Graph.prototype.updateCustomLinksForCell=
function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var B=this.model.getChildCount(z),D=0;D<B;D++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,D))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var B=JSON.parse(z);for(z=0;z<B.length;z++){var D=B[z];t.push(new mxConnectionConstraint(new mxPoint(D[0],D[1]),2<D.length?"0"!=D[2]:!0,null,3<D.length?
D[3]:0,4<D.length?D[4]:0))}}catch(M){}return t}if(null!=t.shape&&null!=t.shape.bounds){D=t.shape.direction;z=t.shape.bounds;var G=t.shape.scale;B=z.width/G;z=z.height/G;if(D==mxConstants.DIRECTION_NORTH||D==mxConstants.DIRECTION_SOUTH)D=B,B=z,z=D;z=t.shape.getConstraints(t.style,B,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
@@ -3073,9 +3075,9 @@ t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBO
function(t,z,B){for(var D=this.getCurrentCellStyle(t),G=!0,M=!0,X=0;X<z.length&&M;X++)G=G&&this.isTable(z[X]),M=M&&this.isTableRow(z[X]);return(1==z.length&&null!=B&&mxEvent.isShiftDown(B)&&!mxEvent.isControlDown(B)&&!mxEvent.isAltDown(B)||("1"!=mxUtils.getValue(D,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(D,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||M||G))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var B=this.model.getParent(t);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this,
arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var B=this.getModel(),D=[];B.beginUpdate();try{for(var G=0;G<t.length;G++){var M=t[G];if(B.isEdge(M)){var X=B.getTerminal(M,!0),ia=B.getTerminal(M,!1);B.setTerminal(M,ia,!0);B.setTerminal(M,X,!1);var da=B.getGeometry(M);if(null!=da){da=da.clone();null!=da.points&&da.points.reverse();var ja=da.getTerminalPoint(!0),ta=da.getTerminalPoint(!1);
-da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Ha=this.view.getState(X),Na=this.view.getState(ia);if(null!=Ba){var Ma=null!=Ha?this.getConnectionConstraint(Ba,Ha,!0):null,Ia=null!=Na?this.getConnectionConstraint(Ba,Na,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,Ma);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Da=da.width;da.width=da.height;da.height=Da;B.setGeometry(M,da)}var La=this.view.getState(M);if(null!=La){var Oa=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(La.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Oa[mxUtils.mod(mxUtils.indexOf(Oa,Ra)+(z?-1:1),Oa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
+da.setTerminalPoint(ja,!1);da.setTerminalPoint(ta,!0);B.setGeometry(M,da);var Ba=this.view.getState(M),Da=this.view.getState(X),Ma=this.view.getState(ia);if(null!=Ba){var La=null!=Da?this.getConnectionConstraint(Ba,Da,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Ba,Ma,!1):null;this.setConnectionConstraint(M,X,!0,Ia);this.setConnectionConstraint(M,ia,!1,La);var Ea=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[M])}D.push(M)}}else if(B.isVertex(M)&&(da=this.getCellGeometry(M),null!=da)){if(!(this.isTable(M)||this.isTableRow(M)||this.isTableCell(M)||this.isSwimlane(M))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Fa=da.width;da.width=da.height;da.height=Fa;B.setGeometry(M,da)}var Oa=this.view.getState(M);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[M])}D.push(M)}}}finally{B.endUpdate()}return D};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
t=t.nextSibling}return!1};var A=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var B=this.view.getState(z);null!=B&&null!=B.shape&&(this.view.invalidate(z),B.shape.bounds=null)}A.apply(this,arguments);
t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var B=this.view.getState(t[z]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}};
Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var B=Array.prototype.slice.call(t.attributes);attr=B.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var B=0;B<t.length;B++)z(t[B])}};Graph.prototype.updateLabelElements=function(t,z,B){t=null!=t?t:this.getSelectionCells();for(var D=document.createElement("div"),
@@ -3093,43 +3095,42 @@ z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.rou
D.geometry.relative=!0;D.connectable=!1;var G=this.view.getRelativePoint(B,t,z);D.geometry.x=Math.round(1E4*G.x)/1E4;D.geometry.y=Math.round(G.y);D.geometry.offset=new mxPoint(0,0);G=this.view.getPoint(B,D.geometry);var M=this.view.scale;D.geometry.offset=new mxPoint(Math.round((t-G.x)/M),Math.round((z-G.y)/M))}else G=this.view.translate,D.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",D.geometry.width=40,D.geometry.height=20,D.geometry.x=Math.round(t/this.view.scale)-
G.x-(null!=B?B.origin.x:0),D.geometry.y=Math.round(z/this.view.scale)-G.y-(null!=B?B.origin.y:0),D.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([D],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[D])),this.autoSizeCell(D)}finally{this.getModel().endUpdate()}return D};Graph.prototype.addClickHandler=function(t,z,B){var D=mxUtils.bind(this,function(){var da=this.container.getElementsByTagName("a");if(null!=da)for(var ja=0;ja<da.length;ja++){var ta=
this.getAbsoluteUrl(da[ja].getAttribute("href"));null!=ta&&(da[ja].setAttribute("rel",this.linkRelation),da[ja].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(da[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,D);D();var G=this.container.style.cursor,M=this.getTolerance(),X=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(da){var ja=
-da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Ha){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
+da.sourceState;if(null==ja||null==X.getLinkForCell(ja.cell))da=X.getCellAt(da.getGraphX(),da.getGraphY(),null,null,null,function(ta,Ba,Da){return null==X.getLinkForCell(ta.cell)}),ja=null==ja||X.model.isAncestor(da,ja.cell)?X.view.getState(da):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=X.container.scrollLeft;
this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(da,ja){if(X.isMouseDown)null!=this.currentLink&&(da=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(da>M||ja>M)&&this.clear());else{for(da=ja.getSource();null!=da&&"a"!=da.nodeName.toLowerCase();)da=da.parentNode;null!=da?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
X.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!X.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(da,ja){var ta=ja.getSource();for(da=ja.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-X.container.scrollLeft)<M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&
((mxEvent.isLeftMouseButton(da)||mxEvent.isMiddleMouseButton(da))&&!mxEvent.isPopupTrigger(da)||mxEvent.isTouchEvent(da))&&(null!=this.currentLink?(ta=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(da,this.currentLink),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":ta?X.linkTarget:"_top",X.openLink(this.currentLink,da),ja.consume())):null!=B&&!ja.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
M&&Math.abs(this.scrollTop-X.container.scrollTop)<M&&Math.abs(this.startX-ja.getGraphX())<M&&Math.abs(this.startY-ja.getGraphY())<M&&B(ja.getEvent()));this.clear()},activate:function(da){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(da.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(da.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(da))},clear:function(){null!=X.container&&(X.container.style.cursor=G);this.currentLink=this.currentState=
this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(da){};X.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(da){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var B=0;B<t.length;B++)this.isTableCell(t[B])&&(t[B]=this.model.getParent(t[B]));t=this.model.getTopmostCells(t);var D=this.getModel(),G=this.gridSize,M=[];D.beginUpdate();
-try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Ha=this.getCellGeometry(da[B]),Na=this.getCellGeometry(ja);null!=Ha&&null!=Na&&(Na=Na.clone(),Na.height+=Ha.height,D.setGeometry(ja,Na))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+try{var X={},ia=this.createCellLookup(t),da=this.cloneCells(t,!1,X,!0);for(B=0;B<t.length;B++){var ja=D.getParent(t[B]);if(null!=ja){var ta=this.moveCells([da[B]],G,G,!1)[0];M.push(ta);if(z)D.add(ja,da[B]);else{var Ba=ja.getIndex(t[B]);D.add(ja,da[B],Ba+1)}if(this.isTable(ja)){var Da=this.getCellGeometry(da[B]),Ma=this.getCellGeometry(ja);null!=Da&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,D.setGeometry(ja,Ma))}}else M.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,ia),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
"cells",da))}finally{D.endUpdate()}return M};Graph.prototype.insertImage=function(t,z,B){if(null!=t&&null!=this.cellEditor.textarea){for(var D=this.cellEditor.textarea.getElementsByTagName("img"),G=[],M=0;M<D.length;M++)G.push(D[M]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==G.length+1)for(M=t.length-1;0<=M;M--)if(0==M||t[M]!=G[M-1]){t[M].setAttribute("width",z);t[M].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(t){if(null!=
this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),B=[],D=0;D<z.length;D++)B.push(z[D]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==B.length+1)for(D=z.length-1;0<=D;D--)if(z[D]!=B[D-1]){for(z=z[D].getElementsByTagName("a");0<z.length;){for(B=z[0].parentNode;null!=z[0].firstChild;)B.insertBefore(z[0].firstChild,z[0]);
B.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var B=[],D=null,
-G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Ha){return t?Ba.x-Ha.x:Ba.y-Ha.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
+G=null,M=0;M<z.length;M++)if(this.getModel().isVertex(z[M])){var X=this.view.getState(z[M]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();D=null!=D?Math.max(D,ia):ia;G=null!=G?Math.min(G,ia):ia;B.push(X)}}if(2<B.length){B.sort(function(Ba,Da){return t?Ba.x-Da.x:Ba.y-Da.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);D=D/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var da=(D-G)/(B.length-1);D=G;for(M=1;M<B.length-1;M++){var ja=this.view.getState(this.model.getParent(B[M].cell)),
ta=this.getCellGeometry(B[M].cell);D+=da;null!=ta&&null!=ja&&(ta=ta.clone(),t?ta.x=Math.round(D-ta.width/2)-ja.origin.x:ta.y=Math.round(D-ta.height/2)-ja.origin.y,this.getModel().setGeometry(B[M].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,B){return this.getLinkForCell(z.cell)});
-return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Ha,Na){var Ma=null;if(null!=Na)for(Ma=new mxDictionary,ta=0;ta<Na.length;ta++)Ma.put(Na[ta],!0);if(Na=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
-B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Ha?this.view.getBackgroundPageBounds():M&&null==Ma||D||"diagram"==Ha?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Ha&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
-if(null==Ia)throw Error(mxResources.get("drawingEmpty"));var Da=mxUtils.createXmlDocument(),La=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"svg"):Da.createElement("svg");null!=t&&(null!=La.style?La.style.backgroundColor=t:La.setAttribute("style","background-color:"+t));null==Da.createElementNS?(La.setAttribute("xmlns",mxConstants.NS_SVG),La.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):La.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);t=z/
-Ea;var Oa=Math.max(1,Math.ceil(Ia.width*t)+2*B)+(ja&&0==B?5:0),Ra=Math.max(1,Math.ceil(Ia.height*t)+2*B)+(ja&&0==B?5:0);La.setAttribute("version","1.1");La.setAttribute("width",Oa+"px");La.setAttribute("height",Ra+"px");La.setAttribute("viewBox",(G?"-0.5 -0.5":"0 0")+" "+Oa+" "+Ra);Da.appendChild(La);var Sa=null!=Da.createElementNS?Da.createElementNS(mxConstants.NS_SVG,"g"):Da.createElement("g");La.appendChild(Sa);var Va=this.createSvgCanvas(Sa);Va.foOffset=G?-.5:0;Va.textOffset=G?-.5:0;Va.imageOffset=
-G?-.5:0;Va.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/Ea));var kb=document.createElement("div"),sb=Va.getAlternateText;Va.getAlternateText=function($a,lb,ab,fb,hb,Wa,gb,Qa,ob,xb,pb,qb,vb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(kb.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(kb.childNodes));for(var rb=Math.ceil(2*fb/this.state.fontSize),mb=[],b=0,h=0;(0==rb||b<rb)&&h<Wa.length;){var q=Wa.charCodeAt(h);if(10==q||13==q){if(0<b)break}else mb.push(Wa.charAt(h)),
-255>q&&b++;h++}mb.length<Wa.length&&1<Wa.length-mb.length&&(Wa=mxUtils.trim(mb.join(""))+"...");return Wa}catch(l){return sb.apply(this,arguments)}else return sb.apply(this,arguments)};var cb=this.backgroundImage;if(null!=cb){z=Ea/z;var nb=this.view.translate,tb=new mxRectangle((cb.x+nb.x)*z,(cb.y+nb.y)*z,cb.width*z,cb.height*z);mxUtils.intersects(Ia,tb)&&Va.image(cb.x+nb.x,cb.y+nb.y,cb.width,cb.height,cb.src,!0)}Va.scale(t);Va.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,
-jb=ia.getLinkForCellState;ia.getLinkForCellState=function($a,lb){var ab=jb.apply(this,arguments);return null==ab||$a.view.graph.isCustomLink(ab)?null:ab};ia.getLinkTargetForCellState=function($a,lb){return $a.view.graph.getLinkTargetForCell($a.cell)};ia.drawCellState=function($a,lb){for(var ab=$a.view.graph,fb=null!=Ma?Ma.get($a.cell):ab.isCellSelected($a.cell),hb=ab.model.getParent($a.cell);!(M&&null==Ma||fb)&&null!=hb;)fb=null!=Ma?Ma.get(hb):ab.isCellSelected(hb),hb=ab.model.getParent(hb);(M&&null==
-Ma||fb)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),Va);this.updateSvgLinks(La,da,!0);this.addForeignObjectWarning(Va,La);return La}finally{Na&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
-var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x",
-"50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};
-Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=
-t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;
-t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=
-0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=
-B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=
-M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,
-X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?
-D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);
-null!=Ba&&(ta.height=Ba.height)}B.add(X[t],ja,G+(z?0:1))}var Ha=this.getCellGeometry(D);null!=Ha&&(Ha=Ha.clone(),Ha.width+=ia,B.setGeometry(D,Ha))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();
-B.beginUpdate();try{var D=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?
-0:M.length-1]}var X=B.getChildCells(G,!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=
-this.getCellGeometry(D);null!=ta&&(ta=ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,
-t));for(D=t=0;D<G.length;D++){var ia=z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||
-(D=G[G.length-1]);z.remove(D);t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};
-Graph.prototype.insertColumn=function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
+return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,B,D,G,M,X,ia,da,ja,ta,Ba,Da,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;B=null!=B?
+B:0;G=null!=G?G:!0;M=null!=M?M:!0;X=null!=X?X:!0;ja=null!=ja?ja:!1;var Ia="page"==Da?this.view.getBackgroundPageBounds():M&&null==La||D||"diagram"==Da?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==Da&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));
+if(null==Ia)throw Error(mxResources.get("drawingEmpty"));D=z/Ea;Da=G?-.5:0;var Fa=Graph.createSvgNode(Da,Da,Math.max(1,Math.ceil(Ia.width*D)+2*B)+(ja&&0==B?5:0),Math.max(1,Math.ceil(Ia.height*D)+2*B)+(ja&&0==B?5:0),t),Oa=Fa.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Fa.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=G?-.5:0;Na.textOffset=G?-.5:0;Na.imageOffset=G?-.5:0;Na.translate(Math.floor(B/z-Ia.x/Ea),Math.floor(B/z-Ia.y/
+Ea));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function(ab,mb,Xa,ib,gb,Wa,qb,tb,nb,fb,Ra,rb,xb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(Sa.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var kb=Math.ceil(2*ib/this.state.fontSize),hb=[],ob=0,lb=0;(0==kb||ob<kb)&&lb<Wa.length;){var sb=Wa.charCodeAt(lb);if(10==sb||13==sb){if(0<ob)break}else hb.push(Wa.charAt(lb)),255>sb&&ob++;lb++}hb.length<Wa.length&&1<Wa.length-
+hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(b){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var Za=this.backgroundImage;if(null!=Za){t=Ea/z;var pb=this.view.translate;Da=new mxRectangle((Za.x+pb.x)*t,(Za.y+pb.y)*t,Za.width*t,Za.height*t);mxUtils.intersects(Ia,Da)&&Na.image(Za.x+pb.x,Za.y+pb.y,Za.width,Za.height,Za.src,!0)}Na.scale(D);Na.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var ub=ia.drawCellState,vb=ia.getLinkForCellState;ia.getLinkForCellState=
+function(ab,mb){var Xa=vb.apply(this,arguments);return null==Xa||ab.view.graph.isCustomLink(Xa)?null:Xa};ia.getLinkTargetForCellState=function(ab,mb){return ab.view.graph.getLinkTargetForCell(ab.cell)};ia.drawCellState=function(ab,mb){for(var Xa=ab.view.graph,ib=null!=La?La.get(ab.cell):Xa.isCellSelected(ab.cell),gb=Xa.model.getParent(ab.cell);!(M&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Xa.isCellSelected(gb),gb=Xa.model.getParent(gb);(M&&null==La||ib)&&ub.apply(this,arguments)};ia.drawState(this.getView().getState(this.model.root),
+Na);this.updateSvgLinks(Fa,da,!0);this.addForeignObjectWarning(Na,Fa);return Fa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var B=t.createElement("switch"),D=t.createElement("g");D.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");
+null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);
+B.appendChild(D);G.appendChild(t);B.appendChild(G);z.appendChild(B)}};Graph.prototype.updateSvgLinks=function(t,z,B){t=t.getElementsByTagName("a");for(var D=0;D<t.length;D++)if(null==t[D].getAttribute("target")){var G=t[D].getAttribute("href");null==G&&(G=t[D].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[D].setAttribute("target",z):B&&this.isCustomLink(G)&&t[D].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);
+t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;
+null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,B){for(;null!=t&&t.nodeName!=z;){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,B){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==B)return null;t=t.parentNode}return t};Graph.prototype.selectNode=
+function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var B=document.createRange();B.selectNode(t);z.removeAllRanges();z.addRange(B)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),B=z.createRange(),B.setEndPoint("StartToStart",t),B.select())};Graph.prototype.flipEdgePoints=function(t,z,B){var D=this.getCellGeometry(t);if(null!=D){D=D.clone();if(null!=D.points)for(var G=0;G<D.points.length;G++)z?D.points[G].x=B+(B-D.points[G].x):
+D.points[G].y=B+(B-D.points[G].y);G=function(M){null!=M&&(z?M.x=B+(B-M.x):M.y=B+(B-M.y))};G(D.getTerminalPoint(!0));G(D.getTerminalPoint(!1));this.model.setGeometry(t,D)}};Graph.prototype.flipChildren=function(t,z,B){this.model.beginUpdate();try{for(var D=this.model.getChildCount(t),G=0;G<D;G++){var M=this.model.getChildAt(t,G);if(this.model.isEdge(M))this.flipEdgePoints(M,z,B);else{var X=this.getCellGeometry(M);null!=X&&(X=X.clone(),z?X.x=B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(M,
+X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var B=[],D=0;D<t.length;D++)if(this.model.isEdge(t[D])){var G=this.view.getState(t[D]);null!=G&&this.flipEdgePoints(t[D],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var M=this.getCellGeometry(t[D]);null!=M&&this.flipChildren(t[D],z,z?M.getCenterX()-M.x:M.getCenterY()-M.y);
+B.push(t[D])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var B=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<t.length;D++){var G=this.model.getParent(t[D]);if(this.isTable(G)){var M=this.getCellGeometry(t[D]),X=this.getCellGeometry(G);null!=M&&null!=X&&(X=X.clone(),X.height-=M.height,this.model.setGeometry(G,X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):
+null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(B=[],D=0;D<ia.length;D++)this.model.contains(ia[D])&&(this.model.isVertex(ia[D])||this.model.isEdge(ia[D]))&&B.push(ia[D])}return B};Graph.prototype.insertTableColumn=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=0;if(this.isTableCell(t)){var M=B.getParent(t);D=B.getParent(M);G=mxUtils.indexOf(B.getChildCells(M,!0),t)}else this.isTableRow(t)?D=B.getParent(t):t=B.getChildCells(D,!0)[0],z||(G=B.getChildCells(t,
+!0).length-1);var X=B.getChildCells(D,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var da=B.getChildCells(X[t],!0)[G],ja=B.cloneCell(da,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ia=ta.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(ta.height=Ba.height)}B.add(X[t],
+ja,G+(z?0:1))}var Da=this.getCellGeometry(D);null!=Da&&(Da=Da.clone(),Da.width+=ia,B.setGeometry(D,Da))}finally{B.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var D=z.getChildCells(B,!0);0==D.length?z.remove(B):(B==t&&(t=D[D.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=null;
+if("stackLayout"==this.getCurrentCellStyle(t).childLayout){D=t;var G=B.getChildCells(D,!0);t=G[z?0:G.length-1]}else D=B.getParent(t);var M=D.getIndex(t);t=B.cloneCell(t,!1);t.value=null;B.add(D,t,M+(z?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var B=this.getModel();B.beginUpdate();try{var D=t,G=t;if(this.isTableCell(t))G=B.getParent(t),D=B.getParent(G);else if(this.isTableRow(t))D=B.getParent(t);else{var M=B.getChildCells(D,!0);G=M[z?0:M.length-1]}var X=B.getChildCells(G,
+!0),ia=D.getIndex(G);G=B.cloneCell(G,!1);G.value=null;var da=this.getCellGeometry(G);if(null!=da){for(M=0;M<X.length;M++){t=B.cloneCell(X[M],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=da.height);G.insert(t)}B.add(D,G,ia+(z?0:1));var ta=this.getCellGeometry(D);null!=ta&&(ta=
+ta.clone(),ta.height+=da.height,B.setGeometry(D,ta))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(D=z.getParent(t));this.isTableRow(D)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(0==G.length)z.remove(B);else{this.isTableRow(D)||(D=G[0]);var M=z.getChildCells(D,!0);if(1>=M.length)z.remove(B);else{var X=M.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(M,t));for(D=t=0;D<G.length;D++){var ia=
+z.getChildCells(G[D],!0)[X];z.remove(ia);var da=this.getCellGeometry(ia);null!=da&&(t=Math.max(t,da.width))}var ja=this.getCellGeometry(B);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(B,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var B=t,D=t;this.isTableCell(t)&&(t=D=z.getParent(t));this.isTableRow(t)&&(B=z.getParent(D));var G=z.getChildCells(B,!0);if(1>=G.length)z.remove(B);else{this.isTableRow(D)||(D=G[G.length-1]);z.remove(D);
+t=0;var M=this.getCellGeometry(D);null!=M&&(t=M.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(B,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var B=t.tBodies[0],D=B.rows[0].cells,G=t=0;G<D.length;G++){var M=D[G].getAttribute("colspan");t+=null!=M?parseInt(M):1}z=B.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
+function(t,z){var B=t.tHead;if(null!=B)for(var D=0;D<B.rows.length;D++){var G=document.createElement("th");B.rows[D].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(B=0;B<t.rows.length;B++)D=t.rows[B].insertCell(z),mxUtils.br(D);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var B=0;B<t.length;B++)t[B].cells.length>z&&t[B].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var B=document.createElement("div");B.innerHTML=t;t=document.createDocumentFragment();for(var D;D=B.firstChild;)lastNode=t.appendChild(D);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function B(G,M){G.length>M&&(G=G.substring(0,Math.round(M/2))+"..."+G.substring(G.length-Math.round(M/4)));return G}t=null!=t?t:"javascript:void(0);";
if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var D=document.createElement("a");D.setAttribute("rel",this.linkRelation);D.setAttribute("href",this.getAbsoluteUrl(t));D.setAttribute("title",B(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&D.setAttribute("target",this.linkTarget);mxUtils.write(D,B(z,40));this.isCustomLink(t)&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(G){this.customLinkClicked(t);mxEvent.consume(G)}));return D};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(M,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(M){M=t.apply(this,arguments);if(mxEvent.isTouchEvent(M.getEvent())&&null==M.getState()){var X=this.getCellAt(M.graphX,M.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,M.graphX,M.graphY)||(M.state=this.view.getState(X),null!=M.state&&
@@ -3166,14 +3167,14 @@ z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationH
function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 ba=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var L=null,H=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==L&&(L=mxCellRenderer.defaultShapes.tableLine);var t=H.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var z=function(Ma,Ia,Ea){for(var Da=[],La=0;La<Ma.length;La++){var Oa=Ma[La];Da.push(null==Oa?null:new mxPoint((da+Oa.x+Ia)*M,(ja+Oa.y+Ea)*M))}return Da},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Ha=D.getTableLines(this.state.cell,
-!1,!0),Na=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(Ma){var Ia=ta[Ma],Ea=Ma<ta.length-1?ta[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Da=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Na[Ma]?new L(Na[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var La=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==La?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Na[Ma],0,La),this.shape.updateBoundsFromLine();else{var Ra=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+La*M;this.shape.bounds.x=X.x+(Ma==ta.length-1?0:Ra.x*M);this.shape.bounds.width=X.width-(Ma==ta.length-1?0:Ra.width+Ra.x+M)}this.shape.redraw()}};var Oa=!1;
-Ia.setPosition=function(Ra,Sa,Va){La=Math.max(Graph.minTableRowHeight-Ra.height,Sa.y-Ra.y-Ra.height);Oa=mxEvent.isShiftDown(Va.getEvent());null!=Da&&Oa&&(La=Math.min(La,Da.height-Graph.minTableRowHeight))};Ia.execute=function(Ra){if(0!=La)D.setTableRowHeight(this.state.cell,La,!Oa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Ra.getGraphX(),Ra.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Ra)}La=0};Ia.reset=function(){La=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
-function(Ma){var Ia=D.view.getState(Ba[Ma]),Ea=D.getCellGeometry(Ba[Ma]),Da=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[Ma],D.getCellStyle(Ba[Ma])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Da.width*M,Ia.height=Da.height*M,Ia.updateCachedBounds());Ea=Ma<Ba.length-1?Ba[Ma+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var La=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ha[Ma]?new L(Ha[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Oa=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==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ha[Ma],Oa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(Da.width+Oa)*M;this.shape.bounds.y=X.y+(Ma==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(Ma==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Ra=!1;Ia.setPosition=function(Sa,Va,kb){Oa=Math.max(Graph.minTableColumnWidth-Da.width,Va.x-Sa.x-Da.width);Ra=mxEvent.isShiftDown(kb.getEvent());null==La||Ra||(Oa=Math.min(Oa,La.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Oa)D.setTableColumnWidth(this.state.cell,Oa,Ra);else if(!B.blockDelayedSelection){var Va=
-D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Va,Sa)}Oa=0};Ia.positionChanged=function(){};Ia.reset=function(){Oa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
+if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Ea){for(var Fa=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Fa.push(null==Pa?null:new mxPoint((da+Pa.x+Ia)*M,(ja+Pa.y+Ea)*M))}return Fa},B=this,D=this.graph,G=D.model,M=D.view.scale,X=this.state,ia=this.selectionBorder,da=this.state.origin.x+D.view.translate.x,ja=this.state.origin.y+D.view.translate.y;null==t&&(t=[]);var ta=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<ta.length){var Ba=G.getChildCells(ta[0].cell,!0),Da=D.getTableLines(this.state.cell,
+!1,!0),Ma=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<ta.length;G++)mxUtils.bind(this,function(La){var Ia=ta[La],Ea=La<ta.length-1?ta[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea.cell):null;var Fa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Ma[La]?new L(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Ea);Ia.tableHandle=!0;var Oa=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==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=D.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*M;this.shape.bounds.x=X.x+(La==ta.length-1?0:Na.x*M);this.shape.bounds.width=X.width-(La==ta.length-1?0:Na.width+Na.x+M)}this.shape.redraw()}};var Pa=!1;
+Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Fa&&Pa&&(Oa=Math.min(Oa,Fa.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)D.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!B.blockDelayedSelection){var Sa=D.getCellAt(Na.getGraphX(),Na.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,
+function(La){var Ia=D.view.getState(Ba[La]),Ea=D.getCellGeometry(Ba[La]),Fa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ia&&(Ia=new mxCellState(D.view,Ba[La],D.getCellStyle(Ba[La])),Ia.x=X.x+Ea.x*M,Ia.y=X.y+Ea.y*M,Ia.width=Fa.width*M,Ia.height=Fa.height*M,Ia.updateCachedBounds());Ea=La<Ba.length-1?Ba[La+1]:null;Ea=null!=Ea?D.getCellGeometry(Ea):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=Da[La]?new L(Da[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Ea.isDashed=ia.isDashed;Ea.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Ea);Ia.tableHandle=!0;var Pa=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==Pa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==L)this.shape.line=z(Da[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=D.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(Fa.width+Pa)*M;this.shape.bounds.y=X.y+(La==Ba.length-1?0:Sa.y*M);this.shape.bounds.height=X.height-(La==Ba.length-1?0:(Sa.height+Sa.y)*M)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,Za){Pa=Math.max(Graph.minTableColumnWidth-Fa.width,eb.x-Sa.x-Fa.width);Na=mxEvent.isShiftDown(Za.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)D.setTableColumnWidth(this.state.cell,Pa,Na);else if(!B.blockDelayedSelection){var eb=
+D.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;D.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){S.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this,function(B){if(null!=B&&t.isVertex(B.cell)){var D=mxUtils.createImage(Editor.rowMoveImage);D.style.position="absolute";D.style.cursor="pointer";D.style.width="7px";D.style.height=
"4px";D.style.padding="4px 2px 4px 2px";D.rowState=B;mxEvent.addGestureListeners(D,mxUtils.bind(this,function(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(B.cell)||this.graph.selectCellForEvent(B.cell,G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),B.cell,G),mxEvent.consume(G))}));this.moveHandles.push(D);this.graph.container.appendChild(D)}})(this.graph.view.getState(t.getChildAt(this.state.cell,z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();
@@ -3204,28 +3205,28 @@ null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode
(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var Z=(new Date).getTime(),oa=0,va=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,B,D){va.apply(this,arguments);B!=this.currentTerminalState?(Z=(new Date).getTime(),
oa=0):oa=(new Date).getTime()-Z;this.currentTerminalState=B};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(t,z,B){z=null!=t&&0==t;var D=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,D,z):null;B=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?B?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=D?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=
-new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Fa.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
+new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ga=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,B){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return Ga.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),B=z.getParent(t[0]),D=this.graph.getCellGeometry(t[0]);if(z.isEdge(B)&&null!=D&&D.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
mxGraphHandler.prototype.getGuideStates=function(){for(var t=za.apply(this,arguments),z=[],B=0;B<t.length;B++)"1"!=mxUtils.getValue(t[B].style,"part","0")&&z.push(t[B]);return z};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),B=z.getParent(t.cell),D=this.graph.getCellGeometry(t.cell);return z.isEdge(B)&&null!=D&&D.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
-t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ga=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ga.apply(this,arguments)};
+t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Ha=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var B=this.graph.getModel(),D=B.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!B.isEdge(D)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ha.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var eb=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){eb.apply(this,arguments);null!=this.rotationShape&&null!=
+var Ta=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ta.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ua=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ua.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var B=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);B.dialect=mxConstants.DIALECT_SVG;B.init(this.graph.view.getOverlayPane());this.cornerHandles.push(B)}}var D=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(G,M){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));D()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(G,M){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title",
mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(G){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(G)}));this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(G){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Xa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Xa.apply(this,
+null);mxEvent.consume(G)})))}if(null!=z)for(B=0;B<z.length;B++){var D=document.createElement("div");D.style.marginTop=null!=t||0<B?"6px":"0px";D.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(D)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(G){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(D,G){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),B=this.graph.getLinksForState(this.state);if(null!=z||null!=B&&0<B.length)this.updateLinkHint(z,B),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var bb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();
var z=this.cornerHandles,B=z[0].bounds.height/2;z[0].bounds.x=this.state.x-z[0].bounds.width/2+t;z[0].bounds.y=this.state.y-B+t;z[0].redraw();z[1].bounds.x=z[0].bounds.x+this.state.width-2*t;z[1].bounds.y=z[0].bounds.y;z[1].redraw();z[2].bounds.x=z[0].bounds.x;z[2].bounds.y=this.state.y+this.state.height-2*t;z[2].redraw();z[3].bounds.x=z[1].bounds.x;z[3].bounds.y=z[2].bounds.y;z[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?
"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");bb.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),z=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),B=mxUtils.getBoundingBox(z,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var db=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){db.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
-this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ib=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(ib.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);
+"0",t),t=null!=B?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,z=null!=this.state.text?this.state.text.boundingBox:null,null==B&&(B=this.state),B=B.y+B.height,null!=z&&(B=Math.max(B,z.y+z.height)),this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(B+this.verticalOffset/2+Editor.hintOffset)+"px")};var cb=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){cb.apply(this,arguments);if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&null!=this.moveHandles[t].parentNode&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}if(null!=this.cornerHandles){for(t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);
+this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var jb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(jb.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(t.x+(t.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px"}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){$a.apply(this,arguments);
null!=this.linkHint&&(this.linkHint.style.visibility="")};var ca=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ca.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -3361,10 +3362,10 @@ null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;nu
null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){oa.style.display=ca==mxConstants.NONE?"none":"";va.style.display=oa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor);
n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);e.cellEditor.isContentEditing()||k.appendChild(va);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing"));
-n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Fa=this.addUnitInput(n,"pt",16,52,function(){Xa.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){ib.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){db.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
-arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ga=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ga&&(e.cellEditor.restoreSelection(Ga),Ga=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ga=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var sa=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),za=this.addUnitInput(n,"pt",87,52,function(){cb.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){bb.apply(this,
+arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Ha=null,Ta=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ha&&(e.cellEditor.restoreSelection(Ha),Ha=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ta=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(Ga=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ga=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
+(Ha=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ha=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=T&&e.insertColumn(T,null!=U?U.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=U&&e.deleteColumn(T,U.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.insertRow(T,fa.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
@@ -3373,18 +3374,18 @@ function(ca){if(null!=T){var t=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s
""):(B.setAttribute("border","1"),B.style.border="1px solid "+z,B.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=T){var t=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,B,D,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
function(z){var B=null==U||null!=ca&&mxEvent.isShiftDown(ca)?T:U;e.processElements(B,function(D){D.style.backgroundColor=null});B.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=T){var ca=T.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?T.setAttribute("cellPadding",t):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));
f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d);
-a.appendChild(k);var eb=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
+a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);var Ua=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=V)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),V.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(C,ca==mxConstants.ALIGN_LEFT);c(F,ca==mxConstants.ALIGN_CENTER);c(K,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(O,ca==mxConstants.ALIGN_TOP);c(R,ca==mxConstants.ALIGN_MIDDLE);c(Q,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ba.value=ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&
t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?L.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?
-L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Fa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Fa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
-za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Xa=this.installInputHandler(Fa,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var db=
-this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var ib=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Fa,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var Za=!1;d=function(){Za||
-(Za=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Ha){if(null!=Ba&&null!=Ha){if(Ba==Ha)return!0;if(Ba.length>Ha.length+1)return Ba.substring(Ba.length-Ha.length-1,Ba.length)=="-"+Ha}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Ha=ca;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
-2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Ha,Na){return null!=Na.style&&null!=Ha?(Ha=Ha.lineHeight,null!=Na.style.lineHeight&&"%"==Na.style.lineHeight.substring(Na.style.lineHeight.length-1)?parseInt(Na.style.lineHeight)/100:"px"==Ha.substring(Ha.length-2)?parseFloat(Ha)/Ba:parseInt(Ha)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
+L.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(L.value="automatic");if(z||document.activeElement!=Ga)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ga.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ra)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
+za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=sa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),sa.value=isNaN(ca)?"":ca+" pt"});var Va=this.installInputHandler(Ga,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var bb=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var cb=
+this.installInputHandler(za,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(sa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(V,Ua);this.addKeyHandler(Ga,Ua);this.addKeyHandler(Ja,Ua);this.addKeyHandler(ra,Ua);this.addKeyHandler(za,Ua);this.addKeyHandler(sa,Ua);e.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){e.getModel().removeListener(Ua)}});Ua();if(e.cellEditor.isContentEditing()){var $a=!1;d=function(){$a||
+($a=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Da){if(null!=Ba&&null!=Da){if(Ba==Da)return!0;if(Ba.length>Da.length+1)return Ba.substring(Ba.length-Da.length-1,Ba.length)=="-"+Da}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=Da.childNodes[0],Da.nodeName==Ba)return!0;return!1},B=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-
+2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},D=function(Ba,Da,Ma){return null!=Ma.style&&null!=Da?(Da=Da.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Da.substring(Da.length-2)?parseFloat(Da)/Ba:parseInt(Da)):""},G=mxUtils.getCurrentStyle(ca),M=B(G),X=D(M,G,ca),ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var da=window.getSelection(),ja=
0;ja<ia.length;ja++)if(da.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);M=Math.max(B(temp),M);var ta=D(M,temp,ia[ja]);if(ta!=X||isNaN(ta))X=""}null!=G&&(c(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),c(m[1],"italic"==G.fontStyle||z("I")||z("EM")),c(m[2],z("U")),c(aa,z("SUP")),c(P,z("SUB")),e.cellEditor.isTableSelected()?(c(ha,t(G.textAlign,"justify")),c(C,t(G.textAlign,"left")),c(F,t(G.textAlign,"center")),c(K,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),eb.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
-null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}Za=
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(c(ha,t(G.textAlign,"justify")),c(C,!1),c(F,!1),c(K,!1)):(c(ha,!1),c(C,z==mxConstants.ALIGN_LEFT),c(F,z==mxConstants.ALIGN_CENTER),c(K,z==mxConstants.ALIGN_RIGHT))),T=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),fa=null==T?null:e.getParentByName(ca,"TR",T),U=null==T?null:e.getParentByNames(ca,["TD","TH"],T),db.style.display=null!=T?"":"none",document.activeElement!=V&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&
+null!=ea?(ca.removeAttribute("size"),ca.style.fontSize=ea+" pt",ea=null):V.value=isNaN(M)?"":M+" pt",ta=parseFloat(X),isNaN(ta)?Ta.value="100 %":Ta.value=Math.round(100*ta)+" %"),null!=W&&(Z="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(Z,!0)),null!=ka&&(wa="rgba(0, 0, 0, 0)"==G.backgroundColor||"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ka(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}$a=
!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea,"keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@@ -3454,7 +3455,7 @@ fa.style.width="23px";fa.style.height="1px";fa.style.borderBottom="1px solid "+t
m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){ka.apply(this,arguments)}),ba=this.addUnitInput(m,"pt",30,52,function(){ea.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");
R.style.height="8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){V.apply(this,arguments)}),I=this.addUnitInput(m,"pt",30,52,function(){S.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var L=this.addUnitInput(k,"pt",30,52,function(){wa.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&&
-a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Fa,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Fa),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
+a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function va(Ja,Ga,sa,za){sa=sa.getElementsByTagName("div")[0];null!=sa&&(sa.className=e.getCssClassForMarker(za,d.style.shape,Ja,Ga),sa.nextSibling.style.marginLeft="1px",sa.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==sa.className?(sa.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),sa.style.backgroundImage="none",sa.style.verticalAlign="top",sa.style.marginTop="4px",sa.style.fontSize="10px",sa.style.filter="none",
sa.style.color=this.defaultStrokeColor,sa.nextSibling.style.marginTop="0px"):(sa.nextSibling.style.position="relative",sa.nextSibling.style.top="-2px"));return sa}d=e.getSelectionState();if(oa||document.activeElement!=E)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),E.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=O)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==d.style.shape||"filledEdge"==
d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?U.style.borderBottom="1px dashed "+this.defaultStrokeColor:U.style.borderBottom="1px dotted "+this.defaultStrokeColor:U.style.borderBottom="1px solid "+this.defaultStrokeColor;fa.style.borderBottom=
U.style.borderBottom;W=Q.getElementsByTagName("div")[0];null!=W&&(Z=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(Z=null),"orthogonalEdgeStyle"==Z&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==Z||"none"==Z||null==Z?"geSprite geSprite-straight":"entityRelationEdgeStyle"==Z?"geSprite geSprite-entity":"elbowEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(d.style,
@@ -3509,19 +3510,19 @@ DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destro
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,U.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,U.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,U.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,U.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,U.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,U.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function qa(){mxActor.call(this)}function I(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}function S(){mxCylinder.call(this)}function V(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxEllipse.call(this)}function wa(){mxShape.call(this)}
-function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Fa(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ga(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function eb(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Xa(){mxArrowConnector.call(this);
-this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function db(){mxActor.call(this)}function ib(){mxActor.call(this)}function Za(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
-function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ha(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Da(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function La(){mxConnector.call(this)}
-function Oa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
+function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function va(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ga(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Ha(){mxRectangleShape.call(this)}function Ta(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ua(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
+this.spacing=0}function Ya(){mxActor.call(this)}function bb(){mxRectangleShape.call(this)}function cb(){mxActor.call(this)}function jb(){mxActor.call(this)}function $a(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
+function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Fa(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
+function Pa(b,h,q,l,p,v,w,J,y,Y){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){b.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var b=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==b?b=q:b.add(q))}this.bounds=null!=b?b:new mxRectangle};a.prototype.paintVertexShape=function(b,
h,q,l,p){this.paintTableLine(b,this.line,0,0)};a.prototype.paintTableLine=function(b,h,q,l){if(null!=h){var p=null;b.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?b.moveTo(w.x+q,w.y+l):null!=p&&b.lineTo(w.x+q,w.y+l));p=w}b.end();b.stroke()}};a.prototype.intersectsRectangle=function(b){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(b,
-q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Ha.prototype.paintVertexShape.apply(this,
+q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(c,mxSwimlane);c.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};c.prototype.paintVertexShape=function(b,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?Da.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-h,-q));v||this.outline||!(w&&J<p||!w&&J<l)||this.paintForeground(b,h,q,l,p)};c.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var J=v;v=w;w=J}b.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
s;this.paintTableForeground(b,h,q,l,p)}};c.prototype.paintTableForeground=function(b,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(b,l[p],h,q)};c.prototype.configurePointerEvents=function(b){0==this.getTitleSize()?b.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
c);mxUtils.extend(f,c);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(v,p);b.lineTo(0,p-v);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(l-v,0),b.lineTo(l,v),b.lineTo(v,v),b.close(),b.fill()),0!=J&&(b.setFillAlpha(Math.abs(J)),b.setFillColor(0>J?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(v,
-v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Ra=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
-mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Ra);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
-.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Ra));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
+v),b.lineTo(v,p),b.lineTo(0,p-v),b.close(),b.fill()),b.begin(),b.moveTo(v,p),b.lineTo(v,v),b.lineTo(0,0),b.moveTo(v,v),b.lineTo(l,v),b.end(),b.stroke())};e.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(b,h,q,l,p){b.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);b.fill();b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/Na);b.translate((l-h)/2,(p-h)/2+h/4);b.moveTo(0,
+.25*h);b.lineTo(.5*h,h*Sa);b.lineTo(h,.25*h);b.lineTo(.5*h,(.5-Sa)*h);b.lineTo(0,.25*h);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(b.moveTo(0,.25*h),b.lineTo(.5*h,(.5-Sa)*h),b.lineTo(h,.25*h),b.moveTo(.5*h,(.5-Sa)*h),b.lineTo(.5*h,(1-Sa)*h)):(b.translate((l-h)/2,(p-h)/2),b.moveTo(0,.25*h),b.lineTo(.5*h,h*Sa),b.lineTo(h,.25*h),b.lineTo(h,.75*h),b.lineTo(.5*
h,(1-Sa)*h),b.lineTo(0,.75*h),b.close());b.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,h,q,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,h/2),b.moveTo(0,h),b.curveTo(0,2*h,l,2*h,l,h),v||(b.stroke(),b.begin()),b.translate(0,
-h);v||(b.moveTo(0,h),b.curveTo(0,-h/3,l,-h/3,l,h),b.lineTo(l,p-h),b.curveTo(l,p+h/3,0,p+h/3,0,p-h),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(h,q);b.begin();b.moveTo(0,0);b.lineTo(l-v,0);b.lineTo(l,v);b.lineTo(l,p);b.lineTo(0,p);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=w&&(b.setFillAlpha(Math.abs(w)),b.setFillColor(0>w?"#FFFFFF":"#000000"),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),b.close(),b.fill()),b.begin(),b.moveTo(l-v,0),b.lineTo(l-v,v),b.lineTo(l,v),
@@ -3540,7 +3541,7 @@ q&&(b.ellipse(0,.5*p-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*p-5),b.
function(b,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("card",E);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));b.moveTo(0,h/2);b.quadTo(l/4,1.4*h,l/2,h/2);b.quadTo(3*l/4,h*(1-1.4),l,h/2);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};O.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=b.width,l=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*=
l,new mxRectangle(b.x,b.y+h,q,l-2*h);h*=q;return new mxRectangle(b.x+h,b.y,q-2*h,l)}return b};mxCellRenderer.registerShape("tape",O);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};R.prototype.redrawPath=function(b,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,
-0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
+0);b.lineTo(l,0);b.lineTo(l,p-h/2);b.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);b.quadTo(l/4,p-h*(1-1.4),0,p-h/2);b.lineTo(0,h/2);b.close();b.end()};mxCellRenderer.registerShape("document",R);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*h),0,0)}return null};A.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(b.width,b.height));v=Math.min(v,.5*b.width,.5*(b.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(v,0,Math.min(b.width,b.width-q),Math.min(b.height,b.height-h)):new mxRectangle(Math.min(b.width,b.width-q),0,v,Math.min(b.height,b.height-h))}return new mxRectangle(0,Math.min(b.height,h),0,0)}return null};K.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
@@ -3551,9 +3552,9 @@ h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.siz
h=l/5;b.rect(0,0,h,p);b.fillAndStroke();b.rect(2*h,0,h,p);b.fillAndStroke();b.rect(4*h,0,h,p);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",T);U.prototype.moveTo=function(b,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;this.firstX=b;this.firstY=h};U.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
U.prototype.quadTo=function(b,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};U.prototype.curveTo=function(b,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};U.prototype.arcTo=function(b,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};U.prototype.lineTo=function(b,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(b-
this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=h;return}var w=Math.round(v/10),J=this.defaultVariation;5>w&&(w=5,J/=3);var y=q(b-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Y=(Math.random()-.5)*J;this.originalLineTo.call(this.canvas,y*v+this.lastX-Y*p,q*v+this.lastY-Y*l)}this.originalLineTo.call(this.canvas,b,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=
-h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var kb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){kb.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var sb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(b){sb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)nb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+h};U.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Za=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){Za.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(b){pb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new U(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,h,q,l,p){if(null==b.handJiggle||b.handJiggle.constructor!=U)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l*
v,p*v)),b.moveTo(h+v,q),b.lineTo(h+l-v,q),b.quadTo(h+l,q,h+l,q+v),b.lineTo(h+l,q+p-v),b.quadTo(h+l,q+p,h+l-v,q+p),b.lineTo(h+v,q+p),b.quadTo(h,q+p,h,q+p-v),b.lineTo(h,q+v),b.quadTo(h,q,h+v,q)):(b.moveTo(h,q),b.lineTo(h+l,q),b.lineTo(h+l,q+p),b.lineTo(h,q+p),b.lineTo(h,q)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=.1;fa.prototype.fixedSize=!1;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=b.width,q=b.height;b=new mxRectangle(b.x,b.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}b.x+=Math.round(l);b.width-=Math.round(2*l);return b}return b};
@@ -3564,10 +3565,10 @@ this.position2)))),J=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.styl
q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("step",
qa);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(h,
0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(b,h,q,l,p){var v=Math.min(l/5,p/5)+1;b.begin();b.moveTo(h+l/2,q+v);b.lineTo(h+l/2,q+p-v);b.moveTo(h+v,q+p/2);b.lineTo(h+l-v,q+p/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-L);var tb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){tb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),tb.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Pa=this.style["symbol"+v+"VSpacing"]||Ca,
-Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Pa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Pa):la+Pa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+L);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};mxRhombus.prototype.paintVertexShape=function(b,h,q,l,p){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(b.setShadow(!1),ab.apply(this,[b,h,q,l,p]))}};mxUtils.extend(H,mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+h,b.y+h,b.width-2*h,b.height-2*h)}return b};H.prototype.paintForeground=function(b,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
+Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=J==mxConstants.ALIGN_CENTER?Ka+(l-Y)/2:J==mxConstants.ALIGN_RIGHT?Ka+(l-Y-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-N-Qa):la+Qa;b.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,b,Ka,la,Y,N);b.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(b,h,q,l,p,v){v?(b.moveTo(0,0),b.lineTo(l/2,p/2),b.lineTo(l,0),b.end()):(b.moveTo(0,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(0,p),b.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(V,mxShape);V.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.ellipse(l/4,0,l/2,p/4);b.fillAndStroke();b.begin();b.moveTo(l/2,p/4);b.lineTo(l/2,2*p/3);b.moveTo(l/2,p/3);b.lineTo(0,p/3);b.moveTo(l/2,p/3);b.lineTo(l,p/3);b.moveTo(l/
2,2*p/3);b.lineTo(0,p);b.moveTo(l/2,2*p/3);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",V);mxUtils.extend(ea,mxShape);ea.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};ea.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,p/4);b.lineTo(0,3*p/4);b.end();b.stroke();b.begin();b.moveTo(0,p/2);b.lineTo(l/6,p/2);b.end();b.stroke();b.ellipse(l/6,0,5*l/6,p);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/8,q+p);b.lineTo(h+7*l/8,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",ka);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(l,0);b.lineTo(0,p);b.moveTo(0,0);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
@@ -3590,20 +3591,20 @@ y,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]):h==mxConstants
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?I.prototype.fixedSize:I.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=b.x,J=b.y,y=b.width,Y=b.height,N=b.getCenterX();b=b.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(N,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y-p),new mxPoint(N,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J+p),new mxPoint(N,J)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+p,J),new mxPoint(w+y-p,J),new mxPoint(w+y,b),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,b),new mxPoint(w+p,J)]);N=new mxPoint(N,
b);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(J,N,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(h,q);b.ellipse((l-v)/2,0,v,v);b.fillAndStroke();b.begin();b.moveTo(l/2,v);b.lineTo(l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ja,
-mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Fa,
-mxShape);Fa.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Fa);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
+mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.begin();b.moveTo(l/2,v+w);b.lineTo(l/2,p);b.end();b.stroke();b.begin();b.moveTo((l-v)/2-w,v/2);b.quadTo((l-v)/2-w,v+w,l/2,v+w);b.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ga,
+mxShape);Ga.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l,
p,l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=Math.min(h,p-h),y=Math.min(J+2*h,p-h);v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,
y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
-"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ga,mxRectangleShape);Ga.prototype.paintForeground=
-function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ga);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
-Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(eb,Ta);eb.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",eb);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
-this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Xa,mxArrowConnector);Xa.prototype.defaultWidth=10;Xa.prototype.defaultArrowWidth=20;Xa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Xa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Xa.prototype.getEdgeWidth=
-function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Xa);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=.3*p-h/2,y=.7*p-h/2;v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,y),b.lineTo(w,y),b.lineTo(w,y+h),b.lineTo(q,y+h)):(b.moveTo(q,0),b.lineTo(l,0),b.lineTo(l,p),b.lineTo(q,p),b.lineTo(q,y+h),b.lineTo(0,y+h),b.lineTo(0,y),b.lineTo(q,y),b.lineTo(q,J+h),b.lineTo(0,J+h),b.lineTo(0,J),b.lineTo(q,J),b.close());b.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=
+function(b,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,J,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(b,h,q,l,p){var v=Math.min(4,
+Math.min(l/5,p/5));0<l&&0<p&&(b.ellipse(h+v,q+v,l-2*v,p-2*v),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(h,q,l,p),b.stroke())};mxCellRenderer.registerShape("endState",Ta);mxUtils.extend(db,Ta);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ua,mxArrowConnector);Ua.prototype.defaultWidth=4;Ua.prototype.isOpenEnded=function(){return!0};Ua.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
+this.strokewidth-1)};Ua.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ua);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=
+function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l,
0),new mxPoint(l,p)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(bb,mxRectangleShape);bb.prototype.dx=20;bb.prototype.dy=20;bb.prototype.isHtmlAllowed=function(){return!1};bb.prototype.paintForeground=function(b,h,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
-Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",db);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(b,h,q,
-l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",ib);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(h,q+v);b.lineTo(h+l,q+v);b.end();b.stroke();b.begin();b.moveTo(h+w,q);b.lineTo(h+w,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",bb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(jb,mxActor);jb.prototype.redrawPath=function(b,h,q,
+l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",jb);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("tee",$a);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(b,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(b,
h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h,
v),new mxPoint(h,p)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(h,0);b.lineTo(l,0);b.quadTo(l-2*h,p/2,l,p);b.lineTo(h,p);b.quadTo(h-
@@ -3613,21 +3614,21 @@ G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(b,h
function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/2,q+p);b.lineTo(h+l,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke();b.begin();b.moveTo(h+l/2,q);b.lineTo(h+l/2,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(h+.145*l,q+.145*p);b.lineTo(h+.855*l,q+.855*p);b.end();b.stroke();b.begin();b.moveTo(h+.855*l,q+.145*p);b.lineTo(h+.145*l,q+.855*p);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(b,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
arguments);b.setShadow(!1);b.begin();b.moveTo(h,q+p/2);b.lineTo(h+l,q+p/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(b,h,q,l,p){b.begin();b.moveTo(h,q);b.lineTo(h+l,q);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke();b.begin();b.moveTo(h,q+p);b.lineTo(h+l,q+p);b.lineTo(h+l/2,q+p/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
-function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ha,mxEllipse);Ha.prototype.drawHidden=!0;Ha.prototype.paintVertexShape=function(b,h,q,
+function(b,h,q,l,p){var v=b.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;b.begin();b.moveTo(h,q);b.lineTo(h,q+p);b.moveTo(h+v,J);b.lineTo(h+v+w,J-w/2);b.moveTo(h+v,J);b.lineTo(h+v+w,J+w/2);b.moveTo(h+v,J);b.lineTo(h+l-v,J);b.moveTo(h+l,q);b.lineTo(h+l,q+p);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J-w/2);b.moveTo(h+l-v,J);b.lineTo(h+l-w-v,J+w/2);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(b,h,q,
l,p){this.outline||b.setStrokeColor(null);if(null!=this.style){var v=b.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(b.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||Y||N||y?(b.rect(h,q,l,p),b.fill(),b.pointerEvents=
-v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ha);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
+v,b.setStrokeColor(this.stroke),b.setLineCap("square"),b.begin(),b.moveTo(h,q),this.outline||J?b.lineTo(h+l,q):b.moveTo(h+l,q),this.outline||Y?b.lineTo(h+l,q+p):b.moveTo(h+l,q+p),this.outline||N?b.lineTo(h,q+p):b.moveTo(h,q+p),(this.outline||y)&&b.lineTo(h,q),b.end(),b.stroke(),b.setLineCap("flat")):b.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(h+l/2,q),b.lineTo(h+l/2,q+p)):(b.moveTo(h,q+p/2),b.lineTo(h+l,q+p/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(La,mxActor);La.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(l,p/2);b.moveTo(0,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(0,p);b.close();b.end()};mxCellRenderer.registerShape("delay",La);mxUtils.extend(Ia,mxActor);Ia.prototype.size=
.2;Ia.prototype.redrawPath=function(b,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;b.moveTo(0,h);b.lineTo(w,h);b.lineTo(w,0);b.lineTo(v,0);b.lineTo(v,h);b.lineTo(l,h);b.lineTo(l,q);b.lineTo(v,q);b.lineTo(v,p);b.lineTo(w,p);b.lineTo(w,q);b.lineTo(0,q);b.close();b.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,
-h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Da,mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);b.moveTo(0,p/2);b.lineTo(q,0);b.lineTo(l-h,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,l-h,p);b.lineTo(q,p);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Fa,mxActor);Fa.prototype.cst={RECT2:"mxgraph.basic.rect"};Fa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Da.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
-"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Pa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
+enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Fa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);this.strictDrawShape(b,0,0,l,p)};Fa.prototype.strictDrawShape=function(b,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
+"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&&
v.relIndent?v.relIndent:Math.max(0,Math.min(50,N)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),ua=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Aa=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),zb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ab=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),wb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),yb=v&&v.gradientColor2?
-v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Da.prototype;b.setDashed(Ca);Pa&&""!=Pa&&b.setDashPattern(Pa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
+v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Fa.prototype;b.setDashed(Ca);Qa&&""!=Qa&&b.setDashPattern(Qa);b.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);J||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));J||(N=Math.min(Ka*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l,
p)-y);(la||pa||na||ma)&&"frame"!=Y&&(b.begin(),la?v.moveNW(b,h,q,l,p,w,ua,y,ma):b.moveTo(0,0),la&&v.paintNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),na&&v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),b.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
b.begin(),la?v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma):b.moveTo(N,0),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(b,h,q,l,p,w,ya,y,N),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(b,h,q,l,p,w,xa,y,N),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),la&&ma&&v.paintNWInner(b,h,q,l,p,w,ua,y,N),b.fill(),"none"==zb&&(b.begin(),v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma),b.stroke()));
la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(b,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.paintSW(b,h,q,l,p,w,Aa,y,na),v.paintLeft(b,
@@ -3652,81 +3653,81 @@ l,p,w,ya,y,na),v.paintSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma)
na,ma),b.close(),b.fillAndStroke())):"frame"!=Y?(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la)),b.stroke()):(b.begin(),v.moveNW(b,h,q,l,p,w,ua,y,ma),v.paintTop(b,h,q,l,p,w,xa,y,pa),v.lineNEInner(b,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(b,h,q,l,p,w,ua,y,N,ma,la),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),"double"==
Y&&(v.moveSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa)),b.stroke()):(b.begin(),v.moveNE(b,h,q,l,p,w,xa,y,la),v.paintRight(b,h,q,l,p,w,ya,y,na),v.lineSEInner(b,h,q,l,p,w,ya,y,N,na),v.paintRightInner(b,h,q,l,p,w,xa,y,N,la,pa),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSE(b,h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na)),b.stroke()):(b.begin(),v.moveSE(b,
h,q,l,p,w,ya,y,pa),v.paintBottom(b,h,q,l,p,w,Aa,y,ma),v.lineSWInner(b,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(b,h,q,l,p,w,ya,y,N,pa,na),b.close(),b.fillAndStroke()):"frame"!=Y?(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,w,Aa,y,N,na,ma)),b.stroke()):(b.begin(),v.moveSW(b,h,q,l,p,w,ua,y,na),v.paintLeft(b,h,q,l,p,w,ua,y,la),v.lineNWInner(b,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(b,h,q,l,p,
-w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Da.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Da.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Da.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Da.prototype.moveSW=
-function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Da.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Da.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
-w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Da.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Da.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
-J)};Da.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Da.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Da.prototype.paintBottom=function(b,h,q,
-l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Da.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Da.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
-w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Da.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
-v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Da.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Da.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
-N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Da.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
-y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Da.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Da.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
-p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Da.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
-y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Da.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Da.prototype.lineSWInner=
-function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Da.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Da.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Da.prototype.moveNEInner=function(b,h,
-q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Da.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Da.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Da.prototype.lineNWInner=
-function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Da.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Pa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
-Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Pa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Pa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);Da.prototype.constraints=null;mxUtils.extend(La,mxConnector);La.prototype.origPaintEdgeShape=La.prototype.paintEdgeShape;
-La.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;La.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),La.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",La);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+w,Aa,y,N,na,ma),b.close(),b.fillAndStroke());b.begin();v.paintFolds(b,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);b.stroke()};Fa.prototype.moveNW=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,0):b.moveTo(0,J)};Fa.prototype.moveNE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,0):b.moveTo(l-J,0)};Fa.prototype.moveSE=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(l,p):b.moveTo(l,p-J)};Fa.prototype.moveSW=
+function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.moveTo(0,p):b.moveTo(J,p)};Fa.prototype.paintNW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(J,0);else b.lineTo(0,0)};Fa.prototype.paintTop=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==
+w&&"square"==v||!y?b.lineTo(l,0):b.lineTo(l-J,0)};Fa.prototype.paintNE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l,J);else b.lineTo(l,0)};Fa.prototype.paintRight=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(l,p):b.lineTo(l,p-
+J)};Fa.prototype.paintLeft=function(b,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,0):b.lineTo(0,J)};Fa.prototype.paintSE=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-J,p);else b.lineTo(l,p)};Fa.prototype.paintBottom=function(b,h,q,
+l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?b.lineTo(0,p):b.lineTo(J,p)};Fa.prototype.paintSW=function(b,h,q,l,p,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;b.arcTo(J,J,0,0,h,0,p-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(0,p-J);else b.lineTo(0,p)};Fa.prototype.paintNWInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==
+w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+J);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,y+J),b.lineTo(y,y+J)};Fa.prototype.paintTopInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(0,y):Y&&!N?b.lineTo(y,0):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
+v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Fa.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Fa.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
+N?b.lineTo(l-y,0):Y&&!N?b.lineTo(l,y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):b.lineTo(l-y,J+y):b.lineTo(l-y,0):b.lineTo(l,0)};Fa.prototype.paintLeftInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,p):Y&&!N?b.lineTo(0,p-y):Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*
+y):b.lineTo(y,p-J-y):b.lineTo(y,p):b.lineTo(0,p)};Fa.prototype.paintSEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-y,p-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-y,p-J-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-y,p-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,p-J-y),b.lineTo(l-y,p-J-y)};Fa.prototype.paintBottomInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(l,
+p-y):Y&&!N?b.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Y?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-J-.5*y,p-y):b.lineTo(l-J-y,p-y):b.lineTo(l,p)};Fa.prototype.paintSWInner=function(b,h,q,l,p,v,w,J,y,Y){if(!Y)b.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)b.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+
+y,J+y,0,0,1,J+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(J+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(y+J,p-J-y),b.lineTo(y+J,p-y)};Fa.prototype.moveSWInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,p-J-y):b.moveTo(0,p-y)};Fa.prototype.lineSWInner=
+function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,p-J-y):b.lineTo(0,p-y)};Fa.prototype.moveSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-
+y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,p-J-y):b.moveTo(l-y,p)};Fa.prototype.lineSEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v?b.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,p-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,p-J-y):b.lineTo(l-y,p)};Fa.prototype.moveNEInner=function(b,h,
+q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Fa.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y):
+("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Fa.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Fa.prototype.lineNWInner=
+function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.lineTo(y,0):Y&&!N?b.lineTo(0,y):"square"==w||"default"==w&&"square"==v?b.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(y,J+y):b.lineTo(0,0)};Fa.prototype.paintFolds=function(b,h,q,l,p,v,w,J,y,Y,N,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
+Ca&&la&&(b.moveTo(0,N),b.lineTo(N,N),b.lineTo(N,0)),("fold"==J||"default"==J&&"fold"==v)&&Ca&&Qa&&(b.moveTo(l-N,0),b.lineTo(l-N,N),b.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(b.moveTo(l-N,p),b.lineTo(l-N,p-N),b.lineTo(l,p-N)),("fold"==Y||"default"==Y&&"fold"==v)&&Ka&&la&&(b.moveTo(0,p-N),b.lineTo(N,p-N),b.lineTo(N,p))};mxCellRenderer.registerShape(Fa.prototype.cst.RECT2,Fa);Fa.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
+Oa.prototype.paintEdgeShape=function(b,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=b.state.dashed;var v=b.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[b,l,q]);3<=b.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(b.setStrokeColor(l),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[b,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var b=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=b.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Pa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Pa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Pa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
-b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Oa.apply(this,arguments),Pa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Pa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Pa-Ka+v*y,N.y-Ka+Pa-p*y);b.lineTo(N.x+Ka-Pa-v*y,N.y-Ka-Pa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
-h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Pa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Pa.x-Ca,Pa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Pa.x+Ca,Pa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
-b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ub=function(b,h,q){return jb(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
-w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},jb=function(b,h,q,l,p){return Qa(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Pa=y.y-Ca.y,Ka=Math.sqrt(Y*
-Y+Pa*Pa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Pa/Ka,Ca,y,w,J)})},$a=function(b){return function(h){return[Qa(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
-2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},lb=function(b){return function(h){return[Qa(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},ab=function(b,h,q){return function(l){var p=[Qa(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},fb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Qa(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
-Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(gb(v));return w}},hb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Qa(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(gb(l));return p}},Wa=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));return h}},gb=function(b,h){return Qa(b,
+function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+N/2,Ka=l.y+Ca/2;l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa-N/2-Ca/2,Ka-Ca/2+N/2);b.lineTo(Qa-N/2+Ca/2,Ka-Ca/2-N/2);b.lineTo(Qa+Ca/2-3*N/2,Ka-3*Ca/2-N/2);b.lineTo(Qa-Ca/2-3*N/2,Ka-3*Ca/2+N/2);b.close();Y?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1);return function(){b.begin();b.moveTo(l.x-N/2-Ca/2,l.y-Ca/2+N/2);b.lineTo(l.x+Ca/2-3*N/2,l.y-3*Ca/2-N/2);
+b.moveTo(l.x-N/2+Ca/2,l.y-Ca/2-N/2);b.lineTo(l.x-Ca/2-3*N/2,l.y-3*Ca/2+N/2);b.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(b,h,q,l,p,v,w,J,y,Y){var N=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);b.begin();b.moveTo(N.x-p*y,N.y-v*y);b.lineTo(N.x-2*Qa+p*y,N.y-2*Ka+v*y);b.moveTo(N.x-Qa-Ka+v*y,N.y-Ka+Qa-p*y);b.lineTo(N.x+Ka-Qa-v*y,N.y-Ka-Qa+p*y);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,
+h,q,l,p,v,w,J,y,Y){var N=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=N;l.y-=Ca;return function(){b.begin();b.moveTo(Qa.x-Ca,Qa.y+N);b.quadTo(l.x-Ca,l.y+N,l.x,l.y);b.quadTo(l.x+Ca,l.y-N,Qa.x+Ca,Qa.y-N);b.stroke()}});mxMarker.addMarker("async",function(b,h,q,l,p,v,w,J,y,Y){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){b.begin();b.moveTo(N.x,N.y);J?b.lineTo(N.x-p-v/2,N.y-v+p/2):b.lineTo(N.x+v/2-p,N.y-v-p/2);b.lineTo(N.x-p,N.y-v);b.close();Y?b.fillAndStroke():
+b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(h,q,l,p,v,w,J,y,Y,N){v*=J+Y;w*=J+Y;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/b,Ca.y-w+v/b):h.lineTo(Ca.x+w/b-v,Ca.y-w-v/b);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var mb=function(b,h,q){return Xa(b,["width"],h,function(l,p,v,w,J){J=b.shape.getEdgeWidth()*b.view.scale+q;return new mxPoint(w.x+p*l/4+v*J/2,w.y+v*l/4-p*J/2)},function(l,p,v,w,J,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
+w.y,J.x,J.y,y.x,y.y));b.style.width=Math.round(2*l)/b.view.scale-q})},Xa=function(b,h,q,l,p){return Ra(b,h,function(v){var w=b.absolutePoints,J=w.length-1;v=b.view.translate;var y=b.view.scale,Y=q?w[0]:w[J];w=q?w[1]:w[J-1];J=w.x-Y.x;var N=w.y-Y.y,Ca=Math.sqrt(J*J+N*N);Y=l.call(this,Ca,J/Ca,N/Ca,Y,w);return new mxPoint(Y.x/y-v.x,Y.y/y-v.y)},function(v,w,J){var y=b.absolutePoints,Y=y.length-1;v=b.view.translate;var N=b.view.scale,Ca=q?y[0]:y[Y];y=q?y[1]:y[Y-1];Y=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Y*
+Y+Qa*Qa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ka,Y/Ka,Qa/Ka,Ca,y,w,J)})},ib=function(b){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/
+2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(q.x+q.width-l.x)/q.width))})]}},gb=function(b){return function(h){return[Ra(h,["size"],function(q){var l=Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},Wa=function(b,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",h)))))*b;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/b)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(b,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(J){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Y=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:b));return new mxPoint(J.x+
+Math.max(0,Math.min(.5*J.width,Y*(y?1:J.width))),J.getCenterY())},function(J,y,Y){J=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(q,(y.x-J.x)/J.width));this.state.style.size=J},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},tb=function(b,h,q){b=null!=b?b:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*b,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(b,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(b){var h=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));return h}},fb=function(b,h){return Ra(b,
[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var p=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*
-p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Qa=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
-w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},ob={link:function(b){return[ub(b,!0,10),ub(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(b,h,q,l,p,v,w){var J=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(Y){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);
+w&&w(Y)};J.getPosition=q;J.setPosition=l;J.ignoreGrid=null!=p?p:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return J},rb={link:function(b){return[mb(b,!0,10),mb(b,!1,10)]},flexArrow:function(b){var h=b.view.graph.gridSize/b.view.scale,q=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Y.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(l,p,v,w,J){l=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*b.view.scale)+v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)-p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-b.shape.strokewidth)/
3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),
-Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(jb(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<h&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Xa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*l)/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Y.getEvent())||
-Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(jb(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
+Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),q.push(Xa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,J){l=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;J=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(w.x+p*(J+b.shape.strokewidth*
b.view.scale)-v*l/2,w.y+v*(J+b.shape.strokewidth*b.view.scale)+p*l/2)},function(l,p,v,w,J,y,Y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(p-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*l)-b.shape.getEdgeWidth())/b.view.scale;if(mxEvent.isShiftDown(Y.getEvent())||mxEvent.isControlDown(Y.getEvent()))b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],
b.style.startWidth=b.style.endWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<h&&(b.style.endWidth=b.style.startWidth))})));return q},swimlane:function(b){var h=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(gb(b,q/2))}h.push(Qa(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(b,q/2))}h.push(Ra(b,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=b.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(b.cell)||p.isTableCell(b.cell))){l=p.getSwimlaneDirection(b.style);var v=p.model.getParent(b.cell);v=p.model.getChildCells(v,!0);for(var w=[],J=0;J<v.length;J++)v[J]!=b.cell&&p.isSwimlane(v[J])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[J]))==
-l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:Wa(),ext:Wa(),rectangle:Wa(),triangle:Wa(),rhombus:Wa(),umlLifeline:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Qa(b,
+l&&w.push(v[J]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(b){return[Ra(b,
["width","height"],function(h){var q=Math.max(oa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),l=Math.max(1.5*oa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(h.height,q.y-h.y)))},
-!1)]},process:function(b){var h=[Qa(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
-!1)&&h.push(gb(b));return h},cross:function(b){return[Qa(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,
-Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
-function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Qa(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},dataStorage:function(b){return[Qa(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
-[Qa(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Qa(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(gb(b));
-return h},internalStorage:function(b){var h=[Qa(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
-h.push(gb(b));return h},module:function(b){return[Qa(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
-q.y-h.y))/2)})]},corner:function(b){return[Qa(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Qa(b,["dx","dy"],function(h){var q=
-Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:$a(1),doubleArrow:$a(.5),folder:function(b){return[Qa(b,["tabWidth","tabHeight"],function(h){var q=
+!1)]},process:function(b){var h=[Ra(b,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
+!1)&&h.push(fb(b));return h},cross:function(b){return[Ra(b,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,
+Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
+function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(b){var h=[Ra(b,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},dataStorage:function(b){return[Ra(b,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(b){var h=
+[Ra(b,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(b,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(b));
+return h},internalStorage:function(b){var h=[Ra(b,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&
+h.push(fb(b));return h},module:function(b){return[Ra(b,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
+q.y-h.y))/2)})]},corner:function(b){return[Ra(b,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(b){return[Ra(b,["dx","dy"],function(h){var q=
+Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),folder:function(b){return[Ra(b,["tabWidth","tabHeight"],function(h){var q=
Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Qa(b,["size"],function(h){var q=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Qa(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
-Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:lb(x.prototype.size),cylinder3:lb(A.prototype.size),offPageConnector:function(b){return[Qa(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
+(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(b){return[Ra(b,["size"],function(h){var q=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(b){return[Ra(b,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
+Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(A.prototype.size),offPageConnector:function(b){return[Ra(b,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(b){var h=[Graph.createHandle(b,["size"],function(q){var l=
Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];b=Graph.createHandle(b,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*
-Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:fb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:fb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:fb(aa.prototype.size,!1),display:fb(Ea.prototype.size,!1),cube:ab(1,e.prototype.size,!1),card:ab(.5,E.prototype.size,!0),loopLimit:ab(.5,G.prototype.size,!0),trapezoid:hb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:hb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
-Qa;Graph.handleFactory=ob;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=ob[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(h=ob[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=ob[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),qb=new mxPoint(1,0),vb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,
-Math.cos(vb),Math.sin(vb));var rb=mxUtils.toRadians(-150);qb=mxUtils.getRotatedPoint(qb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=pb.x,Y=pb.y,N=qb.x,Ca=qb.y,Pa="horizontal"==mxUtils.getValue(b.style,
-"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Pa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var mb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return mb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(b);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:qb(aa.prototype.size,!1),display:qb(Ea.prototype.size,!1),cube:Wa(1,e.prototype.size,!1),card:Wa(.5,E.prototype.size,!0),loopLimit:Wa(.5,G.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,Q.prototype.size,Q.prototype.fixedSize)};Graph.createHandle=
+Ra;Graph.handleFactory=rb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=rb[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
+Math.cos(ob),Math.sin(ob));var lb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(b,h,q,l,p){var v=b.view;l=null!=l&&0<l.length?l[0]:null;var w=b.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(b,l));null==J&&null!=h&&(J=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=kb.x,Y=kb.y,N=hb.x,Ca=hb.y,Qa="horizontal"==mxUtils.getValue(b.style,
+"elbow","horizontal");if(null!=w&&null!=J){b=function(la,pa,na){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-N*ma)/(y*Ca-Y*N);la=(Y*la-y*ma)/(Y*N-y*Ca);Qa?(na&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la)):(na&&(Ka=new mxPoint(Ka.x+N*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Y*pa));p.push(Ka)};var Ka=J;null==l&&(l=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/2));b(l.x,l.y,!0);b(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(b);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(b,h,q){b=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return b};r.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*
Math.tan(l),.5*q);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,l));return b};ba.prototype.getConstraints=function(b,h,q){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-l)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return b};E.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3738,8 +3739,8 @@ null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.
"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(h+l),p))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=
-mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,q));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};bb.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,h,q){b=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(p+h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};za.prototype.getConstraints=function(b,h,q){h=parseFloat(mxUtils.getValue(b,"jettyWidth",za.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
"jettyHeight",za.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*b,3.5*b))];q>5*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*b&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>
@@ -3755,12 +3756,12 @@ h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];Q.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;$a.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(h+l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};db.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return b};cb.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};ib.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
+1),!1));return b};jb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=
function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return b};t.prototype.getConstraints=function(b,h,q){b=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return b};Ia.prototype.getConstraints=
@@ -3768,7 +3769,7 @@ function(b,h,q){b=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mx
0),!1,null,p,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return b};Z.prototype.constraints=null;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(m){d.escape();m=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),m);null!=m&&d.setSelectionCells(m)}function c(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var m=d.getSelectionCells(),r=0;r<m.length;r++)d.cellLabelChanged(m[r],"")}finally{d.getModel().endUpdate()}}}function f(m,r,x,A,C){C.getModel().beginUpdate();try{var F=C.getCellGeometry(m);null!=F&&x&&A&&(x/=A,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,C.getModel().setGeometry(m,
F));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var m=d.view.scale,
@@ -4069,26 +4070,26 @@ image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:
{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn")+" 2.0",id:"bpmn2",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"},{title:"Value Stream Mapping",id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",
id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:"Fluid Power (ISO 1219)",id:"fluid_power",image:IMAGE_PATH+"/sidebar-fluid_power.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},
{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Threat Modeling",id:"threatModeling",image:IMAGE_PATH+"/sidebar-threatmodeling.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&
-(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=h.cloneNode(!0);
-p.style.backgroundImage="";p.style.textDecoration="none";p.style.fontWeight="bold";p.style.fontSize="14px";p.style.color="rgb(80, 80, 80)";p.style.width="456px";p.style.backgroundColor="#ffffff";p.style.paddingLeft="6px";var q=p.getElementsByTagName("button")[0];q.parentNode.removeChild(q);var t=k.cloneNode(!0);t.style.backgroundColor="#ffffff";t.style.borderColor="transparent";t.style.width="456px";p=(new DOMParser).parseFromString('<body style="background:#ffffff;font-family:Helvetica,Arial;">'+
-p.outerHTML+t.outerHTML+"</body>","text/html");this.editorUi.editor.convertImages(p.documentElement,mxUtils.bind(this,function(v){var w='<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css"></head>'+mxUtils.getXml(v)+"</html>";t.style.position="absolute";window.document.body.appendChild(t);var r=t.clientHeight+18;t.parentNode.removeChild(t);this.editorUi.confirm("Image data created",mxUtils.bind(this,function(){(new mxXmlRequest(EXPORT_URL,
-"w=456&h="+r+"&html="+encodeURIComponent(Graph.compress(w)))).simulate(document,"_blank")}),null,mxResources.get("save"),mxResources.get("cancel"))}))}else{if("none"==k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var u=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=u;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+
-this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&
-(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=
-k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();
-window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,
-h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],
-w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,
-this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,
-r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=
-JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||
-(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==
-this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+
-"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));
-this.setCurrentSearchEntryLibrary("clipart","finance");this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",
-h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",
-h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),
-{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
+(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=k.getElementsByTagName("svg");
+var q=(Math.ceil(p.length/6)+1)*this.thumbHeight,t=Graph.createSvgNode(0,0,456,q,"#ffffff"),u=new mxSvgCanvas2D(t);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var v=h.childNodes,w=0;w<v.length;w++)if(v[w].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(v[w]));break}for(w=0;w<p.length;w++)u=p[w].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
+u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(w,6)),u.setAttribute("y",24+68*Math.floor(w/6)),t.appendChild(u);this.editorUi.editor.convertImages(t,mxUtils.bind(this,function(y){var x=document.createElement("canvas");x.width=456;x.height=q;var z=document.createElement("img");z.onload=mxUtils.bind(this,function(){x.getContext("2d").drawImage(z,0,0);this.editorUi.saveCanvas(x,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(t);z.src=Editor.createSvgDataUri(y)}))}else{if("none"==
+k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var r=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=r;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);
+mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=
+function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<
+k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<
+h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
+Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,
+C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerHTML="",mxUtils.write(F,this.editorUi.getResource(x.title))):
+(D.style.display="none",F.innerHTML="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerHTML="";mxUtils.write(C,mxResources.get("loading")+
+"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerHTML="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));
+else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?
+(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",
+";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.setCurrentSearchEntryLibrary("clipart","finance");
+this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
+"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
+"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",
+Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",h+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(p,k);this.addCisco19Palette();this.addCiscoSafePalette();
this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(m,k);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(q,k);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
@@ -10933,9 +10934,9 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,f,l,d){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(u){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[u]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=u?this.mergeFile(u,b,f,d):this.reloadFile(b,
f))}catch(t){null!=f&&f(t)}}),f))};
DrawioFile.prototype.mergeFile=function(b,f,l,d){var u=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),D=b.getShadowPages();if(null!=D&&0<D.length){var c=[this.ui.diffPages(null!=d?d:t,D)],e=this.ignorePatches(c);this.setShadowPages(D);if(e)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",e);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;d={};e={};var g=this.ui.patchPages(t,c[0]),k=this.ui.getHashValueForPages(g,
-d),m=this.ui.getHashValueForPages(D,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(D)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),y=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+y+"\nTo: "+A+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var z=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==z||mxUtils.isEmptyObject(z)||c.push(z)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,n);else{var L=this.getCurrentUser(),M=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),M,n)}}catch(x){}}};
+d),m=this.ui.getHashValueForPages(D,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(D)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+z+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var y=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||c.push(y)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(K){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(K);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,K);else{var L=this.getCurrentUser(),N=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),N,K)}}catch(q){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var u=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,u,!0);l.appendChild(u)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,f,l,d,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(b=0;b<f.length;b++)this.ui.anonymizePatch(f[b]);var t=mxUtils.bind(this,function(e){var g=this.compressReportData(JSON.stringify(f,null,2));e=null==e?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(e.data)),
@@ -10943,7 +10944,7 @@ DrawioFile.prototype.checksumError=function(b,f,l,d,u){this.stats.checksumErrors
JSON.stringify(f).length+"-patches_"+f.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:u,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(f).length+"-patches_"+f.length+"-size_"+this.getSize()})}catch(e){}}}catch(e){}};
DrawioFile.prototype.sendErrorReport=function(b,f,l,d){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),D=this.getCurrentUser(),c=null!=D?this.ui.hashValue(D.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),k=g.lastIndexOf(".");D="xml";0<k&&(D=g.substring(k));var m=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+D+")\nUser="+c+e+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+u+"\n\nData:\n"+t,d)}catch(q){}};
+"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+u+"\n\nData:\n"+t,d)}catch(p){}};
DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var l=mxUtils.bind(this,function(){this.stats.fileReloaded++;var d=this.ui.editor.graph.getViewState(),u=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,d,u);null!=this.backupPatch&&this.patch([this.backupPatch]);var D=this.ui.getCurrentFile();null!=D&&(D.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
@@ -11004,8 +11005,8 @@ DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.proto
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,l){this.saveAs(this.title,f,l)};LocalFile.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalFile.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
LocalFile.prototype.saveFile=function(b,f,l,d,u){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var D=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),e=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var k=mxUtils.bind(this,
-function(q){this.savingFile=!1;null!=d&&d({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);this.desc.lastModified==v.lastModified?q.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){try{var A=this.desc;this.savingFile=!1;this.desc=y;this.fileSaved(D,A,c,k);this.removeDraft()}catch(z){k(z)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
+function(p){this.savingFile=!1;null!=d&&d({error:p})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(p){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);this.desc.lastModified==v.lastModified?p.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){p.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var z=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(D,z,c,k);this.removeDraft()}catch(y){k(y)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));c()}});t?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){e(g)}),d,this.ui.getCurrentFile()!=this?D:null,f.scale,f.border)):e(D)};
LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,l){LocalFile.call(this,b,f,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,l){this.saveAs(this.getTitle(),f,l)};StorageFile.prototype.saveAs=function(b,f,l){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,l)};
@@ -11021,11 +11022,11 @@ StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(u){var t=[];
StorageLibrary.prototype.isRenamable=function(b,f,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,l){RemoteFile.call(this,b,f,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,l){};
RemoteLibrary.prototype.saveAs=function(b,f,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,l){StorageFile.call(this,b,f,l);b=l;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,l){return!1};UrlLibrary.prototype.saveAs=function(b,f,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,l){DrawioFile.call(this,b,f);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,l){function d(m,q,v,y,A,z){function L(){mxEvent.addListener(M,"click",null!=z?z:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
-function(F){b.spinner.stop();b.handleError(F)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++D>l&&(mxUtils.br(e),D=1);var M=document.createElement("a");M.style.overflow="hidden";M.style.display="inline-block";M.className="geBaseButton";M.style.boxSizing="border-box";M.style.fontSize="11px";M.style.position="relative";M.style.margin="4px";M.style.marginTop="8px";M.style.marginBottom="0px";M.style.padding="8px 10px 8px 10px";M.style.width="88px";M.style.height=
-"100px";M.style.whiteSpace="nowrap";M.setAttribute("title",q);var n=document.createElement("div");n.style.textOverflow="ellipsis";n.style.overflow="hidden";n.style.position="absolute";n.style.bottom="8px";n.style.left="0px";n.style.right="0px";mxUtils.write(n,q);M.appendChild(n);if(null!=m){var x=document.createElement("img");x.setAttribute("src",m);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="60px";x.style.height="60px";x.style.paddingBottom="6px";M.appendChild(x)}else n.style.paddingTop=
-"5px",n.style.whiteSpace="normal",mxClient.IS_IOS?(M.style.padding="0px 10px 20px 10px",M.style.top="6px"):mxClient.IS_FF&&(n.style.paddingTop="0px",n.style.marginTop="-2px");if(null!=A)for(m=0;m<A.length;m++)mxUtils.br(n),mxUtils.write(n,A[m]);if(null!=y&&null==b[y]){x.style.visibility="hidden";mxUtils.setOpacity(n,10);var K=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});K.spin(M);
-var B=window.setTimeout(function(){null==b[y]&&(K.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(B),mxUtils.setOpacity(n,100),x.style.visibility="",K.stop(),L(),"drive"==y&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(M)}l=null!=l?l:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom=
+var StorageDialog=function(b,f,l){function d(m,p,v,x,z,y){function L(){mxEvent.addListener(N,"click",null!=y?y:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
+function(B){b.spinner.stop();b.handleError(B)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++D>l&&(mxUtils.br(e),D=1);var N=document.createElement("a");N.style.overflow="hidden";N.style.display="inline-block";N.className="geBaseButton";N.style.boxSizing="border-box";N.style.fontSize="11px";N.style.position="relative";N.style.margin="4px";N.style.marginTop="8px";N.style.marginBottom="0px";N.style.padding="8px 10px 8px 10px";N.style.width="88px";N.style.height=
+"100px";N.style.whiteSpace="nowrap";N.setAttribute("title",p);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.overflow="hidden";K.style.position="absolute";K.style.bottom="8px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,p);N.appendChild(K);if(null!=m){var q=document.createElement("img");q.setAttribute("src",m);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";N.appendChild(q)}else K.style.paddingTop=
+"5px",K.style.whiteSpace="normal",mxClient.IS_IOS?(N.style.padding="0px 10px 20px 10px",N.style.top="6px"):mxClient.IS_FF&&(K.style.paddingTop="0px",K.style.marginTop="-2px");if(null!=z)for(m=0;m<z.length;m++)mxUtils.br(K),mxUtils.write(K,z[m]);if(null!=x&&null==b[x]){q.style.visibility="hidden";mxUtils.setOpacity(K,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(N);
+var A=window.setTimeout(function(){null==b[x]&&(E.stop(),N.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(B,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(A),mxUtils.setOpacity(K,100),q.style.visibility="",E.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(N)}l=null!=l?l:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom=
"20px";var t=document.createElement("div");t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";t.style.padding="10px 0px 20px 0px";var D=0,c=0,e=document.createElement("div");e.style.paddingTop="2px";t.appendChild(e);var g=document.createElement("p"),k=document.createElement("p");k.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");u.appendChild(k);u.appendChild(t);D=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");t=document.createElement("span");t.style.position="absolute";t.style.cursor="pointer";t.style.bottom="27px";t.style.color="gray";t.style.userSelect="none";t.style.textAlign="center";t.style.left="50%";mxUtils.setPrefixedStyle(t.style,
@@ -11037,352 +11038,352 @@ b.addLanguageMenu(f,!0);null!=l&&(l.style.bottom="19px")}var d=document.createEl
c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");D.setAttribute("align","center");g.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,l);k.style.textAlign="left";k.appendChild(d);e.appendChild(g);e.appendChild(k);c.appendChild(e);D.appendChild(c);f.appendChild(D);l=document.createElement("span");l.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");mxUtils.write(l,mxResources.get("changeStorage"));mxEvent.addListener(l,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(l)}mxUtils.write(t,mxResources.get("createNewDiagram"));mxEvent.addListener(t,"click",function(){b.hideDialog();b.actions.get("new").funct()});u.appendChild(t);mxUtils.br(u);t=document.createElement("button");t.className="geBigButton";t.style.marginBottom="22px";t.style.fontSize=
"18px";t.style.padding="10px";t.style.width="340px";mxUtils.write(t,mxResources.get("openExistingDiagram"));mxEvent.addListener(t,"click",function(){b.actions.get("open").funct()});u.appendChild(t);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(v){t.style.marginBottom="24px";var y=document.createElement("a");y.style.display="inline-block";y.style.color="gray";y.style.cursor="pointer";y.style.marginTop="6px";mxUtils.write(y,mxResources.get("signOut"));t.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(y,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){v()})});u.appendChild(y)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");t.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(d);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(l=0;l<m.length;l++)D=document.createElement("option"),mxUtils.write(D,m[l].displayName),D.value=l,q.appendChild(D),
-D=document.createElement("option"),D.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(D,"<"+m[l].email+">"),D.setAttribute("disabled","disabled"),q.appendChild(D);D=document.createElement("option");mxUtils.write(D,mxResources.get("addAccount"));D.value=m.length;q.appendChild(D);mxEvent.addListener(q,"change",function(){var v=q.value,y=m.length!=v;y&&b.drive.setUser(m[v]);b.drive.authorize(y,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
-b.showSplash()})},!0)});u.appendChild(q)}else l(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(v){t.style.marginBottom="24px";var x=document.createElement("a");x.style.display="inline-block";x.style.color="gray";x.style.cursor="pointer";x.style.marginTop="6px";mxUtils.write(x,mxResources.get("signOut"));t.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(x,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){v()})});u.appendChild(x)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");t.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(d);var p=document.createElement("select");p.style.marginLeft="4px";p.style.width="140px";for(l=0;l<m.length;l++)D=document.createElement("option"),mxUtils.write(D,m[l].displayName),D.value=l,p.appendChild(D),
+D=document.createElement("option"),D.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(D,"<"+m[l].email+">"),D.setAttribute("disabled","disabled"),p.appendChild(D);D=document.createElement("option");mxUtils.write(D,mxResources.get("addAccount"));D.value=m.length;p.appendChild(D);mxEvent.addListener(p,"change",function(){var v=p.value,x=m.length!=v;x&&b.drive.setUser(m[v]);b.drive.authorize(x,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
+b.showSplash()})},!0)});u.appendChild(p)}else l(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});f.appendChild(u);this.container=f},EmbedDialog=function(b,f,l,d,u,t,D,c,e){D=null!=D?D:"Check out the diagram I made using @drawio";d=document.createElement("div");var g=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=t?mxUtils.write(d,t):mxUtils.write(d,mxResources.get(5E5>f.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);t=document.createElement("div");
t.style.position="absolute";t.style.top="30px";t.style.right="30px";t.style.color="gray";mxUtils.write(t,b.formatFileSize(f.length));d.appendChild(t);var k=document.createElement("textarea");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.marginTop="10px";k.style.resize="none";k.style.height="150px";k.style.width="440px";k.style.border=
"1px solid gray";k.value=mxResources.get("updatingDocument");d.appendChild(k);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(k.value=f,k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)):(k.setAttribute("readonly","true"),k.value=mxResources.get("tooLargeUseDownload"))},0)};t=document.createElement("div");t.style.position="absolute";t.style.bottom="36px";t.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(null!=c?c:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var v=5E5>f.length?k.value:f;if(null!=u)u(v);else if(g)try{var y=b.openLink(v);null!=y&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=y&&null!=y.location.href&&y.location.href.substring(0,8)!=v.substring(0,8)&&(y.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(z){}}),
-l||500)}catch(z){b.handleError({message:z.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",t.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=e?e:"embed.txt","txt",f,"text/plain")}),c.className="geBtn",t.appendChild(c);if(g&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var v="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(k.value);b.openLink(v)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}});c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height",
-"18");c.setAttribute("border","0");q.appendChild(c);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";t.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var v="https://twitter.com/intent/tweet?text="+encodeURIComponent(D)+"&url="+encodeURIComponent(k.value);b.openLink(v)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),
-c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",q.appendChild(c),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",t.appendChild(q))}!b.isOffline()&&5E5>f.length&&(q=mxUtils.button("",function(){try{var v="mailto:?subject="+encodeURIComponent(e||
-b.defaultFilename)+"&body="+encodeURIComponent(k.value);b.openLink(v)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.mailImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",Editor.isDarkMode()&&(c.style.filter="invert(100%)"),q.appendChild(c),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className=
-"geBtn",t.appendChild(q));c=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.appendChild(c);q=mxUtils.button(mxResources.get("copy"),function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(t.appendChild(q),q.className="geBtn gePrimaryBtn",
+mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(null!=c?c:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var v=5E5>f.length?k.value:f;if(null!=u)u(v);else if(g)try{var x=b.openLink(v);null!=x&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=x&&null!=x.location.href&&x.location.href.substring(0,8)!=v.substring(0,8)&&(x.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(y){}}),
+l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",t.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=e?e:"embed.txt","txt",f,"text/plain")}),c.className="geBtn",t.appendChild(c);if(g&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var p=mxUtils.button("",function(){try{var v="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}});c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height",
+"18");c.setAttribute("border","0");p.appendChild(c);p.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";t.appendChild(p)}7168>f.length&&(p=mxUtils.button("",function(){try{var v="https://twitter.com/intent/tweet?text="+encodeURIComponent(D)+"&url="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),
+c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",p.appendChild(c),p.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",t.appendChild(p))}!b.isOffline()&&5E5>f.length&&(p=mxUtils.button("",function(){try{var v="mailto:?subject="+encodeURIComponent(e||
+b.defaultFilename)+"&body="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.mailImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",Editor.isDarkMode()&&(c.style.filter="invert(100%)"),p.appendChild(c),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className=
+"geBtn",t.appendChild(p));c=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.appendChild(c);p=mxUtils.button(mxResources.get("copy"),function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(t.appendChild(p),p.className="geBtn gePrimaryBtn",
c.className="geBtn"):(t.appendChild(m),c.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(t);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function l(){var F=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(x.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(G+="&title="+encodeURIComponent(F));0<K.length&&(G+="&s="+K);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(n.checked?"1":"0");
-G+="&resize="+(M.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;u.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":z.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
-F&&(G+="&title="+encodeURIComponent(F)),""!=m.value&&(F=parseInt(m.value)+parseInt(k.value),G+="&height="+F),g.value=G):g.value=""}var d=document.createElement("div"),u=b.editor.graph,t=u.getGraphBounds(),D=u.view.scale,c=Math.floor(t.x/D-u.view.translate.x),e=Math.floor(t.y/D-u.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
+var GoogleSitesDialog=function(b,f){function l(){var B=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(q.checked&&""!=p.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=B&&(G+="&title="+encodeURIComponent(B));0<E.length&&(G+="&s="+E);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(K.checked?"1":"0");
+G+="&resize="+(N.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;u.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":y.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else A.constructor==DriveFile||A.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?G+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(G+=A.getHash().substring(1),G=A.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+B&&(G+="&title="+encodeURIComponent(B)),""!=m.value&&(B=parseInt(m.value)+parseInt(k.value),G+="&height="+B),g.value=G):g.value=""}var d=document.createElement("div"),u=b.editor.graph,t=u.getGraphBounds(),D=u.view.scale,c=Math.floor(t.x/D-u.view.translate.x),e=Math.floor(t.y/D-u.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
d.appendChild(g);mxUtils.br(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=c;d.appendChild(k);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");
-m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(t.height/D);d.appendChild(m);mxUtils.br(d);t=document.createElement("hr");t.setAttribute("size","1");t.style.marginBottom="16px";t.style.marginTop="16px";d.appendChild(t);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=f||"";d.appendChild(q);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("pan")+" ");var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);d.appendChild(z);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var M=document.createElement("input");M.setAttribute("type","checkbox");M.setAttribute("checked","checked");M.defaultChecked=!0;M.style.marginLeft="16px";d.appendChild(M);mxUtils.write(d,mxResources.get("resize")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";d.appendChild(n);mxUtils.write(d,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft=
-"8px";d.appendChild(x);mxUtils.write(d,mxResources.get("embed")+" ");var K=b.getBasenames().join(";"),B=b.getCurrentFile();mxEvent.addListener(y,"change",l);mxEvent.addListener(A,"change",l);mxEvent.addListener(M,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(x,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(q,"change",l);l();
+m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(t.height/D);d.appendChild(m);mxUtils.br(d);t=document.createElement("hr");t.setAttribute("size","1");t.style.marginBottom="16px";t.style.marginTop="16px";d.appendChild(t);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=f||"";d.appendChild(p);
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("checked","checked");N.defaultChecked=!0;N.style.marginLeft="16px";d.appendChild(N);mxUtils.write(d,mxResources.get("resize")+" ");var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";d.appendChild(K);mxUtils.write(d,mxResources.get("fit")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft=
+"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),A=b.getCurrentFile();mxEvent.addListener(x,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(K,"change",l);mxEvent.addListener(y,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(q,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(p,"change",l);l();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn gePrimaryBtn";f.appendChild(t);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,l){var d=document.createElement("div");d.style.textAlign="right";this.init=
function(){var u=document.createElement("div");u.style.position="relative";u.style.border="1px solid gray";u.style.width="100%";u.style.height="360px";u.style.overflow="hidden";u.style.marginBottom="16px";mxEvent.disableContextMenu(u);d.appendChild(u);var t=new Graph(u);t.setCellsCloneable(!0);t.setPanning(!0);t.setAllowDanglingEdges(!1);t.connectionHandler.select=!1;t.view.setTranslate(20,20);t.border=20;t.panningHandler.useLeftButtonForPanning=!0;var D="curved=1;";t.cellRenderer.installCellOverlayListeners=
-function(A,z,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(M){z.fireEvent(new mxEventObject("pointerdown","event",M,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(M){z.fireEvent(new mxEventObject("pointerdown","event",M,"state",A))})};t.getAllConnectionConstraints=function(){return null};t.connectionHandler.marker.highlight.keepOnTop=
-!1;t.connectionHandler.createEdgeState=function(A){A=t.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var c=t.getDefaultParent(),e=mxUtils.bind(this,function(A){var z=new mxCellOverlay(this.connectImage,"Add outgoing");z.cursor="hand";z.addListener(mxEvent.CLICK,function(L,M){t.connectionHandler.reset();t.clearSelection();var n=t.getCellGeometry(A),x;m(function(){x=t.insertVertex(c,null,"Entry",n.x,n.y,80,30,"rounded=1;");e(x);t.view.refresh(x);
-t.insertEdge(c,null,"",A,x,D)},function(){t.scrollCellToVisible(x)})});z.addListener("pointerdown",function(L,M){L=M.getProperty("event");M=M.getProperty("state");t.popupMenuHandler.hideMenu();t.stopEditing(!1);var n=mxUtils.convertPoint(t.container,mxEvent.getClientX(L),mxEvent.getClientY(L));t.connectionHandler.start(M,n.x,n.y);t.isMouseDown=!0;t.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});t.addCellOverlay(A,z)});t.getModel().beginUpdate();try{var g=t.insertVertex(c,null,"Start",
+function(z,y,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))})};t.getAllConnectionConstraints=function(){return null};t.connectionHandler.marker.highlight.keepOnTop=
+!1;t.connectionHandler.createEdgeState=function(z){z=t.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var c=t.getDefaultParent(),e=mxUtils.bind(this,function(z){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(L,N){t.connectionHandler.reset();t.clearSelection();var K=t.getCellGeometry(z),q;m(function(){q=t.insertVertex(c,null,"Entry",K.x,K.y,80,30,"rounded=1;");e(q);t.view.refresh(q);
+t.insertEdge(c,null,"",z,q,D)},function(){t.scrollCellToVisible(q)})});y.addListener("pointerdown",function(L,N){L=N.getProperty("event");N=N.getProperty("state");t.popupMenuHandler.hideMenu();t.stopEditing(!1);var K=mxUtils.convertPoint(t.container,mxEvent.getClientX(L),mxEvent.getClientY(L));t.connectionHandler.start(N,K.x,K.y);t.isMouseDown=!0;t.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});t.addCellOverlay(z,y)});t.getModel().beginUpdate();try{var g=t.insertVertex(c,null,"Start",
0,0,80,30,"ellipse");e(g)}finally{t.getModel().endUpdate()}if("horizontalTree"==l){var k=new mxCompactTreeLayout(t);k.edgeRouting=!1;k.levelDistance=30;D="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(k=new mxCompactTreeLayout(t,!1),k.edgeRouting=!1,k.levelDistance=30,D="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(k=new mxRadialTreeLayout(t,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==l?k=new mxHierarchicalLayout(t,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-l?k=new mxHierarchicalLayout(t,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(t,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(t));if(null!=k){var m=function(A,z){t.getModel().beginUpdate();try{null!=A&&A(),k.execute(t.getDefaultParent(),g)}catch(L){throw L;}finally{A=new mxMorphing(t),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){t.getModel().endUpdate();null!=z&&z()})),A.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(A,z,L,M,n){q.apply(this,arguments);m()};t.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};t.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var y=mxUtils.button(mxResources.get("insert"),function(A){t.clearCellOverlays();
-var z=t.getModel().getChildren(t.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(t.getBoundingBoxFromGeometry(z,!0));z=b.editor.graph.importCells(z,A.x,A.y);A=b.editor.graph.view;var L=A.getBounds(z);L.x-=A.translate.x;L.y-=A.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(z);null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()});d.appendChild(y);y.className="geBtn gePrimaryBtn";
+l?k=new mxHierarchicalLayout(t,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(t,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(t));if(null!=k){var m=function(z,y){t.getModel().beginUpdate();try{null!=z&&z(),k.execute(t.getDefaultParent(),g)}catch(L){throw L;}finally{z=new mxMorphing(t),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){t.getModel().endUpdate();null!=y&&y()})),z.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(z,y,L,N,K){p.apply(this,arguments);m()};t.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};t.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(z){t.clearCellOverlays();
+var y=t.getModel().getChildren(t.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(t.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,z.x,z.y);z=b.editor.graph.view;var L=z.getBounds(y);L.x-=z.translate.x;L.y-=z.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(y);null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()});d.appendChild(x);x.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||d.appendChild(v)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,f,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var u=document.createElement("h2");mxUtils.write(u,mxResources.get("backgroundImage"));u.style.marginTop="0px";d.appendChild(u);var t=null!=l&&null!=l.originalSrc;u=!1;var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");
c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.width="360px";e.value=t||null==l?"":l.src;var g=document.createElement("select");g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var m=document.createElement("option");mxUtils.write(m,b.pages[k].getName()||
-mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0);g.appendChild(m)}t||null!=b.pages&&1!=b.pages.length||(D.style.display="none",c.style.display="none",g.style.display="none");var q=document.createElement("option"),v=!1,y=!1,A=function(x,K){v||null!=x&&y||(c.checked?null!=K&&K(q.selected?null:
-g.value):""==e.value||b.isOffline()?(L.value="",M.value="",null!=K&&K("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(B){L.value=B.width;M.value=B.height;null!=K&&K(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";M.value="";null!=K&&K(null)})))},z=mxUtils.bind(this,function(x){b.importFiles(x,0,0,b.maxBackgroundSize,function(K,B,F,G,N,J){e.value=K;A();e.focus()},function(){},function(K){return"image/"==K.type.substring(0,
-6)},function(K){for(var B=0;B<K.length;B++)K[B]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){t?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){D.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var x=d.parentNode,K=null;mxEvent.addListener(x,
-"dragleave",function(B){null!=K&&(K.parentNode.removeChild(K),K=null);B.stopPropagation();B.preventDefault()});mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(B){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&(K=b.highlightElement(x));B.stopPropagation();B.preventDefault()}));mxEvent.addListener(x,"drop",mxUtils.bind(this,function(B){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<B.dataTransfer.files.length)z(B.dataTransfer.files);else if(0<=mxUtils.indexOf(B.dataTransfer.types,
-"text/uri-list")){var F=B.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(e.value=decodeURIComponent(F),A())}B.stopPropagation();B.preventDefault()}),!1)}};d.appendChild(D);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
-L.value=null==l||t?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.width="60px";M.style.marginLeft="8px";M.style.marginRight="16px";M.value=null==l||t?"":l.height;d.appendChild(M);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",A);ImageDialog.filePicked=function(x){x.action==google.picker.Action.PICKED&&null!=x.docs[0].thumbnails&&(x=x.docs[0].thumbnails[x.docs[0].thumbnails.length-1],
-null!=x&&(e.value=x.url,A()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);t?(c.setAttribute("checked","checked"),c.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!u&&c.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),g.appendChild(q),mxEvent.addListener(g,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));l=document.createElement("div");
-l.style.marginTop="30px";l.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&l.appendChild(u);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";M.value="";D.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type",
-"file");mxEvent.addListener(n,"change",function(x){null!=n.files&&(z(n.files),n.type="",n.type="file",n.value="")});n.style.display="none";d.appendChild(n);k=mxUtils.button(mxResources.get("open"),function(){n.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(x){f(""!=x&&null!=x?new mxImage(x,L.value,M.value):null,null==x)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
-l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(u);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,y,A){var z=v.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(U,Q,W,V,X){t=mxEvent.isAltDown(A)?t:M.getCenterInsertPoint(new mxRectangle(0,0,V,X));var p=null;M.getModel().beginUpdate();try{p="txt"==Q?b.insertAsPreText(W,t.x,t.y):M.insertVertex(null,null,null,t.x,t.y,
-V,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(W)+";"),M.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:U,format:Q},null,2))}finally{M.getModel().endUpdate()}null!=p&&(M.setSelectionCell(p),M.scrollCellToVisible(p))},M=b.editor.graph,n="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-v&&"svg"==n?window.setTimeout(function(){b.spinner.stop();L(v,n,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(v,n,function(U,Q,W){b.spinner.stop();L(v,n,U,Q,W)},function(U){b.handleError(U)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(M=b.editor.graph,b.generateMermaidImage(v,n,function(U,Q,W){t=mxEvent.isAltDown(A)?t:M.getCenterInsertPoint(new mxRectangle(0,0,Q,W));b.spinner.stop();var V=null;M.getModel().beginUpdate();try{V=M.insertVertex(null,null,null,t.x,t.y,Q,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-U+";"),M.setAttributeForCell(V,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{M.getModel().endUpdate()}null!=V&&(M.setSelectionCell(V),M.scrollCellToVisible(V))},function(U){b.handleError(U)}));else if("table"==y){y=null;for(var x=[],K=0,B={},F=0;F<z.length;F++){var G=mxUtils.trim(z[F]);if("primary key"==G.substring(0,11).toLowerCase()){var N=G.match(/\((.+)\)/);N&&N[1]&&(B[N[1]]=!0);z.splice(F,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
-!0,z[F]=mxUtils.trim(G.replace(/primary key/i,"")))}for(F=0;F<z.length;F++)if(G=mxUtils.trim(z[F]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(K,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,x.push(y),G=b.editor.graph.getPreferredSizeForCell(J),null!=
-G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))K+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");J.vertex=!0;var E=new mxCell(N?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));E.vertex=!0;J.insert(E);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;J.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
-Math.max(y.geometry.width,G.width+30)));y.insert(J,N?0:null);y.geometry.height+=30}0<x.length&&(M=b.editor.graph,t=mxEvent.isAltDown(A)?t:M.getCenterInsertPoint(M.getBoundingBoxFromGeometry(x,!0)),M.setSelectionCells(M.importCells(x,t.x,t.y)),M.scrollCellToVisible(M.getSelectionCell()))}else if("list"==y){if(0<z.length){M=b.editor.graph;J=null;x=[];for(F=y=0;F<z.length;F++)";"!=z[F].charAt(0)&&(0==z[F].length?J=null:null==J?(J=new mxCell(z[F],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-J.vertex=!0,x.push(J),G=M.getPreferredSizeForCell(J),null!=G&&J.geometry.width<G.width+10&&(J.geometry.width=G.width+10),y+=J.geometry.width+40):"--"==z[F]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,J.geometry.height+=G.geometry.height,J.insert(G)):0<z[F].length&&(K=new mxCell(z[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-K.vertex=!0,G=M.getPreferredSizeForCell(K),null!=G&&K.geometry.width<G.width&&(K.geometry.width=G.width),J.geometry.width=Math.max(J.geometry.width,K.geometry.width),J.geometry.height+=K.geometry.height,J.insert(K)));if(0<x.length){t=mxEvent.isAltDown(A)?t:M.getCenterInsertPoint(M.getBoundingBoxFromGeometry(x,!0));M.getModel().beginUpdate();try{x=M.importCells(x,t.x,t.y);G=[];for(F=0;F<x.length;F++)G.push(x[F]),G=G.concat(x[F].children);M.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{M.getModel().endUpdate()}M.setSelectionCells(x);
-M.scrollCellToVisible(M.getSelectionCell())}}}else{J=function(U){var Q=H[U];null==Q&&(Q=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),Q.vertex=!0,H[U]=Q,x.push(Q));return Q};var H={};x=[];for(F=0;F<z.length;F++)if(";"!=z[F].charAt(0)){var S=z[F].split("->");2<=S.length&&(N=J(S[0]),E=J(S[S.length-1]),S=new mxCell(2<S.length?S[1]:"",new mxGeometry),S.edge=!0,N.insertEdge(S,!0),E.insertEdge(S,!1),x.push(S))}if(0<x.length){z=document.createElement("div");z.style.visibility="hidden";
-document.body.appendChild(z);M=new Graph(z);M.getModel().beginUpdate();try{x=M.importCells(x);for(F=0;F<x.length;F++)M.getModel().isVertex(x[F])&&(G=M.getPreferredSizeForCell(x[F]),x[F].geometry.width=Math.max(x[F].geometry.width,G.width),x[F].geometry.height=Math.max(x[F].geometry.height,G.height));F=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(M,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(M.getDefaultParent(),x),F=!1):"circle"==y?
-(new mxCircleLayout(M)).execute(M.getDefaultParent()):(K=new mxFastOrganicLayout(M),K.disableEdgeStyle=!1,K.forceConstant=180,K.execute(M.getDefaultParent()));F&&(B=new mxParallelEdgeLayout(M),B.spacing=30,B.execute(M.getDefaultParent()))}finally{M.getModel().endUpdate()}M.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{x=M.getModel().getChildren(M.getDefaultParent()),t=mxEvent.isAltDown(A)?t:b.editor.graph.getCenterInsertPoint(M.getBoundingBoxFromGeometry(x,!0)),G=b.editor.graph.importCells(x,
-t.x,t.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());M.destroy();z.parentNode.removeChild(z)}}}function u(){return"list"==c.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==c.value?
+mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0);g.appendChild(m)}t||null!=b.pages&&1!=b.pages.length||(D.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,z=function(q,E){v||null!=q&&x||(c.checked?null!=E&&E(p.selected?null:
+g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=E&&E("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(A){L.value=A.width;N.value=A.height;null!=E&&E(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=E&&E(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(E,A,B,G,M,H){e.value=E;z();e.focus()},function(){},function(E){return"image/"==E.type.substring(0,
+6)},function(E){for(var A=0;A<E.length;A++)E[A]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){t?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){D.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,E=null;mxEvent.addListener(q,
+"dragleave",function(A){null!=E&&(E.parentNode.removeChild(E),E=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(A){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(q));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(A){null!=E&&(E.parentNode.removeChild(E),E=null);if(0<A.dataTransfer.files.length)y(A.dataTransfer.files);else if(0<=mxUtils.indexOf(A.dataTransfer.types,
+"text/uri-list")){var B=A.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(B)&&(e.value=decodeURIComponent(B),z())}A.stopPropagation();A.preventDefault()}),!1)}};d.appendChild(D);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
+L.value=null==l||t?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="60px";N.style.marginLeft="8px";N.style.marginRight="16px";N.value=null==l||t?"":l.height;d.appendChild(N);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",z);ImageDialog.filePicked=function(q){q.action==google.picker.Action.PICKED&&null!=q.docs[0].thumbnails&&(q=q.docs[0].thumbnails[q.docs[0].thumbnails.length-1],
+null!=q&&(e.value=q.url,z()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);t?(c.setAttribute("checked","checked"),c.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!u&&c.checked&&(mxUtils.write(p,mxResources.get("pageNotFound")),p.setAttribute("disabled","disabled"),p.setAttribute("selected","selected"),p.setAttribute("value","pageNotFound"),g.appendChild(p),mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)}));l=document.createElement("div");
+l.style.marginTop="30px";l.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&l.appendChild(u);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";N.value="";D.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
+"file");mxEvent.addListener(K,"change",function(q){null!=K.files&&(y(K.files),K.type="",K.type="file",K.value="")});K.style.display="none";d.appendChild(K);k=mxUtils.button(mxResources.get("open"),function(){K.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(q){f(""!=q&&null!=q?new mxImage(q,L.value,N.value):null,null==q)})});mxEvent.addGestureListeners(applyBtn,function(){x=!0});applyBtn.className="geBtn gePrimaryBtn";
+l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(u);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,x,z){var y=v.split("\n");if("plantUmlPng"==x||"plantUmlSvg"==x||"plantUmlTxt"==x){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(W,P,V,U,X){t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(new mxRectangle(0,0,U,X));var n=null;N.getModel().beginUpdate();try{n="txt"==P?b.insertAsPreText(V,t.x,t.y):N.insertVertex(null,null,null,t.x,t.y,
+U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),N.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:W,format:P},null,2))}finally{N.getModel().endUpdate()}null!=n&&(N.setSelectionCell(n),N.scrollCellToVisible(n))},N=b.editor.graph,K="plantUmlTxt"==x?"txt":"plantUmlPng"==x?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+v&&"svg"==K?window.setTimeout(function(){b.spinner.stop();L(v,K,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(v,K,function(W,P,V){b.spinner.stop();L(v,K,W,P,V)},function(W){b.handleError(W)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,K,function(W,P,V){t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(new mxRectangle(0,0,P,V));b.spinner.stop();var U=null;N.getModel().beginUpdate();try{U=N.insertVertex(null,null,null,t.x,t.y,P,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+W+";"),N.setAttributeForCell(U,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{N.getModel().endUpdate()}null!=U&&(N.setSelectionCell(U),N.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==x){x=null;for(var q=[],E=0,A={},B=0;B<y.length;B++){var G=mxUtils.trim(y[B]);if("primary key"==G.substring(0,11).toLowerCase()){var M=G.match(/\((.+)\)/);M&&M[1]&&(A[M[1]]=!0);y.splice(B,1)}else 0<G.toLowerCase().indexOf("primary key")&&(A[G.split(" ")[0]]=
+!0,y[B]=mxUtils.trim(G.replace(/primary key/i,"")))}for(B=0;B<y.length;B++)if(G=mxUtils.trim(y[B]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),x=new mxCell(G,new mxGeometry(E,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),x.vertex=!0,q.push(x),G=b.editor.graph.getPreferredSizeForCell(H),null!=
+G&&(x.geometry.width=G.width+10);else if(null!=x&&")"==G.charAt(0))E+=x.geometry.width+40,x=null;else if("("!=G&&null!=x){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);M=A[G.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var F=new mxCell(M?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));F.vertex=!0;H.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));G.vertex=!0;H.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&x.geometry.width<G.width+30&&(x.geometry.width=Math.min(320,
+Math.max(x.geometry.width,G.width+30)));x.insert(H,M?0:null);x.geometry.height+=30}0<q.length&&(N=b.editor.graph,t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),N.setSelectionCells(N.importCells(q,t.x,t.y)),N.scrollCellToVisible(N.getSelectionCell()))}else if("list"==x){if(0<y.length){N=b.editor.graph;H=null;q=[];for(B=x=0;B<y.length;B++)";"!=y[B].charAt(0)&&(0==y[B].length?H=null:null==H?(H=new mxCell(y[B],new mxGeometry(x,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+H.vertex=!0,q.push(H),G=N.getPreferredSizeForCell(H),null!=G&&H.geometry.width<G.width+10&&(H.geometry.width=G.width+10),x+=H.geometry.width+40):"--"==y[B]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,H.geometry.height+=G.geometry.height,H.insert(G)):0<y[B].length&&(E=new mxCell(y[B],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+E.vertex=!0,G=N.getPreferredSizeForCell(E),null!=G&&E.geometry.width<G.width&&(E.geometry.width=G.width),H.geometry.width=Math.max(H.geometry.width,E.geometry.width),H.geometry.height+=E.geometry.height,H.insert(E)));if(0<q.length){t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0));N.getModel().beginUpdate();try{q=N.importCells(q,t.x,t.y);G=[];for(B=0;B<q.length;B++)G.push(q[B]),G=G.concat(q[B].children);N.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{N.getModel().endUpdate()}N.setSelectionCells(q);
+N.scrollCellToVisible(N.getSelectionCell())}}}else{H=function(W){var P=I[W];null==P&&(P=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),P.vertex=!0,I[W]=P,q.push(P));return P};var I={};q=[];for(B=0;B<y.length;B++)if(";"!=y[B].charAt(0)){var R=y[B].split("->");2<=R.length&&(M=H(R[0]),F=H(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,M.insertEdge(R,!0),F.insertEdge(R,!1),q.push(R))}if(0<q.length){y=document.createElement("div");y.style.visibility="hidden";
+document.body.appendChild(y);N=new Graph(y);N.getModel().beginUpdate();try{q=N.importCells(q);for(B=0;B<q.length;B++)N.getModel().isVertex(q[B])&&(G=N.getPreferredSizeForCell(q[B]),q[B].geometry.width=Math.max(q[B].geometry.width,G.width),q[B].geometry.height=Math.max(q[B].geometry.height,G.height));B=!0;"horizontalFlow"==x||"verticalFlow"==x?((new mxHierarchicalLayout(N,"horizontalFlow"==x?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(N.getDefaultParent(),q),B=!1):"circle"==x?
+(new mxCircleLayout(N)).execute(N.getDefaultParent()):(E=new mxFastOrganicLayout(N),E.disableEdgeStyle=!1,E.forceConstant=180,E.execute(N.getDefaultParent()));B&&(A=new mxParallelEdgeLayout(N),A.spacing=30,A.execute(N.getDefaultParent()))}finally{N.getModel().endUpdate()}N.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{q=N.getModel().getChildren(N.getDefaultParent()),t=mxEvent.isAltDown(z)?t:b.editor.graph.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),G=b.editor.graph.importCells(q,
+t.x,t.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());N.destroy();y.parentNode.removeChild(y)}}}function u(){return"list"==c.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==c.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==c.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==c.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==c.value||"plantUmlTxt"==c.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var t=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var D=document.createElement("textarea");D.style.boxSizing="border-box";D.style.resize=
"none";D.style.width="100%";D.style.height="354px";D.style.marginBottom="16px";var c=document.createElement("select");if("formatSql"==l||"mermaid"==l)c.style.display="none";var e=document.createElement("option");e.setAttribute("value","list");mxUtils.write(e,mxResources.get("list"));"plantUml"!=l&&c.appendChild(e);null!=l&&"fromText"!=l||e.setAttribute("selected","selected");e=document.createElement("option");e.setAttribute("value","table");mxUtils.write(e,mxResources.get("formatSql"));"formatSql"==
l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","mermaid");mxUtils.write(e,mxResources.get("formatSql"));"mermaid"==l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","diagram");mxUtils.write(e,mxResources.get("diagram"));var g=document.createElement("option");g.setAttribute("value","circle");mxUtils.write(g,mxResources.get("circle"));var k=document.createElement("option");
k.setAttribute("value","horizontalFlow");mxUtils.write(k,mxResources.get("horizontalFlow"));var m=document.createElement("option");m.setAttribute("value","verticalFlow");mxUtils.write(m,mxResources.get("verticalFlow"));"plantUml"!=l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k),c.appendChild(m));e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&e.setAttribute("selected",
-"selected");g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k));var q=u();D.value=q;f.appendChild(D);this.init=function(){D.focus()};
-Graph.fileSupport&&(D.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),D.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var y=new FileReader;y.onload=function(A){D.value=A.target.result};y.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=u();if(0==D.value.length||D.value==q)q=v,D.value=q});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("close"),function(){D.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(v){b.hideDialog();d(D.value,c.value,v)});f.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,y,A,z,L){function M(pa){null!=pa&&(Ba=ua=pa?135:140);pa=!0;if(null!=Ma)for(;H<Ma.length&&(pa||0!=mxUtils.mod(H,30));){var sa=Ma[H++];sa=K(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);pa&&sa.click();pa=!1}}function n(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,E.value);else if(d)l||b.hideDialog(),d(O,E.value,da,T);else{var pa=E.value;null!=pa&&
-0<pa.length&&b.pickFolder(b.mode,function(sa){b.createFile(pa,O,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function x(pa,sa,ya,wa,ra,xa,fa){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");U.removeAttribute("disabled");O=sa;T=ya;P=xa;R=pa;Y=wa;da=fa;ha=ra;R.style.backgroundColor=c;R.style.border=e}function K(pa,sa,ya,wa,ra,xa,fa,ca,
+"selected");g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k));var p=u();D.value=p;f.appendChild(D);this.init=function(){D.focus()};
+Graph.fileSupport&&(D.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),D.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(z){D.value=z.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=u();if(0==D.value.length||D.value==p)p=v,D.value=p});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("close"),function(){D.value==p?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(v){b.hideDialog();d(D.value,c.value,v)});f.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,p,v,x,z,y,L){function N(pa){null!=pa&&(Ba=ua=pa?135:140);pa=!0;if(null!=Ma)for(;I<Ma.length&&(pa||0!=mxUtils.mod(I,30));){var sa=Ma[I++];sa=E(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);pa&&sa.click();pa=!1}}function K(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,F.value);else if(d)l||b.hideDialog(),d(O,F.value,da,T);else{var pa=F.value;null!=pa&&
+0<pa.length&&b.pickFolder(b.mode,function(sa){b.createFile(pa,O,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(pa,sa,ya,wa,ra,xa,fa){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");O=sa;T=ya;Q=xa;S=pa;Y=wa;da=fa;ha=ra;S.style.backgroundColor=c;S.style.border=e}function E(pa,sa,ya,wa,ra,xa,fa,ca,
ba,ja,ia){function ma(La,Ta){null==Ja?(Ga=La,Ga=/^https?:\/\//.test(Ga)&&!b.editor.isCorsEnabledForUrl(Ga)?PROXY_URL+"?url="+encodeURIComponent(Ga):TEMPLATE_PATH+"/"+Ga,mxUtils.get(Ga,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ja=Ua.getText());Ta(Ja,Ga)}))):Ta(Ja,Ga)}function qa(La,Ta,Ua){if(null!=La&&mxUtils.isAncestorNode(document.body,na)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Za=new mxCodec(La.ownerDocument),Wa=new mxGraphModel;
-Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;x(na,null,null,pa,fa,ia)},!0,!1)}}function oa(La,Ta){null==pa||Ra||
+Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(na,null,null,pa,fa,ia)},!0,!1)}}function oa(La,Ta){null==pa||Ra||
b.sidebar.currentElt==na?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
na,Ra=!0,ma(pa,function(Ua){Ra&&b.sidebar.currentElt==na&&qa(Ua,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var na=document.createElement("div");na.className="geTemplate";na.style.position="relative";na.style.height=Ba+"px";na.style.width=ua+"px";var Ja=null,Ga=pa;Editor.isDarkMode()&&(na.style.filter="invert(100%)");null!=ya?na.setAttribute("title",mxResources.get(ya,null,ya)):null!=wa&&0<wa.length&&na.setAttribute("title",wa);var Ra=!1,Sa=null;if(null!=xa){na.style.display="inline-flex";
-na.style.justifyContent="center";na.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",xa);ra.setAttribute("alt",wa);ra.style.maxWidth=Ba+"px";ra.style.maxHeight=ua+"px";Sa=ra;var Ha=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ra);ra.onerror=function(){this.src!=Ha?this.src=Ha:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){x(na,null,null,pa,fa,ia)}),null,null);mxEvent.addListener(na,
-"dblclick",function(La){n();mxEvent.consume(La)})}else if(!ja&&null!=pa&&0<pa.length){var Na=function(La){U.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(pa,function(Ta,Ua){S.stop();null!=Ta&&(x(na,Ta,sa,null,null,ia,Ua),La&&n())})};ra=ba||TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png";na.style.backgroundImage="url("+ra+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
+na.style.justifyContent="center";na.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",xa);ra.setAttribute("alt",wa);ra.style.maxWidth=Ba+"px";ra.style.maxHeight=ua+"px";Sa=ra;var Ha=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ra);ra.onerror=function(){this.src!=Ha?this.src=Ha:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){q(na,null,null,pa,fa,ia)}),null,null);mxEvent.addListener(na,
+"dblclick",function(La){K();mxEvent.consume(La)})}else if(!ja&&null!=pa&&0<pa.length){var Na=function(La){W.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";R.spin(Z);ma(pa,function(Ta,Ua){R.stop();null!=Ta&&(q(na,Ta,sa,null,null,ia,Ua),La&&K())})};ra=ba||TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png";na.style.backgroundImage="url("+ra+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
ya){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";xa=document.createElement("tbody");ba=document.createElement("tr");ja=document.createElement("td");ja.setAttribute("align","center");ja.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";
Pa.style.userSelect="none";Pa.style.borderRadius="3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=Ba-34+"px";mxUtils.write(Pa,mxResources.get(ya,null,ya));ja.appendChild(Pa);ba.appendChild(ja);xa.appendChild(ba);wa.appendChild(xa);na.appendChild(wa)}mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){Na()}),null,null);mxEvent.addListener(na,"dblclick",function(La){Na(!0);mxEvent.consume(La)})}else wa=document.createElement("table"),
wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",xa=document.createElement("tbody"),ba=document.createElement("tr"),ja=document.createElement("td"),ja.setAttribute("align","center"),ja.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",
-Pa.style.maxWidth=Ba-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),ja.appendChild(Pa),ba.appendChild(ja),xa.appendChild(ba),wa.appendChild(xa),na.appendChild(wa),ra&&x(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){x(na,null,null,pa,fa)}),null,null),null!=ca?mxEvent.addListener(na,"click",ca):(mxEvent.addListener(na,"click",function(La){x(na,null,null,pa,fa)}),mxEvent.addListener(na,"dblclick",function(La){n();mxEvent.consume(La)}));if(null!=pa){var Qa=document.createElement("img");
+Pa.style.maxWidth=Ba-34+"px",mxUtils.write(Pa,mxResources.get(ya,null,ya)),ja.appendChild(Pa),ba.appendChild(ja),xa.appendChild(ba),wa.appendChild(xa),na.appendChild(wa),ra&&q(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){q(na,null,null,pa,fa)}),null,null),null!=ca?mxEvent.addListener(na,"click",ca):(mxEvent.addListener(na,"click",function(La){q(na,null,null,pa,fa)}),mxEvent.addListener(na,"dblclick",function(La){K();mxEvent.consume(La)}));if(null!=pa){var Qa=document.createElement("img");
Qa.setAttribute("src",Sidebar.prototype.searchImage);Qa.setAttribute("title",mxResources.get("preview"));Qa.className="geActiveButton";Qa.style.position="absolute";Qa.style.cursor="default";Qa.style.padding="8px";Qa.style.right="0px";Qa.style.top="0px";na.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(La){Ya=b.sidebar.currentElt==na}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(La){Ya||oa(La,Qa);mxEvent.consume(La)}))}Z.appendChild(na);
-return na}function B(){function pa(oa,na){var Ja=mxResources.get(oa);null==Ja&&(Ja=oa.substring(0,1).toUpperCase()+oa.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+na.length+")"}function sa(oa,na,Ja){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Fa[oa][Ja]:Da[oa],W=null,M(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(oa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
-(M(),mxEvent.consume(oa))}));if(0<Oa){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Aa.appendChild(ya);for(var wa in Ka){var ra=document.createElement("div"),xa=wa;ya=Ka[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ra.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=g&&(ra.style.padding=g);Aa.appendChild(ra);(function(oa,na){mxEvent.addListener(ra,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ka[oa],W=null,M(!1))})})(wa,ra)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Aa.appendChild(ya)}for(wa in Da){xa=
+return na}function A(){function pa(oa,na){var Ja=mxResources.get(oa);null==Ja&&(Ja=oa.substring(0,1).toUpperCase()+oa.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+na.length+")"}function sa(oa,na,Ja){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",I=0,Ma=Ja?Fa[oa][Ja]:Da[oa],V=null,N(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(oa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(N(),mxEvent.consume(oa))}));if(0<Oa){var ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,mxResources.get("custom"));Aa.appendChild(ya);for(var wa in Ka){var ra=document.createElement("div"),xa=wa;ya=Ka[wa];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ra.setAttribute("title",xa+" ("+ya.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=g&&(ra.style.padding=g);Aa.appendChild(ra);(function(oa,na){mxEvent.addListener(ra,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",I=0,Ma=Ka[oa],V=null,N(!1))})})(wa,ra)}ya=document.createElement("div");ya.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ya,"draw.io");Aa.appendChild(ya)}for(wa in Da){xa=
Fa[wa];var fa=ra=document.createElement(xa?"ul":"div");ya=Da[wa];var ca=pa(wa,ya);if(null!=xa){var ba=document.createElement("li"),ja=document.createElement("div");ja.className="geTempTreeCaret";ja.setAttribute("title",ca);mxUtils.write(ja,ca);fa=ja;ba.appendChild(ja);ca=document.createElement("ul");ca.className="geTempTreeNested";ca.style.visibility="hidden";for(var ia in xa){var ma=document.createElement("li"),qa=pa(ia,xa[ia]);ma.setAttribute("title",qa);mxUtils.write(ma,qa);sa(wa,ma,ia);ca.appendChild(ma)}ba.appendChild(ca);
ra.className="geTempTree";ra.appendChild(ba);(function(oa,na){mxEvent.addListener(na,"click",function(){oa.style.visibility="visible";oa.classList.toggle("geTempTreeActive");oa.classList.toggle("geTempTreeNested")&&setTimeout(function(){oa.style.visibility="hidden"},550);na.classList.toggle("geTempTreeCaret-down")})})(ca,ja)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ra.setAttribute("title",ca),mxUtils.write(ra,ca);null!=g&&(ra.style.padding=g);Aa.appendChild(ra);null==Ea&&0<ya.length&&(Ea=ra,Ea.style.backgroundColor=D,Ma=ya);sa(wa,fa)}M(!1)}var F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;u=null!=u?u:!1;D=null!=D?D:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
-G.style.userSelect="none";G.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";l&&G.appendChild(N);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||F||!l||N.appendChild(J);l&&mxUtils.write(N,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var E=document.createElement("input");E.setAttribute("value",b.defaultFilename+J);E.style.marginLeft="10px";E.style.width=f||
-F?"144px":"244px";this.init=function(){l&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(pa){b.sidebar.hideTooltip()}),null,null)};l&&(N.appendChild(E),L?E.style.width=f||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),L.style.marginLeft=
-"6px",L.style.width=f||F?"80px":"180px",N.appendChild(L)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,E,b.editor.fileExtensions),F.style.marginTop="12px",N.appendChild(F))));N=!1;var H=0,S=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(A||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");n();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";
-if(m||q){var Q=[],W=null,V=null,X=null,p=function(pa){U.setAttribute("disabled","disabled");for(var sa=0;sa<Q.length;sa++)Q[sa].className=sa==pa?"geBtn gePrimaryBtn":"geBtn"};N=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";ea.style.display="";Z.style.left="160px";p(0);Z.scrollTop=0;Z.innerHTML="";H=0;W!=Ma&&(Ma=W,Da=V,Oa=X,Aa.innerHTML="",B(),W=null)});
-Q.push(F);A.appendChild(F);var C=function(pa){Aa.style.display="none";ea.style.display="none";Z.style.left="30px";p(pa?-1:1);null==W&&(W=Ma);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ra){H=0;S.stop();Ma=ya;ra=ra||{};var xa=0,fa;for(fa in ra)xa+=ra[fa].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Aa.style.display="";Z.style.left="160px";Aa.innerHTML="";
-Oa=0;Da={"draw.io":ya};for(fa in ra)Da[fa]=ra[fa];B()}else M(!0)};pa?q(I.value,sa):m(sa)};m&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){C()}),A.appendChild(F),Q.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(F);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(pa){13==
-pa.keyCode&&C(!0)});A.appendChild(I);F=mxUtils.button(mxResources.get("search"),function(){C(!0)});F.className="geBtn";A.appendChild(F)}p(0)}var T=null,P=null,O=null,R=null,Y=null,da=null,ha=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";A=(l?72:40)+(N?30:0);Z.style.top=A+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var ea=document.createElement("div");
-ea.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");ea.appendChild(aa);var va=document.createElement("img"),la="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
+ra.setAttribute("title",ca),mxUtils.write(ra,ca);null!=g&&(ra.style.padding=g);Aa.appendChild(ra);null==Ea&&0<ya.length&&(Ea=ra,Ea.style.backgroundColor=D,Ma=ya);sa(wa,fa)}N(!1)}var B=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;u=null!=u?u:!1;D=null!=D?D:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
+G.style.userSelect="none";G.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";l&&G.appendChild(M);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||B||!l||M.appendChild(H);l&&mxUtils.write(M,(B?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+H);F.style.marginLeft="10px";F.style.width=f||
+B?"144px":"244px";this.init=function(){l&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(pa){b.sidebar.hideTooltip()}),null,null)};l&&(M.appendChild(F),L?F.style.width=f||B?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
+"6px",L.style.width=f||B?"80px":"180px",M.appendChild(L)),null!=b.editor.fileExtensions&&(B=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),B.style.marginTop="12px",M.appendChild(B))));M=!1;var I=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");K();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(m||p){var P=[],V=null,U=null,X=null,n=function(pa){W.setAttribute("disabled","disabled");for(var sa=0;sa<P.length;sa++)P[sa].className=sa==pa?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);B=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";ea.style.display="";Z.style.left="160px";n(0);Z.scrollTop=0;Z.innerHTML="";I=0;V!=Ma&&(Ma=V,Da=U,Oa=X,Aa.innerHTML="",A(),V=null)});
+P.push(B);z.appendChild(B);var C=function(pa){Aa.style.display="none";ea.style.display="none";Z.style.left="30px";n(pa?-1:1);null==V&&(V=Ma);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var sa=function(ya,wa,ra){I=0;R.stop();Ma=ya;ra=ra||{};var xa=0,fa;for(fa in ra)xa+=ra[fa].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Aa.style.display="";Z.style.left="160px";Aa.innerHTML="";
+Oa=0;Da={"draw.io":ya};for(fa in ra)Da[fa]=ra[fa];A()}else N(!0)};pa?p(J.value,sa):m(sa)};m&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){C()}),z.appendChild(B),P.push(B));if(p){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(B);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(pa){13==
+pa.keyCode&&C(!0)});z.appendChild(J);B=mxUtils.button(mxResources.get("search"),function(){C(!0)});B.className="geBtn";z.appendChild(B)}n(0)}var T=null,Q=null,O=null,S=null,Y=null,da=null,ha=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(l?72:40)+(M?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var ea=document.createElement("div");
+ea.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");ea.appendChild(aa);var va=document.createElement("img"),la="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";va.setAttribute("src",
la);va.setAttribute("title",mxResources.get("search"));va.style.position="relative";va.style.left="-18px";va.style.top="1px";va.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(va);mxEvent.addListener(va,"click",function(){va.getAttribute("src")==Dialog.prototype.closeImage&&(va.setAttribute("src",la),va.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ca&&(Ca.click(),Ca=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(pa){if(13==
pa.keyCode){var sa=aa.value;if(""==sa)null!=Ca&&(Ca.click(),Ca=null);else{if(null==NewDialog.tagsList[k]){var ya={};for(ia in Da)for(var wa=Da[ia],ra=0;ra<wa.length;ra++){var xa=wa[ra];if(null!=xa.tags)for(var fa=xa.tags.toLowerCase().split(";"),ca=0;ca<fa.length;ca++)null==ya[fa[ca]]&&(ya[fa[ca]]=[]),ya[fa[ca]].push(xa)}NewDialog.tagsList[k]=ya}var ba=sa.toLowerCase().split(" ");ya=NewDialog.tagsList[k];if(0<Oa&&null==ya.__tagsList__){for(ia in Ka)for(wa=Ka[ia],ra=0;ra<wa.length;ra++)for(xa=wa[ra],
-fa=xa.title.split(" "),fa.push(ia),ca=0;ca<fa.length;ca++){var ja=fa[ca].toLowerCase();null==ya[ja]&&(ya[ja]=[]);ya[ja].push(xa)}ya.__tagsList__=!0}var ia=[];wa={};for(ra=fa=0;ra<ba.length;ra++)if(0<ba[ra].length){ja=ya[ba[ra]];var ma={};ia=[];if(null!=ja)for(ca=0;ca<ja.length;ca++)xa=ja[ca],0==fa==(null==wa[xa.url])&&(ma[xa.url]=!0,ia.push(xa));wa=ma;fa++}Z.scrollTop=0;Z.innerHTML="";H=0;ya=document.createElement("div");ya.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Ea&&null==Ca&&(Ea.style.backgroundColor="",Ca=Ea,Ea=ya);Ma=ia;W=null;M(!1)}mxEvent.consume(pa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(pa){""==aa.value?(va.setAttribute("src",la),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));A+=23;var Aa=document.createElement("div");
-Aa.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,ua=140,Da={},Fa={},Ka={},Oa=0,Ia=!0,Ea=null,Ca=null;Da.basic=[{title:"blankDiagram",select:!0}];var Ma=Da.basic;if(!f){var za=function(){mxUtils.get(ka,function(pa){if(!ta){ta=!0;pa=pa.getXml().documentElement.firstChild;for(var sa={};null!=pa;){if("undefined"!==typeof pa.getAttribute)if("clibs"==
+fa=xa.title.split(" "),fa.push(ia),ca=0;ca<fa.length;ca++){var ja=fa[ca].toLowerCase();null==ya[ja]&&(ya[ja]=[]);ya[ja].push(xa)}ya.__tagsList__=!0}var ia=[];wa={};for(ra=fa=0;ra<ba.length;ra++)if(0<ba[ra].length){ja=ya[ba[ra]];var ma={};ia=[];if(null!=ja)for(ca=0;ca<ja.length;ca++)xa=ja[ca],0==fa==(null==wa[xa.url])&&(ma[xa.url]=!0,ia.push(xa));wa=ma;fa++}Z.scrollTop=0;Z.innerHTML="";I=0;ya=document.createElement("div");ya.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(ya,mxResources.get(0==ia.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(ya);null!=Ea&&null==Ca&&(Ea.style.backgroundColor="",Ca=Ea,Ea=ya);Ma=ia;V=null;N(!1)}mxEvent.consume(pa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(pa){""==aa.value?(va.setAttribute("src",la),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Dialog.prototype.closeImage),va.setAttribute("title",mxResources.get("reset")))}));z+=23;var Aa=document.createElement("div");
+Aa.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,ua=140,Da={},Fa={},Ka={},Oa=0,Ia=!0,Ea=null,Ca=null;Da.basic=[{title:"blankDiagram",select:!0}];var Ma=Da.basic;if(!f){var za=function(){mxUtils.get(ka,function(pa){if(!ta){ta=!0;pa=pa.getXml().documentElement.firstChild;for(var sa={};null!=pa;){if("undefined"!==typeof pa.getAttribute)if("clibs"==
pa.nodeName){for(var ya=pa.getAttribute("name"),wa=pa.getElementsByTagName("add"),ra=[],xa=0;xa<wa.length;xa++)ra.push(encodeURIComponent(mxUtils.getTextContent(wa[xa])));null!=ya&&0<ra.length&&(sa[ya]=ra.join(";"))}else if(ra=pa.getAttribute("url"),null!=ra){wa=pa.getAttribute("section");ya=pa.getAttribute("subsection");if(null==wa&&(xa=ra.indexOf("/"),wa=ra.substring(0,xa),null==ya)){var fa=ra.indexOf("/",xa+1);-1<fa&&(ya=ra.substring(xa+1,fa))}xa=Da[wa];null==xa&&(xa=[],Da[wa]=xa);ra=pa.getAttribute("clibs");
-null!=sa[ra]&&(ra=sa[ra]);ra={url:pa.getAttribute("url"),libs:pa.getAttribute("libs"),title:pa.getAttribute("title"),tooltip:pa.getAttribute("name")||pa.getAttribute("url"),preview:pa.getAttribute("preview"),clibs:ra,tags:pa.getAttribute("tags")};xa.push(ra);null!=ya&&(xa=Fa[wa],null==xa&&(xa={},Fa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ra))}pa=pa.nextSibling}S.stop();B()}})};G.appendChild(ea);G.appendChild(Aa);G.appendChild(Z);var ta=!1,ka=k;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
-(ka=PROXY_URL+"?url="+encodeURIComponent(ka));S.spin(Z);null!=z?z(function(pa,sa){Ka=pa;X=Oa=sa;za()},za):za();V=Da}mxEvent.addListener(E,"keypress",function(pa){b.dialog.container.firstChild==G&&13==pa.keyCode&&n()});z=document.createElement("div");z.style.marginTop=f?"4px":"16px";z.style.textAlign="right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";f||b.isOffline()||!l||null!=d||u||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",z.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=t&&t();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||u&&null==t||z.appendChild(A);f||"1"==urlParams.embed||u||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var pa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(E.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(pa.container,300,80,!0,!0);pa.init()}),f.className="geBtn",z.appendChild(f));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var pa=document.createElement("input");pa.setAttribute("multiple","multiple");pa.setAttribute("type","file");mxEvent.addListener(pa,"change",function(sa){b.openFiles(pa.files,
-!0);pa.value=""});pa.style.display="none";document.body.appendChild(pa);b.newDlgFileInputElt=pa}b.newDlgFileInputElt.click()}),y.className="geBtn",z.appendChild(y));z.appendChild(U);b.editor.cancelFirst||null!=d||u&&null==t||z.appendChild(A);G.appendChild(z);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,y,A,z){function L(N,J,E,H){function S(){mxEvent.addListener(U,"click",function(){var p=E;if(D){var C=x.value,I=C.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>I){p=null!=p?p:G.value;var T="";p==App.MODE_GOOGLE?T=b.drive.extension:p==App.MODE_GITHUB?T=b.gitHub.extension:p==App.MODE_GITLAB?T=b.gitLab.extension:p==App.MODE_TRELLO?T=b.trello.extension:p==App.MODE_DROPBOX?T=b.dropbox.extension:p==App.MODE_ONEDRIVE?T=b.oneDrive.extension:p==App.MODE_DEVICE&&
-(T=".drawio");0<=I&&(C=C.substring(0,I));x.value=C+T}}M(E)})}var U=document.createElement("a");U.style.overflow="hidden";var Q=document.createElement("img");Q.src=N;Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.width="60px";Q.style.height="60px";Q.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(Q);U.style.color=
-"gray";U.style.fontSize="11px";var W=document.createElement("div");U.appendChild(W);mxUtils.write(W,J);if(null!=H&&null==b[H]){Q.style.visibility="hidden";mxUtils.setOpacity(W,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(U);var X=window.setTimeout(function(){null==b[H]&&(V.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
-mxUtils.setOpacity(W,100),Q.style.visibility="",V.stop(),S())}))}else S();B.appendChild(U);++F==m&&(mxUtils.br(B),F=0)}function M(N){var J=x.value;if(null==N||null!=J&&0<J.length)z&&b.hideDialog(),l(J,N,x)}k="1"==urlParams.noDevice?!1:k;D=null!=D?D:!0;c=null!=c?c:!0;m=null!=m?m:4;z=null!=z?z:!0;t=document.createElement("div");t.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(t);var n=document.createElement("h2");mxUtils.write(n,u||mxResources.get("create"));n.style.marginTop="0px";n.style.marginBottom=
-"24px";t.appendChild(n);mxUtils.write(t,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",f);x.style.width="200px";x.style.marginLeft="10px";x.style.marginBottom="20px";x.style.maxWidth="70%";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)};t.appendChild(x);null!=A&&(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
-u.style.marginLeft="6px",u.style.width="90px",t.appendChild(u)),t.appendChild(FilenameDialog.createTypeHint(b,x,A)));A=null;if("1"!=urlParams.noDevice&&null!=q&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){x.style.width="160px";u=document.createElement("img");var K=y?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+v+";base64,"+K);u.style.position="absolute";u.style.top="70px";u.style.right="100px";u.style.maxWidth="120px";u.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)");t.appendChild(u);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(A=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(K,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+v+";base64,"+K+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
-A.style.marginTop="6px",A.className="geBtn");e&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(N){mxEvent.isPopupTrigger(N)||M("_blank")}))}mxUtils.br(t);var B=document.createElement("div");B.style.textAlign="center";var F=0;B.style.marginTop="6px";t.appendChild(B);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),L(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),L(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),L(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),L(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),L(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),L(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&c||q.setAttribute("selected","selected"),k&&L(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);c&&isLocalStorage&&"0"!=urlParams.browser&&(c=document.createElement("option"),
+null!=sa[ra]&&(ra=sa[ra]);ra={url:pa.getAttribute("url"),libs:pa.getAttribute("libs"),title:pa.getAttribute("title"),tooltip:pa.getAttribute("name")||pa.getAttribute("url"),preview:pa.getAttribute("preview"),clibs:ra,tags:pa.getAttribute("tags")};xa.push(ra);null!=ya&&(xa=Fa[wa],null==xa&&(xa={},Fa[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ra))}pa=pa.nextSibling}R.stop();A()}})};G.appendChild(ea);G.appendChild(Aa);G.appendChild(Z);var ta=!1,ka=k;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&
+(ka=PROXY_URL+"?url="+encodeURIComponent(ka));R.spin(Z);null!=y?y(function(pa,sa){Ka=pa;X=Oa=sa;za()},za):za();U=Da}mxEvent.addListener(F,"keypress",function(pa){b.dialog.container.firstChild==G&&13==pa.keyCode&&K()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!l||null!=d||u||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",y.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=t&&t();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||u&&null==t||y.appendChild(z);f||"1"==urlParams.embed||u||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var pa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(pa.container,300,80,!0,!0);pa.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var pa=document.createElement("input");pa.setAttribute("multiple","multiple");pa.setAttribute("type","file");mxEvent.addListener(pa,"change",function(sa){b.openFiles(pa.files,
+!0);pa.value=""});pa.style.display="none";document.body.appendChild(pa);b.newDlgFileInputElt=pa}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(W);b.editor.cancelFirst||null!=d||u&&null==t||y.appendChild(z);G.appendChild(y);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,p,v,x,z,y){function L(M,H,F,I){function R(){mxEvent.addListener(W,"click",function(){var n=F;if(D){var C=q.value,J=C.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>J){n=null!=n?n:G.value;var T="";n==App.MODE_GOOGLE?T=b.drive.extension:n==App.MODE_GITHUB?T=b.gitHub.extension:n==App.MODE_GITLAB?T=b.gitLab.extension:n==App.MODE_TRELLO?T=b.trello.extension:n==App.MODE_DROPBOX?T=b.dropbox.extension:n==App.MODE_ONEDRIVE?T=b.oneDrive.extension:n==App.MODE_DEVICE&&
+(T=".drawio");0<=J&&(C=C.substring(0,J));q.value=C+T}}N(F)})}var W=document.createElement("a");W.style.overflow="hidden";var P=document.createElement("img");P.src=M;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(P);W.style.color=
+"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,H);if(null!=I&&null==b[I]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(W);var X=window.setTimeout(function(){null==b[I]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(X),
+mxUtils.setOpacity(V,100),P.style.visibility="",U.stop(),R())}))}else R();A.appendChild(W);++B==m&&(mxUtils.br(A),B=0)}function N(M){var H=q.value;if(null==M||null!=H&&0<H.length)y&&b.hideDialog(),l(H,M,q)}k="1"==urlParams.noDevice?!1:k;D=null!=D?D:!0;c=null!=c?c:!0;m=null!=m?m:4;y=null!=y?y:!0;t=document.createElement("div");t.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(t);var K=document.createElement("h2");mxUtils.write(K,u||mxResources.get("create"));K.style.marginTop="0px";K.style.marginBottom=
+"24px";t.appendChild(K);mxUtils.write(t,mxResources.get("filename")+":");var q=document.createElement("input");q.setAttribute("value",f);q.style.width="200px";q.style.marginLeft="10px";q.style.marginBottom="20px";q.style.maxWidth="70%";this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};t.appendChild(q);null!=z&&(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
+u.style.marginLeft="6px",u.style.width="90px",t.appendChild(u)),t.appendChild(FilenameDialog.createTypeHint(b,q,z)));z=null;if("1"!=urlParams.noDevice&&null!=p&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){q.style.width="160px";u=document.createElement("img");var E=x?p:btoa(unescape(encodeURIComponent(p)));u.setAttribute("src","data:"+v+";base64,"+E);u.style.position="absolute";u.style.top="70px";u.style.right="100px";u.style.maxWidth="120px";u.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)");t.appendChild(u);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(z=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(E,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+v+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
+z.style.marginTop="6px",z.className="geBtn");e&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(M){mxEvent.isPopupTrigger(M)||N("_blank")}))}mxUtils.br(t);var A=document.createElement("div");A.style.textAlign="center";var B=0;A.style.marginTop="6px";t.appendChild(A);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),G.appendChild(p),L(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),G.appendChild(p),b.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),G.appendChild(p),b.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),G.appendChild(p),L(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),G.appendChild(p),L(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),G.appendChild(p),L(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),G.appendChild(p),b.mode!=App.MODE_DEVICE&&c||p.setAttribute("selected","selected"),k&&L(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);c&&isLocalStorage&&"0"!=urlParams.browser&&(c=document.createElement("option"),
c.setAttribute("value",App.MODE_BROWSER),mxUtils.write(c,mxResources.get("browser")),G.appendChild(c),b.mode==App.MODE_BROWSER&&c.setAttribute("selected","selected"),L(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="center";null!=g&&(k=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
-function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});k.className="geBtn";b.editor.cancelFirst&&null==d&&c.appendChild(k);null==d&&(q=mxUtils.button(mxResources.get("decideLater"),function(){M(null)}),q.className="geBtn",c.appendChild(q));e&&Editor.popupsAllowed&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){M("_blank")}),e.className="geBtn",c.appendChild(e));CreateDialog.showDownloadButton&&(e=mxUtils.button(mxResources.get("download"),
-function(){M("download")}),e.className="geBtn",c.appendChild(e),null!=A&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=A&&(mxUtils.br(c),c.appendChild(A));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(x,"keypress",function(N){13==N.keyCode?M(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});t.appendChild(c);this.container=t};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});k.className="geBtn";b.editor.cancelFirst&&null==d&&c.appendChild(k);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){N(null)}),p.className="geBtn",c.appendChild(p));e&&Editor.popupsAllowed&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){N("_blank")}),e.className="geBtn",c.appendChild(e));CreateDialog.showDownloadButton&&(e=mxUtils.button(mxResources.get("download"),
+function(){N("download")}),e.className="geBtn",c.appendChild(e),null!=z&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=z&&(mxUtils.br(c),c.appendChild(z));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(q,"keypress",function(M){13==M.keyCode?N(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});t.appendChild(c);this.container=t};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,f,l,d,u){u=null!=u?u:!0;var t=document.createElement("div");t.style.textAlign="left";t.style.height="100%";mxUtils.write(t,mxResources.get("fileOpenLocation"));mxUtils.br(t);mxUtils.br(t);var D=mxUtils.button(mxResources.get("openInThisWindow"),function(){u&&b.hideDialog();null!=d&&d()});D.className="geBtn";D.style.marginBottom="8px";D.style.width="280px";t.appendChild(D);mxUtils.br(t);var c=mxUtils.button(mxResources.get("openInNewWindow"),function(){u&&b.hideDialog();
-null!=l&&l();b.openLink(f,null,!0)});c.className="geBtn gePrimaryBtn";c.style.width=D.style.width;t.appendChild(c);mxUtils.br(t);mxUtils.br(t);mxUtils.write(t,mxResources.get("allowPopups"));this.container=t},ImageDialog=function(b,f,l,d,u,t,D,c){function e(){0<m.value.length?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")}t=null!=t?t:!0;var g=b.editor.graph,k=document.createElement("div");mxUtils.write(k,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
+null!=l&&l();b.openLink(f,null,!0)});c.className="geBtn gePrimaryBtn";c.style.width=D.style.width;t.appendChild(c);mxUtils.br(t);mxUtils.br(t);mxUtils.write(t,mxResources.get("allowPopups"));this.container=t},ImageDialog=function(b,f,l,d,u,t,D,c){function e(){0<m.value.length?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}t=null!=t?t:!0;var g=b.editor.graph,k=document.createElement("div");mxUtils.write(k,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var m=document.createElement("input");m.setAttribute("value",l);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?460:340)-20+"px";m.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(l,"click",function(){m.value="";m.focus()});
-f.appendChild(m);f.appendChild(l);k.appendChild(f);var q=c,v,y,A=function(n,x,K,B){var F="data:"==n.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<n.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(n,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=x&&null!=K?Math.max(x/G.width,K/G.height):Math.min(1,Math.min(520/G.width,520/G.height));t&&(n=b.convertDataUri(n));d(n,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,v,y)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(n,null,null,q,v,y)):(n=b.convertDataUri(n),x=null==x?120:x,K=null==K?100:K,b.hideDialog(),d(n,x,K,q,v,y))},z=function(n,x){if(null!=n){var K=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=K?A(n,K.width,K.height,x):A(n,null,null,x)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var n=k.parentNode,x=null;mxEvent.addListener(n,"dragleave",function(K){null!=x&&(x.parentNode.removeChild(x),x=null);K.stopPropagation();K.preventDefault()});mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(K){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=b.highlightElement(n));K.stopPropagation();K.preventDefault()}));mxEvent.addListener(n,"drop",mxUtils.bind(this,function(K){null!=x&&(x.parentNode.removeChild(x),x=null);if(0<K.dataTransfer.files.length)b.importFiles(K.dataTransfer.files,
-0,0,b.maxImageSize,function(F,G,N,J,E,H,S,U){z(F,U)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var G=0;G<F.length;G++)F[G]()},!mxEvent.isControlDown(K),null,null,!0);else if(0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")){var B=K.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&z(decodeURIComponent(B))}K.stopPropagation();K.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
-"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);ImageDialog.filePicked=function(n){n.action==google.picker.Action.PICKED&&null!=n.docs[0].thumbnails&&(n=n.docs[0].thumbnails[n.docs[0].thumbnails.length-1],null!=n&&(m.value=n.url));m.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
-"file");mxEvent.addListener(L,"change",function(n){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(x,K,B,F,G,N){z(x)},function(){},function(x){return"image/"==x.type.substring(0,6)},function(x){for(var K=0;K<x.length;K++)x[K]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
-"keypress",function(n){13==n.keyCode&&z(m.value)});var M=mxUtils.button(mxResources.get("crop"),function(){var n=new CropImageDialog(b,m.value,q,function(x,K,B){q=x;v=K;y=B});b.showDialog(n.container,300,390,!0,!0)});D&&(M.className="geBtn",c.appendChild(M));mxEvent.addListener(m,"change",function(n){q=null;e()});e();D=mxUtils.button(mxResources.get("apply"),function(){z(m.value)});D.className="geBtn gePrimaryBtn";c.appendChild(D);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
-"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),k.appendChild(D));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,u,t,D){function c(n,x,K){K=mxUtils.button("",K);
-K.className="geBtn";K.setAttribute("title",x);x=document.createElement("img");x.style.height="26px";x.style.width="26px";x.setAttribute("src",n);K.style.minWidth="42px";K.style.verticalAlign="middle";K.appendChild(x);M.appendChild(K)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=
+f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,z=function(K,q,E,A){var B="data:"==K.substring(0,5);!b.isOffline()||B&&"undefined"===typeof chrome?0<K.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(K,function(G){b.spinner.stop();b.hideDialog();var M=!1===A?1:null!=q&&null!=E?Math.max(q/G.width,E/G.height):Math.min(1,Math.min(520/G.width,520/G.height));t&&(K=b.convertDataUri(K));d(K,Math.round(Number(G.width)*M),Math.round(Number(G.height)*M),p,v,x)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(K,null,null,p,v,x)):(K=b.convertDataUri(K),q=null==q?120:q,E=null==E?100:E,b.hideDialog(),d(K,q,E,p,v,x))},y=function(K,q){if(null!=K){var E=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=E?z(K,E.width,E.height,q):z(K,null,null,q)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var K=k.parentNode,q=null;mxEvent.addListener(K,"dragleave",function(E){null!=q&&(q.parentNode.removeChild(q),q=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(E){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(E){null!=q&&(q.parentNode.removeChild(q),q=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,
+0,0,b.maxImageSize,function(B,G,M,H,F,I,R,W){y(B,W)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var G=0;G<B.length;G++)B[G]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var A=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(A)&&y(decodeURIComponent(A))}E.stopPropagation();E.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
+"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);ImageDialog.filePicked=function(K){K.action==google.picker.Action.PICKED&&null!=K.docs[0].thumbnails&&(K=K.docs[0].thumbnails[K.docs[0].thumbnails.length-1],null!=K&&(m.value=K.url));m.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
+"file");mxEvent.addListener(L,"change",function(K){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,E,A,B,G,M){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var E=0;E<q.length;E++)q[E]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
+"keypress",function(K){13==K.keyCode&&y(m.value)});var N=mxUtils.button(mxResources.get("crop"),function(){var K=new CropImageDialog(b,m.value,p,function(q,E,A){p=q;v=E;x=A});b.showDialog(K.container,300,390,!0,!0)});D&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(K){p=null;e()});e();D=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});D.className="geBtn gePrimaryBtn";c.appendChild(D);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
+"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),k.appendChild(D));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,u,t,D){function c(K,q,E){E=mxUtils.button("",E);
+E.className="geBtn";E.setAttribute("title",q);q=document.createElement("img");q.style.height="26px";q.style.width="26px";q.setAttribute("src",K);E.style.minWidth="42px";E.style.verticalAlign="middle";E.appendChild(q);N.appendChild(E)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=
"clip";g.style.cursor="default";g.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="97%";k.style.boxSizing="border-box";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";k.style.marginBottom="4px";var m=document.createElement("div");m.setAttribute("title",
-mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){k.value="";k.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
-var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=D&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);D=null!=D?D:"_blank";A.setAttribute("title",D);t&&(k.style.width="340px");if(u&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),q.setAttribute("checked","checked"),q.defaultChecked=!0);g.appendChild(q);g.appendChild(k);g.appendChild(m);t&&(g.appendChild(A),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);u=!1;for(t=0;t<b.pages.length;t++)m=document.createElement("option"),mxUtils.write(m,b.pages[t].getName()||mxResources.get("pageWithNumber",[t+1])),m.setAttribute("value",
-"data:page/id,"+b.pages[t].getId()),f==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0),y.appendChild(m);if(!u&&v.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");y.appendChild(z);mxEvent.addListener(y,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}g.appendChild(y)}else k.setAttribute("value",
-f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==y.value?y.value:f:k.value,LinkDialog.selectedDocs,A.checked?D:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?y.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");v.setAttribute("checked",
-"checked");v.checked=!0});mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var n=e.parentNode,x=null;mxEvent.addListener(n,"dragleave",function(K){null!=x&&(x.parentNode.removeChild(x),x=null);K.stopPropagation();K.preventDefault()});mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(K){null==x&&(!mxClient.IS_IE||10<document.documentMode)&&(x=b.highlightElement(n));K.stopPropagation();K.preventDefault()}));
-mxEvent.addListener(n,"drop",mxUtils.bind(this,function(K){null!=x&&(x.parentNode.removeChild(x),x=null);0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(K.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,L.click());K.stopPropagation();K.preventDefault()}),!1)}};var M=document.createElement("div");M.style.marginTop="18px";M.style.textAlign="center";l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-l.style.verticalAlign="middle";l.className="geBtn";M.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&M.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(n){if(n.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=n.docs;var x=n.docs[0].url;"application/mxe"==n.docs[0].mimeType||null!=n.docs[0].mimeType&&
-"application/vnd.jgraph."==n.docs[0].mimeType.substring(0,23)?x="https://www.draw.io/#G"+n.docs[0].id:"application/vnd.google-apps.folder"==n.docs[0].mimeType&&(x="https://drive.google.com/#folders/"+n.docs[0].id);k.value=x;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var n=b.drive.createLinkPicker();b.linkPicker=n.setCallback(function(x){LinkDialog.filePicked(x)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(n){k.value=n[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(n,x){k.value=x.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(n){if(null!=n){n=n.split("/");var x=n[0],K=n[1],B=n[2];n=n.slice(3,n.length).join("/");k.value="https://github.com/"+x+"/"+K+"/blob/"+B+"/"+n;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(n){if(null!=n){n=n.split("/");var x=
-n[0],K=n[1],B=n[2];n=n.slice(3,n.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+x+"/"+K+"/blob/"+B+"/"+n;k.focus()}})});mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(b.hideDialog(),d(v.checked?y.value:k.value,LinkDialog.selectedDocs))});M.appendChild(L);b.editor.cancelFirst||M.appendChild(l);e.appendChild(M);this.container=e},FeedbackDialog=function(b,f,l,d){var u=document.createElement("div"),t=document.createElement("div");mxUtils.write(t,mxResources.get("sendYourFeedback"));t.style.fontSize=
+mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){k.value="";k.focus()});var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","geLinkDialogOption");
+var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var x=document.createElement("select");x.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=D&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);D=null!=D?D:"_blank";z.setAttribute("title",D);t&&(k.style.width="340px");if(u&&
+null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),p.setAttribute("checked","checked"),p.defaultChecked=!0);g.appendChild(p);g.appendChild(k);g.appendChild(m);t&&(g.appendChild(z),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);u=!1;for(t=0;t<b.pages.length;t++)m=document.createElement("option"),mxUtils.write(m,b.pages[t].getName()||mxResources.get("pageWithNumber",[t+1])),m.setAttribute("value",
+"data:page/id,"+b.pages[t].getId()),f==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0),x.appendChild(m);if(!u&&v.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");x.appendChild(y);mxEvent.addListener(x,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}g.appendChild(x)}else k.setAttribute("value",
+f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==x.value?x.value:f:k.value,LinkDialog.selectedDocs,z.checked?D:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?x.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(x,"focus",function(){p.removeAttribute("checked");v.setAttribute("checked",
+"checked");v.checked=!0});mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});if(Graph.fileSupport){var K=e.parentNode,q=null;mxEvent.addListener(K,"dragleave",function(E){null!=q&&(q.parentNode.removeChild(q),q=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(E){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));E.stopPropagation();E.preventDefault()}));
+mxEvent.addListener(K,"drop",mxUtils.bind(this,function(E){null!=q&&(q.parentNode.removeChild(q),q=null);0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),p.setAttribute("checked","checked"),p.checked=!0,L.click());E.stopPropagation();E.preventDefault()}),!1)}};var N=document.createElement("div");N.style.marginTop="18px";N.style.textAlign="center";l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+l.style.verticalAlign="middle";l.className="geBtn";N.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&N.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(K){if(K.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=K.docs;var q=K.docs[0].url;"application/mxe"==K.docs[0].mimeType||null!=K.docs[0].mimeType&&
+"application/vnd.jgraph."==K.docs[0].mimeType.substring(0,23)?q="https://www.draw.io/#G"+K.docs[0].id:"application/vnd.google-apps.folder"==K.docs[0].mimeType&&(q="https://drive.google.com/#folders/"+K.docs[0].id);k.value=q;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var K=b.drive.createLinkPicker();b.linkPicker=K.setCallback(function(q){LinkDialog.filePicked(q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(K){k.value=K[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(K,q){k.value=q.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(K){if(null!=K){K=K.split("/");var q=K[0],E=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value="https://github.com/"+q+"/"+E+"/blob/"+A+"/"+K;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(K){if(null!=K){K=K.split("/");var q=
+K[0],E=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+E+"/blob/"+A+"/"+K;k.focus()}})});mxEvent.addListener(k,"keypress",function(K){13==K.keyCode&&(b.hideDialog(),d(v.checked?x.value:k.value,LinkDialog.selectedDocs))});N.appendChild(L);b.editor.cancelFirst||N.appendChild(l);e.appendChild(N);this.container=e},FeedbackDialog=function(b,f,l,d){var u=document.createElement("div"),t=document.createElement("div");mxUtils.write(t,mxResources.get("sendYourFeedback"));t.style.fontSize=
"18px";t.style.marginBottom="18px";u.appendChild(t);t=document.createElement("div");mxUtils.write(t,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));u.appendChild(t);var D=document.createElement("input");D.setAttribute("type","text");D.style.marginTop="6px";D.style.width="600px";var c=mxUtils.button(mxResources.get("sendMessage"),function(){var m=k.value+(g.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;m.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(D.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
-":\n"+m),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});c.className="geBtn gePrimaryBtn";if(!l){c.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(D,
+":\n"+m),function(p){b.spinner.stop();200<=p.getStatus()&&299>=p.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});c.className="geBtn gePrimaryBtn";if(!l){c.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(D,
"change",function(){0<D.value.length&&0<e.test(D.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")});mxEvent.addListener(D,"keyup",function(){0<D.value.length&&e.test(D.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")})}u.appendChild(D);this.init=function(){D.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";
l.appendChild(g);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(t);mxEvent.addListener(t,"click",function(m){g.checked=!g.checked;mxEvent.consume(m)});u.appendChild(l);t=document.createElement("div");mxUtils.write(t,mxResources.get("feedback"));u.appendChild(t);var k=document.createElement("textarea");k.style.resize="none";k.style.width="600px";k.style.height="140px";k.style.marginTop="6px";k.setAttribute("placeholder",mxResources.get("comments"));
u.appendChild(k);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst?(l.appendChild(t),l.appendChild(c)):(l.appendChild(c),l.appendChild(t));u.appendChild(l);this.container=u};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,f,l){var d=document.createElement("div"),u=document.createElement("h3");u.style.marginTop="0px";mxUtils.write(u,mxResources.get("revisionHistory"));d.appendChild(u);u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.width="170px";u.style.height="378px";d.appendChild(u);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.left="199px";t.style.width="470px";t.style.height="376px";
t.style.overflow="hidden";var D=document.createElement("div");D.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";t.appendChild(D);mxEvent.disableContextMenu(t);d.appendChild(t);var c=new Graph(t);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!0);c.panningHandler.ignoreCell=!0;c.panningHandler.useLeftButtonForPanning=!0;c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;var e=0,g=null,k=0,m=c.getGlobalVariable;
-c.getGlobalVariable=function(R){return"page"==R&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==R?k+1:"pagecount"==R?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
-hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},v=new Spinner(q),y=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),z={};for(q=0;q<A.length;q++)z[A[q].getAttribute("id")]=A[q];var L=null,M=null,n=null,x=null,K=mxUtils.button("",function(){null!=n&&c.zoomIn()});K.className="geSprite geSprite-zoomin";K.setAttribute("title",mxResources.get("zoomIn"));K.style.outline="none";K.style.border="none";K.style.margin="2px";K.setAttribute("disabled","disabled");
-mxUtils.setOpacity(K,20);var B=mxUtils.button("",function(){null!=n&&c.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var F=mxUtils.button("",function(){null!=n&&(c.maxFitScale=8,c.fit(8),c.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
-"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var G=mxUtils.button("",function(){null!=n&&(c.zoomActual(),c.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var N=mxUtils.button("",function(){});N.className="geSprite geSprite-middle";N.setAttribute("title",mxResources.get("compare"));
-N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var J=t.cloneNode(!1);J.style.pointerEvent="none";t.parentNode.appendChild(J);var E=new Graph(J);E.setTooltips(!1);E.setEnabled(!1);E.setPanning(!0);E.panningHandler.ignoreCell=!0;E.panningHandler.useLeftButtonForPanning=!0;E.minFitScale=null;E.maxFitScale=null;E.centerZoom=!0;mxEvent.addGestureListeners(N,function(R){R=z[g[e].getAttribute("id")];mxUtils.setOpacity(N,20);D.innerHTML="";null==R?mxUtils.write(D,
-mxResources.get("pageNotFound")):(H.style.display="none",t.style.display="none",J.style.display="",J.style.backgroundColor=t.style.backgroundColor,R=Editor.parseDiagramNode(R),(new mxCodec(R.ownerDocument)).decode(R,E.getModel()),E.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);D.innerHTML="";"none"==t.style.display&&(H.style.display="",t.style.display="",J.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var S=mxUtils.button(mxResources.get("download"),function(){if(null!=n){var R=mxUtils.getXml(n.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(R,Y,"text/xml"):(R="undefined"===typeof pako?"&xml="+encodeURIComponent(R):"&data="+encodeURIComponent(Graph.compress(R)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+R)).simulate(document,"_blank"))}});S.className="geBtn";S.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(R){null!=n&&null!=x&&(mxEvent.isShiftDown(R)?null!=n&&(R=b.getPagesForNode(n.documentElement),R=b.diffPages(b.pages,R),R=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(R,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(da){b.handleError(da)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(R.container,620,460,!0,!0),R.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(x):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(x);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var Q=document.createElement("select");Q.setAttribute("disabled","disabled");Q.style.maxWidth="80px";Q.style.position="relative";Q.style.top="-2px";Q.style.verticalAlign="bottom";Q.style.marginRight="6px";Q.style.display="none";var W=null;mxEvent.addListener(Q,"change",function(R){null!=W&&(W(R),mxEvent.consume(R))});var V=mxUtils.button(mxResources.get("edit"),function(){null!=n&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(n.documentElement)),b.openLink(b.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=l&&(V.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=M&&b.openLink(M.getUrl(Q.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=l&&(X.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div");
-A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var p=document.createElement("div");p.className="geToolbarContainer";p.style.backgroundColor="transparent";p.style.padding="2px";p.style.border="none";p.style.left="199px";p.style.top="442px";var C=null;if(null!=f&&0<f.length){t.style.cursor="move";var I=document.createElement("table");I.style.border="1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";
-var T=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var O=function(R){var Y=new Date(R.modifiedDate),da=null;if(0<=Y.getTime()){var ha=function(ea){v.stop();D.innerHTML="";var aa=mxUtils.parseXml(ea),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var la=function(Ba){null!=Ba&&(Ba=Aa(Editor.parseDiagramNode(Ba)));return Ba},Aa=function(Ba){var ua=Ba.getAttribute("background");
-if(null==ua||""==ua||ua==mxConstants.NONE)ua=c.defaultPageBackgroundColor;t.style.backgroundColor=ua;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};Q.style.display="none";Q.innerHTML="";n=aa;x=ea;g=parseSelectFunction=null;k=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");g=[];for(ea=0;ea<aa.length;ea++)g.push(aa[ea]);k=Math.min(e,g.length-1);0<g.length&&la(g[k]);if(1<g.length)for(Q.removeAttribute("disabled"),Q.style.display=
-"",ea=0;ea<g.length;ea++)aa=document.createElement("option"),mxUtils.write(aa,g[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),aa.setAttribute("value",ea),ea==k&&aa.setAttribute("selected","selected"),Q.appendChild(aa);W=function(){try{var Ba=parseInt(Q.value);k=e=Ba;la(g[Ba])}catch(ua){Q.value=e,b.handleError(ua)}}}else Aa(va);ea=R.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ea?ea+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());H.setAttribute("title",da.getAttribute("title"));K.removeAttribute("disabled");B.removeAttribute("disabled");F.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),S.removeAttribute("disabled"),X.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(K,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(N,60)}else Q.style.display="none",Q.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(D,mxResources.get("errorLoadingFile"))};da=document.createElement("tr");da.style.borderBottom="1px solid lightGray";da.style.fontSize="12px";da.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";R==f[f.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===P?mxUtils.write(Z,Y.toLocaleTimeString()):
-mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());da.appendChild(Z);da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=R.fileSize?" "+b.formatFileSize(parseInt(R.fileSize)):"")+(null!=R.lastModifyingUserName?" "+R.lastModifyingUserName:""));mxEvent.addListener(da,"click",function(ea){M!=R&&(v.stop(),null!=L&&(L.style.backgroundColor=""),M=R,L=da,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",x=n=null,H.removeAttribute("title"),H.innerHTML=
-mxUtils.htmlEntities(mxResources.get("loading")+"..."),t.style.backgroundColor=c.defaultPageBackgroundColor,D.innerHTML="",c.getModel().clear(),U.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),Q.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(K,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),v.spin(t),R.getXml(function(aa){if(M==R)try{ha(aa)}catch(va){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){v.stop();Q.style.display="none";Q.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(da,
-"dblclick",function(ea){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);T.appendChild(da)}return da}(f[q]);null!=O&&q==f.length-1&&(C=O)}I.appendChild(T);u.appendChild(I)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(t.style.display="none",p.style.display="none",mxUtils.write(u,mxResources.get("notAvailable"))):(t.style.display="none",p.style.display=
-"none",mxUtils.write(u,mxResources.get("noRevisions")));this.init=function(){null!=C&&C.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";p.appendChild(Q);p.appendChild(K);p.appendChild(B);p.appendChild(G);p.appendChild(F);p.appendChild(N);b.editor.cancelFirst?(A.appendChild(u),A.appendChild(S),A.appendChild(V),A.appendChild(U),A.appendChild(X)):(A.appendChild(S),A.appendChild(V),A.appendChild(U),A.appendChild(X),A.appendChild(u));d.appendChild(A);
-d.appendChild(p);d.appendChild(H);this.container=d},DraftDialog=function(b,f,l,d,u,t,D,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),q=mxUtils.bind(this,function(){M=mxUtils.parseXml(e[m.value].data);n=b.editor.extractGraphModel(M.documentElement,!0);x=0;this.init()});if(null!=e){m.style.marginLeft=
-"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var y=new Date(e[f].created),A=new Date(e[f].modified);mxUtils.write(v,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",q)}null==l&&(l=e[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";
-z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);g.appendChild(z);var L=new Graph(z);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var M=mxUtils.parseXml(l),n=b.editor.extractGraphModel(M.documentElement,!0),x=0,K=null,B=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
-G&&null!=K&&null!=K[x]?K[x].getAttribute("name"):"pagenumber"==G?x+1:"pagecount"==G?null!=K?K.length:1:B.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
+c.getGlobalVariable=function(S){return"page"==S&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==S?k+1:"pagecount"==S?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var p={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
+hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},v=new Spinner(p),x=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(p=0;p<z.length;p++)y[z[p].getAttribute("id")]=z[p];var L=null,N=null,K=null,q=null,E=mxUtils.button("",function(){null!=K&&c.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
+mxUtils.setOpacity(E,20);var A=mxUtils.button("",function(){null!=K&&c.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=K&&(c.maxFitScale=8,c.fit(8),c.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border=
+"none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var G=mxUtils.button("",function(){null!=K&&(c.zoomActual(),c.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare"));
+M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=t.cloneNode(!1);H.style.pointerEvent="none";t.parentNode.appendChild(H);var F=new Graph(H);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(M,function(S){S=y[g[e].getAttribute("id")];mxUtils.setOpacity(M,20);D.innerHTML="";null==S?mxUtils.write(D,
+mxResources.get("pageNotFound")):(I.style.display="none",t.style.display="none",H.style.display="",H.style.backgroundColor=t.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);D.innerHTML="";"none"==t.style.display&&(I.style.display="",t.style.display="",H.style.display="none")});var I=document.createElement("div");I.style.position=
+"absolute";I.style.textAlign="right";I.style.color="gray";I.style.marginTop="10px";I.style.backgroundColor="transparent";I.style.top="440px";I.style.right="32px";I.style.maxWidth="380px";I.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=K){var S=mxUtils.getXml(K.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(S,Y,"text/xml"):(S="undefined"===typeof pako?"&xml="+encodeURIComponent(S):"&data="+encodeURIComponent(Graph.compress(S)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+S)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(S){null!=K&&null!=q&&(mxEvent.isShiftDown(S)?null!=K&&(S=b.getPagesForNode(K.documentElement),S=b.diffPages(b.pages,S),S=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(S,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){x.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(da){b.handleError(da)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(q):b.spinner.spin(document.body,mxResources.get("restoring"))&&x.save(!0,function(Y){b.spinner.stop();b.replaceFileData(q);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+W.className="geBtn";W.setAttribute("disabled","disabled");W.setAttribute("title","Shift+Click for Diff");var P=document.createElement("select");P.setAttribute("disabled","disabled");P.style.maxWidth="80px";P.style.position="relative";P.style.top="-2px";P.style.verticalAlign="bottom";P.style.marginRight="6px";P.style.display="none";var V=null;mxEvent.addListener(P,"change",function(S){null!=V&&(V(S),mxEvent.consume(S))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=K&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(K.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=l&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=N&&b.openLink(N.getUrl(P.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=l&&(X.style.display="none",W.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var n=document.createElement("div");n.className="geToolbarContainer";n.style.backgroundColor="transparent";n.style.padding="2px";n.style.border="none";n.style.left="199px";n.style.top="442px";var C=null;if(null!=f&&0<f.length){t.style.cursor="move";var J=document.createElement("table");J.style.border="1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";
+var T=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var O=function(S){var Y=new Date(S.modifiedDate),da=null;if(0<=Y.getTime()){var ha=function(ea){v.stop();D.innerHTML="";var aa=mxUtils.parseXml(ea),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var la=function(Ba){null!=Ba&&(Ba=Aa(Editor.parseDiagramNode(Ba)));return Ba},Aa=function(Ba){var ua=Ba.getAttribute("background");
+if(null==ua||""==ua||ua==mxConstants.NONE)ua=c.defaultPageBackgroundColor;t.style.backgroundColor=ua;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};P.style.display="none";P.innerHTML="";K=aa;q=ea;g=parseSelectFunction=null;k=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");g=[];for(ea=0;ea<aa.length;ea++)g.push(aa[ea]);k=Math.min(e,g.length-1);0<g.length&&la(g[k]);if(1<g.length)for(P.removeAttribute("disabled"),P.style.display=
+"",ea=0;ea<g.length;ea++)aa=document.createElement("option"),mxUtils.write(aa,g[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),aa.setAttribute("value",ea),ea==k&&aa.setAttribute("selected","selected"),P.appendChild(aa);V=function(){try{var Ba=parseInt(P.value);k=e=Ba;la(g[Ba])}catch(ua){P.value=e,b.handleError(ua)}}}else Aa(va);ea=S.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");I.innerHTML="";mxUtils.write(I,(null!=ea?ea+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());I.setAttribute("title",da.getAttribute("title"));E.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");G.removeAttribute("disabled");M.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(M,60)}else P.style.display="none",P.innerHTML="",I.innerHTML="",mxUtils.write(I,mxResources.get("errorLoadingFile")),mxUtils.write(D,mxResources.get("errorLoadingFile"))};da=document.createElement("tr");da.style.borderBottom="1px solid lightGray";da.style.fontSize="12px";da.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";S==f[f.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===Q?mxUtils.write(Z,Y.toLocaleTimeString()):
+mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());da.appendChild(Z);da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(da,"click",function(ea){N!=S&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=S,L=da,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=K=null,I.removeAttribute("title"),I.innerHTML=
+mxUtils.htmlEntities(mxResources.get("loading")+"..."),t.style.backgroundColor=c.defaultPageBackgroundColor,D.innerHTML="",c.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),P.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(M,20),v.spin(t),S.getXml(function(aa){if(N==S)try{ha(aa)}catch(va){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+va.message)}},function(aa){v.stop();P.style.display="none";P.innerHTML="";I.innerHTML="";mxUtils.write(I,mxResources.get("errorLoadingFile"));mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(da,
+"dblclick",function(ea){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);T.appendChild(da)}return da}(f[p]);null!=O&&p==f.length-1&&(C=O)}J.appendChild(T);u.appendChild(J)}else null==x||null==b.drive&&x.constructor==window.DriveFile||null==b.dropbox&&x.constructor==window.DropboxFile?(t.style.display="none",n.style.display="none",mxUtils.write(u,mxResources.get("notAvailable"))):(t.style.display="none",n.style.display=
+"none",mxUtils.write(u,mxResources.get("noRevisions")));this.init=function(){null!=C&&C.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";n.appendChild(P);n.appendChild(E);n.appendChild(A);n.appendChild(G);n.appendChild(B);n.appendChild(M);b.editor.cancelFirst?(z.appendChild(u),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X),z.appendChild(u));d.appendChild(z);
+d.appendChild(n);d.appendChild(I);this.container=d},DraftDialog=function(b,f,l,d,u,t,D,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),p=mxUtils.bind(this,function(){N=mxUtils.parseXml(e[m.value].data);K=b.editor.extractGraphModel(N.documentElement,!0);q=0;this.init()});if(null!=e){m.style.marginLeft=
+"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var x=new Date(e[f].created),z=new Date(e[f].modified);mxUtils.write(v,x.toLocaleDateString()+" "+x.toLocaleTimeString()+" - "+(x.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",p)}null==l&&(l=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";
+y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);g.appendChild(y);var L=new Graph(y);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var N=mxUtils.parseXml(l),K=b.editor.extractGraphModel(N.documentElement,!0),q=0,E=null,A=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
+G&&null!=E&&null!=E[q]?E[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=E?E.length:1:A.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
mxResources.get("zoomOut"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);f=mxUtils.button("",function(){L.maxFitScale=8;L.fit(8);L.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);v=mxUtils.button("",function(){L.zoomActual();L.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));
-v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);D=mxUtils.button(D||mxResources.get("discard"),function(){u.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),0<m.options.length?(m.value=m.options[0].value,q()):b.hideDialog(!0))})])});D.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";
-F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";t=mxUtils.button(t||mxResources.get("edit"),function(){d.apply(this,[m.value])});t.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function G(H){if(null!=H){var S=H.getAttribute("background");if(null==S||""==S||S==mxConstants.NONE)S=Editor.isDarkMode()?"transparent":"#ffffff";z.style.backgroundColor=S;(new mxCodec(H.ownerDocument)).decode(H,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(F,"change",function(H){x=parseInt(F.value);N(K[x]);mxEvent.consume(H)});if("mxfile"==n.nodeName){var J=n.getElementsByTagName("diagram");
-K=[];for(var E=0;E<J.length;E++)K.push(J[E]);0<K.length&&N(K[x]);F.innerHTML="";if(1<K.length)for(F.style.display="",E=0;E<K.length;E++)J=document.createElement("option"),mxUtils.write(J,K[E].getAttribute("name")||mxResources.get("pageWithNumber",[E+1])),J.setAttribute("value",E),E==x&&J.setAttribute("selected","selected"),F.appendChild(J);else F.style.display="none"}else G(n)};A.appendChild(F);A.appendChild(l);A.appendChild(k);A.appendChild(v);A.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(y.appendChild(l),null!=c&&y.appendChild(c),y.appendChild(D),y.appendChild(t)):(y.appendChild(t),y.appendChild(D),null!=c&&y.appendChild(c),y.appendChild(l));g.appendChild(y);g.appendChild(A);this.container=g},FindWindow=function(b,f,l,d,u,t){function D(V,X,p,C){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var I=0;I<X.length;I++)if("label"!=X[I].nodeName){var T=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=T.indexOf(p)||!C&&T.substring(0,p.length)===p)||null!=V&&V.test(T))return!0}}return!1}function c(){v&&K.value?(S.removeAttribute("disabled"),U.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));K.value&&x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function e(V,
-X,p){E.innerHTML="";var C=k.model.getDescendants(k.model.getRoot()),I=x.value.toLowerCase(),T=B.checked?new RegExp(I):null,P=null;A=null;m!=I&&(m=I,q=null,y=!1);var O=null==q;if(0<I.length){if(y){y=!1;for(var R,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){R=Y;break}V=(R+1)%b.pages.length;q=null;do y=!1,C=b.pages[V],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(C),k.model.setRoot(C.root),V=(V+1)%b.pages.length;while(!e(!0,X,p)&&V!=R);q&&(q=null,p?b.editor.graph.model.execute(new SelectPage(b,
-C)):b.selectPage(C));y=!1;k=b.editor.graph;return e(!0,X,p)}for(Y=0;Y<C.length;Y++){R=k.view.getState(C[Y]);X&&null!=T&&(O=O||R==q);if(null!=R&&null!=R.cell.value&&(O||null==P)&&(k.model.isVertex(R.cell)||k.model.isEdge(R.cell))){null!=R.style&&"1"==R.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(R.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(R.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var da=0;X&&t&&null!=T&&R==q&&(label=label.substr(z),
-da=z);var ha=""==K.value,Z=ha;if(null==T&&(Z&&0<=label.indexOf(I)||!Z&&label.substring(0,I.length)===I||ha&&D(T,R.cell,I,Z))||null!=T&&(T.test(label)||ha&&D(T,R.cell,I,Z)))if(t&&(null!=T?(ha=label.match(T),A=ha[0].toLowerCase(),z=da+ha.index+A.length):(A=I,z=A.length)),O){P=R;break}else null==P&&(P=R)}O=O||R==q}}if(null!=P){if(Y==C.length&&F.checked)return q=null,y=!0,e(!0,X,p);q=P;k.scrollCellToVisible(q.cell);k.isEnabled()&&!k.isCellLocked(q.cell)?p||k.getSelectionCell()==q.cell&&1==k.getSelectionCount()||
-k.setSelectionCell(q.cell):k.highlightCell(q.cell)}else{if(!V&&F.checked)return y=!0,e(!0,X,p);k.isEnabled()&&!p&&k.clearSelection()}v=null!=P;t&&!V&&c();return 0==I.length||null!=P}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,q=null,v=!1,y=!1,A=null,z=0,L=1,M=document.createElement("div");M.style.userSelect="none";M.style.overflow="hidden";M.style.padding="10px";M.style.height="100%";var n=t?"260px":"200px",x=document.createElement("input");x.setAttribute("placeholder",mxResources.get("find"));
-x.setAttribute("type","text");x.style.marginTop="4px";x.style.marginBottom="6px";x.style.width=n;x.style.fontSize="12px";x.style.borderRadius="4px";x.style.padding="6px";M.appendChild(x);mxUtils.br(M);if(t){var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("replaceWith"));K.setAttribute("type","text");K.style.marginTop="4px";K.style.marginBottom="6px";K.style.width=n;K.style.fontSize="12px";K.style.borderRadius="4px";K.style.padding="6px";M.appendChild(K);mxUtils.br(M);
-mxEvent.addListener(K,"input",c)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";M.appendChild(B);n=document.createElement("label");n.setAttribute("for","geFindWinRegExChck");M.appendChild(n);mxUtils.write(n,mxResources.get("regularExpression"));M.appendChild(n);n=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");n.style.position="relative";n.style.marginLeft="6px";n.style.top="-1px";M.appendChild(n);
-mxUtils.br(M);var F=document.createElement("input");F.setAttribute("id","geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";M.appendChild(F);n=document.createElement("label");n.setAttribute("for","geFindWinAllPagesChck");M.appendChild(n);mxUtils.write(n,mxResources.get("allPages"));M.appendChild(n);var G=document.createElement("div");mxUtils.br(M);n=document.createElement("div");n.style.left="0px";n.style.right="0px";n.style.marginTop="6px";n.style.padding="0 6px 0 6px";
-n.style.textAlign="center";M.appendChild(n);var N=mxUtils.button(mxResources.get("reset"),function(){E.innerHTML="";x.value="";x.style.backgroundColor="";t&&(K.value="",c());m=q=null;y=!1;x.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";t||n.appendChild(N);var J=mxUtils.button(mxResources.get("find"),function(){try{x.style.backgroundColor=
-e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";n.appendChild(J);var E=document.createElement("div");E.style.marginTop="10px";if(t){var H=function(V,X,p,C,I){if(null==I||"1"!=I.html)return C=V.toLowerCase().indexOf(X,C),0>C?V:V.substr(0,
-C)+p+V.substr(C+X.length);var T=V;X=mxUtils.htmlEntities(X);I=[];var P=-1;for(V=V.replace(/<br>/ig,"\n");-1<(P=V.indexOf("<",P+1));)I.push(P);P=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");C=V.toLowerCase().indexOf(X,C);if(0>C)return T;T=C+X.length;p=mxUtils.htmlEntities(p);V=V.substr(0,C)+p+V.substr(T);for(var O=0,R=0;R<I.length;R++){if(I[R]-O<C)V=V.substr(0,I[R])+P[R]+V.substr(I[R]);else{var Y=I[R]-O<T?C+O:I[R]+(p.length-X.length);V=V.substr(0,Y)+P[R]+V.substr(Y)}O+=P[R].length}return V.replace(/\n/g,
-"<br>")},S=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=q&&K.value){var V=q.cell,X=k.getLabel(V);k.isCellEditable(V)&&k.model.setValue(V,H(X,A,K.value,z-A.length,k.getCurrentCellStyle(V)));x.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(p){b.handleError(p)}});S.setAttribute("title",mxResources.get("replFind"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow=
-"ellipsis";S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");n.appendChild(S);mxUtils.br(n);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=q&&K.value){var V=q.cell,X=k.getLabel(V);k.model.setValue(V,H(X,A,K.value,z-A.length,k.getCurrentCellStyle(V)));S.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(p){b.handleError(p)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
-U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");n.appendChild(U);var Q=mxUtils.button(mxResources.get("replaceAll"),function(){E.innerHTML="";if(K.value){m=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var p=0,C={};e(!1,!0,!0)&&100>p;){var I=q.cell,T=k.getLabel(I),P=C[I.id];if(P&&P.replAllMrk==
-L&&P.replAllPos>=z)break;C[I.id]={replAllMrk:L,replAllPos:z};k.isCellEditable(I)&&(k.model.setValue(I,H(T,A,K.value,z-A.length,k.getCurrentCellStyle(I))),p++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(E,mxResources.get("matchesRepl",[p]))}catch(O){b.handleError(O)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});Q.setAttribute("title",mxResources.get("replaceAll"));Q.style.float="none";Q.style.width="120px";
-Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");n.appendChild(Q);mxUtils.br(n);n.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
-"ellipsis";N.className="geBtn";n.appendChild(N);mxUtils.br(n);n.appendChild(E)}else N.style.width="90px",J.style.width="90px";mxEvent.addListener(x,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)g.funct();else if(m!=x.value.toLowerCase()||13==V.keyCode)try{x.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){x.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(M,"keydown",function(V){70==
-V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(g.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(t?"/"+mxResources.get("replace"):""),M,f,l,d,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.removeAttribute("disabled"):(F.checked=!1,F.setAttribute("disabled","disabled"))):k.container.focus()}));this.window.setLocation=function(V,X){var p=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;V=Math.max(0,Math.min(V,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,p-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==V&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var V=this.window.getX(),X=this.window.getY();this.window.setLocation(V,X)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,f,l,d,u,t){var D=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
+v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);D=mxUtils.button(D||mxResources.get("discard"),function(){u.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),0<m.options.length?(m.value=m.options[0].value,p()):b.hideDialog(!0))})])});D.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";
+B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";t=mxUtils.button(t||mxResources.get("edit"),function(){d.apply(this,[m.value])});t.className="geBtn gePrimaryBtn";x=document.createElement("div");x.style.position="absolute";x.style.bottom="30px";x.style.right="40px";x.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function G(I){if(null!=I){var R=I.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=R;(new mxCodec(I.ownerDocument)).decode(I,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return I}function M(I){null!=I&&(I=G(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(B,"change",function(I){q=parseInt(B.value);M(E[q]);mxEvent.consume(I)});if("mxfile"==K.nodeName){var H=K.getElementsByTagName("diagram");
+E=[];for(var F=0;F<H.length;F++)E.push(H[F]);0<E.length&&M(E[q]);B.innerHTML="";if(1<E.length)for(B.style.display="",F=0;F<E.length;F++)H=document.createElement("option"),mxUtils.write(H,E[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),H.setAttribute("value",F),F==q&&H.setAttribute("selected","selected"),B.appendChild(H);else B.style.display="none"}else G(K)};z.appendChild(B);z.appendChild(l);z.appendChild(k);z.appendChild(v);z.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(D),x.appendChild(t)):(x.appendChild(t),x.appendChild(D),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(z);this.container=g},FindWindow=function(b,f,l,d,u,t){function D(U,X,n,C){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var J=0;J<X.length;J++)if("label"!=X[J].nodeName){var T=mxUtils.trim(X[J].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(C&&0<=T.indexOf(n)||!C&&T.substring(0,n.length)===n)||null!=U&&U.test(T))return!0}}return!1}function c(){v&&E.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));E.value&&q.value?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}function e(U,
+X,n){F.innerHTML="";var C=k.model.getDescendants(k.model.getRoot()),J=q.value.toLowerCase(),T=A.checked?new RegExp(J):null,Q=null;z=null;m!=J&&(m=J,p=null,x=!1);var O=null==p;if(0<J.length){if(x){x=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;p=null;do x=!1,C=b.pages[U],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(C),k.model.setRoot(C.root),U=(U+1)%b.pages.length;while(!e(!0,X,n)&&U!=S);p&&(p=null,n?b.editor.graph.model.execute(new SelectPage(b,
+C)):b.selectPage(C));x=!1;k=b.editor.graph;return e(!0,X,n)}for(Y=0;Y<C.length;Y++){S=k.view.getState(C[Y]);X&&null!=T&&(O=O||S==p);if(null!=S&&null!=S.cell.value&&(O||null==Q)&&(k.model.isVertex(S.cell)||k.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var da=0;X&&t&&null!=T&&S==p&&(label=label.substr(y),
+da=y);var ha=""==E.value,Z=ha;if(null==T&&(Z&&0<=label.indexOf(J)||!Z&&label.substring(0,J.length)===J||ha&&D(T,S.cell,J,Z))||null!=T&&(T.test(label)||ha&&D(T,S.cell,J,Z)))if(t&&(null!=T?(ha=label.match(T),z=ha[0].toLowerCase(),y=da+ha.index+z.length):(z=J,y=z.length)),O){Q=S;break}else null==Q&&(Q=S)}O=O||S==p}}if(null!=Q){if(Y==C.length&&B.checked)return p=null,x=!0,e(!0,X,n);p=Q;k.scrollCellToVisible(p.cell);k.isEnabled()&&!k.isCellLocked(p.cell)?n||k.getSelectionCell()==p.cell&&1==k.getSelectionCount()||
+k.setSelectionCell(p.cell):k.highlightCell(p.cell)}else{if(!U&&B.checked)return x=!0,e(!0,X,n);k.isEnabled()&&!n&&k.clearSelection()}v=null!=Q;t&&!U&&c();return 0==J.length||null!=Q}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,p=null,v=!1,x=!1,z=null,y=0,L=1,N=document.createElement("div");N.style.userSelect="none";N.style.overflow="hidden";N.style.padding="10px";N.style.height="100%";var K=t?"260px":"200px",q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));
+q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width=K;q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";N.appendChild(q);mxUtils.br(N);if(t){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=K;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";N.appendChild(E);mxUtils.br(N);
+mxEvent.addListener(E,"input",c)}var A=document.createElement("input");A.setAttribute("id","geFindWinRegExChck");A.setAttribute("type","checkbox");A.style.marginRight="4px";N.appendChild(A);K=document.createElement("label");K.setAttribute("for","geFindWinRegExChck");N.appendChild(K);mxUtils.write(K,mxResources.get("regularExpression"));N.appendChild(K);K=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");K.style.position="relative";K.style.marginLeft="6px";K.style.top="-1px";N.appendChild(K);
+mxUtils.br(N);var B=document.createElement("input");B.setAttribute("id","geFindWinAllPagesChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";N.appendChild(B);K=document.createElement("label");K.setAttribute("for","geFindWinAllPagesChck");N.appendChild(K);mxUtils.write(K,mxResources.get("allPages"));N.appendChild(K);var G=document.createElement("div");mxUtils.br(N);K=document.createElement("div");K.style.left="0px";K.style.right="0px";K.style.marginTop="6px";K.style.padding="0 6px 0 6px";
+K.style.textAlign="center";N.appendChild(K);var M=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";q.value="";q.style.backgroundColor="";t&&(E.value="",c());m=p=null;x=!1;q.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";t||K.appendChild(M);var H=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
+e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";K.appendChild(H);var F=document.createElement("div");F.style.marginTop="10px";if(t){var I=function(U,X,n,C,J){if(null==J||"1"!=J.html)return C=U.toLowerCase().indexOf(X,C),0>C?U:U.substr(0,
+C)+n+U.substr(C+X.length);var T=U;X=mxUtils.htmlEntities(X);J=[];var Q=-1;for(U=U.replace(/<br>/ig,"\n");-1<(Q=U.indexOf("<",Q+1));)J.push(Q);Q=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");C=U.toLowerCase().indexOf(X,C);if(0>C)return T;T=C+X.length;n=mxUtils.htmlEntities(n);U=U.substr(0,C)+n+U.substr(T);for(var O=0,S=0;S<J.length;S++){if(J[S]-O<C)U=U.substr(0,J[S])+Q[S]+U.substr(J[S]);else{var Y=J[S]-O<T?C+O:J[S]+(n.length-X.length);U=U.substr(0,Y)+Q[S]+U.substr(Y)}O+=Q[S].length}return U.replace(/\n/g,
+"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=p&&E.value){var U=p.cell,X=k.getLabel(U);k.isCellEditable(U)&&k.model.setValue(U,I(X,z,E.value,y-z.length,k.getCurrentCellStyle(U)));q.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
+"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");K.appendChild(R);mxUtils.br(K);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=p&&E.value){var U=p.cell,X=k.getLabel(U);k.model.setValue(U,I(X,z,E.value,y-z.length,k.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
+W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");K.appendChild(W);var P=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(E.value){m=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var n=0,C={};e(!1,!0,!0)&&100>n;){var J=p.cell,T=k.getLabel(J),Q=C[J.id];if(Q&&Q.replAllMrk==
+L&&Q.replAllPos>=y)break;C[J.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(J)&&(k.model.setValue(J,I(T,z,E.value,y-z.length,k.getCurrentCellStyle(J))),n++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[n]))}catch(O){b.handleError(O)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";
+P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");K.appendChild(P);mxUtils.br(K);K.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow=
+"ellipsis";M.className="geBtn";K.appendChild(M);mxUtils.br(K);K.appendChild(F)}else M.style.width="90px",H.style.width="90px";mxEvent.addListener(q,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)g.funct();else if(m!=q.value.toLowerCase()||13==U.keyCode)try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){q.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(N,"keydown",function(U){70==
+U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(g.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(t?"/"+mxResources.get("replace"):""),N,f,l,d,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?B.removeAttribute("disabled"):(B.checked=!1,B.setAttribute("disabled","disabled"))):k.container.focus()}));this.window.setLocation=function(U,X){var n=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,n-this.table.clientHeight-("1"==
+urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,f,l,d,u,t){var D=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
"hidden";b.style.height="100%";if(t){var c=document.createElement("input");c.setAttribute("id","geFreehandBrush");c.setAttribute("type","checkbox");c.style.margin="10px 5px 0px 10px";c.style.float="left";b.appendChild(c);var e=document.createElement("label");e.setAttribute("for","geFreehandBrush");e.style.float="left";e.style.marginTop="10px";b.appendChild(e);mxUtils.write(e,mxResources.get("brush"));b.appendChild(e);mxUtils.br(b);var g=document.createElement("input");g.setAttribute("type","range");
g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",D.freehand.getBrushSize());g.style.width="90%";g.style.visibility="hidden";b.appendChild(g);mxUtils.br(b);mxEvent.addListener(c,"change",function(){D.freehand.setPerfectFreehandMode(this.checked);g.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(g,"change",function(){D.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){D.freehand.isDrawing()?
D.freehand.stopDrawing():D.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop=t?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";b.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),b,f,l,d,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
D.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(D.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){D.freehand.isDrawing()&&D.freehand.stopDrawing()}));
-this.window.setLocation=function(q,v){var y=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;q=Math.max(0,Math.min(q,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));v=Math.max(0,Math.min(v,y-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==q&&this.getY()==v||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var q=this.window.getX(),v=this.window.getY();
-this.window.setLocation(q,v)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},TagsWindow=function(b,f,l,d,u){var t=b.editor.graph,D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(g,k){if(t.isEnabled()){var m=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var v=[],y=0;y<q.length;y++){var A=
-mxUtils.trim(q[y]);""!=A&&0>mxUtils.indexOf(g,A)&&v.push(A)}0<v.length&&(t.isSelectionEmpty()?k(g.concat(v)):t.addTagsForCells(t.getSelectionCells(),v))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(m.container,300,80,!0,!0);m.init()}}),c=D.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,u,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.setLocation=function(p,v){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;p=Math.max(0,Math.min(p,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));v=Math.max(0,Math.min(v,x-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==p&&this.getY()==v||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var p=this.window.getX(),v=this.window.getY();
+this.window.setLocation(p,v)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},TagsWindow=function(b,f,l,d,u){var t=b.editor.graph,D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(g,k){if(t.isEnabled()){var m=new FilenameDialog(b,"",mxResources.get("add"),function(p){b.hideDialog();if(null!=p&&0<p.length){p=p.split(" ");for(var v=[],x=0;x<p.length;x++){var z=
+mxUtils.trim(p[x]);""!=z&&0>mxUtils.indexOf(g,z)&&v.push(z)}0<v.length&&(t.isSelectionEmpty()?k(g.concat(v)):t.addTagsForCells(t.getSelectionCells(),v))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(m.container,300,80,!0,!0);m.init()}}),c=D.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,u,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));this.window.setLocation=function(g,k){var m=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.max(0,Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));k=Math.max(0,Math.min(k,m-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==g&&this.getY()==k||mxWindow.prototype.setLocation.apply(this,
arguments)};var e=mxUtils.bind(this,function(){var g=this.window.getX(),k=this.window.getY();this.window.setLocation(g,k)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},AuthDialog=function(b,f,l,d){var u=document.createElement("div");u.style.textAlign="center";var t=document.createElement("p");t.style.fontSize="16pt";t.style.padding="0px";t.style.margin="0px";t.style.color="gray";mxUtils.write(t,mxResources.get("authorizationRequired"));
var D="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(D=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(D=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
(D=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(D=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[D]));var e=document.createElement("input");e.setAttribute("type","checkbox");D=mxUtils.button(mxResources.get("authorize"),function(){d(e.checked)});D.insertBefore(c,D.firstChild);D.style.marginTop="6px";D.className="geBigButton";D.style.fontSize=
"18px";D.style.padding="14px";u.appendChild(t);u.appendChild(b);u.appendChild(D);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(e),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberMe")),l.appendChild(t),u.appendChild(l),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(t,"click",function(g){e.checked=!e.checked;mxEvent.consume(g)}));this.container=u},MoreShapesDialog=function(b,f,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),
u=[];if(null!=b.sidebar.customEntries)for(var t=0;t<b.sidebar.customEntries.length;t++){for(var D=b.sidebar.customEntries[t],c={title:b.getResource(D.title),entries:[]},e=0;e<D.entries.length;e++){var g=D.entries[e];c.entries.push({id:g.id,title:b.getResource(g.title),desc:b.getResource(g.desc),image:g.preview})}u.push(c)}for(t=0;t<l.length;t++)if(null==b.sidebar.enabledLibraries)u.push(l[t]);else{c={title:l[t].title,entries:[]};for(e=0;e<l[t].entries.length;e++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-l[t].entries[e].id)&&c.entries.push(l[t].entries[e]);0<c.entries.length&&u.push(c)}l=u;if(f){t=mxUtils.bind(this,function(B){for(var F=0;F<B.length;F++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);k.appendChild(N);for(var J=0;J<G.entries.length;J++)(function(E){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",E.title+" ("+E.id+")");var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=b.sidebar.isEntryVisible(E.id);S.defaultChecked=S.checked;H.appendChild(S);mxUtils.write(H," "+E.title);k.appendChild(H);var U=function(Q){if(null==Q||"INPUT"!=mxEvent.getSource(Q).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=E.desc){var W=document.createElement("pre");
-W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,E.desc);m.appendChild(W)}null!=E.imageCallback?E.imageCallback(m):null!=E.image?m.innerHTML+='<img border="0" src="'+E.image+'"/>':null==E.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-Q&&mxEvent.consume(Q)}};mxEvent.addListener(H,"click",U);mxEvent.addListener(H,"dblclick",function(Q){S.checked=!S.checked;mxEvent.consume(Q)});v.push(function(){return S.checked?E.id:null});0==F&&0==J&&U()})(G.entries[J])})(B[F])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),
-m=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";var q=null,v=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";t(l);d.style.padding=
-"30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;l.appendChild(A);t=
-document.createElement("span");mxUtils.write(t," "+mxResources.get("labels"));t.style.paddingRight="20px";l.appendChild(t);mxEvent.addListener(t,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)});var z=document.createElement("input");z.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)t=document.createElement("span"),t.style.paddingRight="20px",t.appendChild(z),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),z.style.position="relative",z.style.top="1px",
-z.checked=!0,z.defaultChecked=!0,mxEvent.addListener(t,"click",function(B){mxEvent.getSource(B)!=z&&(z.checked=!z.checked,mxEvent.consume(B))}),l.appendChild(t);t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],F=0;F<v.length;F++){var G=v[F].apply(this,arguments);null!=G&&B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=
-(0<=F&&0<B.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=F&&0<B.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),z.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),z.checked,!0);b.setSidebarTitles(A.checked,z.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");t=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");
-L.style.width="100%";f=document.createElement("td");u=document.createElement("td");D=document.createElement("td");var M=mxUtils.bind(this,function(B,F,G){var N=document.createElement("input");N.type="checkbox";L.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var J=document.createElement("span");mxUtils.write(J,F);F=document.createElement("div");F.style.display="block";F.appendChild(N);F.appendChild(J);mxEvent.addListener(J,"click",function(E){N.checked=!N.checked;mxEvent.consume(E)});B.appendChild(F);
-return function(){return N.checked?G:null}});e.appendChild(f);e.appendChild(u);e.appendChild(D);t.appendChild(e);L.appendChild(t);v=[];var n=0;for(t=0;t<l.length;t++)for(e=0;e<l[t].entries.length;e++)n++;var x=[f,u,D],K=0;for(t=0;t<l.length;t++)(function(B){for(var F=0;F<B.entries.length;F++){var G=B.entries[F];v.push(M(x[Math.floor(K/(n/3))],G.title,G.id));K++}})(l[t]);d.appendChild(L);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";z=document.createElement("input");
-isLocalStorage&&(z.setAttribute("type","checkbox"),z.checked=!0,z.defaultChecked=!0,l.appendChild(z),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),l.appendChild(t),mxEvent.addListener(t,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)}));d.appendChild(l);t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],F=0;F<v.length;F++){var G=
-v[F].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",z.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(t),l.appendChild(e)):(l.appendChild(e),l.appendChild(t));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function u(){e=!0;if(0==c.length)D.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{D.innerHTML=
-"";for(var y=0;y<c.length;y++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var z=document.createElement("span");z.className="geSprite geSprite-delete";z.style.position="relative";z.style.cursor="pointer";z.style.top="5px";z.style.marginRight="4px";z.style.display="inline-block";A.appendChild(z);mxUtils.write(A,c[y]);D.appendChild(A);mxUtils.br(D);mxEvent.addListener(z,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
-l(c[L]);c.splice(L,1);u()})}}(y))}}}var t=document.createElement("div"),D=document.createElement("div");D.style.height="180px";D.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;t.appendChild(D);u();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(y){y&&0>mxUtils.indexOf(c,y)&&c.push(y);u()})}:function(){var y=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");
-y.appendChild(A);var z=document.createElement("select");z.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[A]);L.value=App.publicPlugin[A];z.appendChild(L)}y.appendChild(z);mxUtils.br(y);mxUtils.br(y);A=mxUtils.button(mxResources.get("custom")+"...",function(){var M=new FilenameDialog(b,"",mxResources.get("add"),function(n){b.hideDialog();if(null!=n&&0<n.length){n=n.split(";");for(var x=0;x<n.length;x++){var K=n[x],
-B=App.pluginRegistry[K];null!=B&&(K=B);0<K.length&&0>mxUtils.indexOf(c,K)&&c.push(K)}u()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(M.container,300,80,!0,!0);M.init()});A.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var M=App.pluginRegistry[z.value];0>mxUtils.indexOf(c,M)&&(c.push(M),u())}),null,null,null,A);b.showDialog(y.container,300,100,!0,!0)});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-k.className="geBtn";var m=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){e?(mxSettings.setPlugins(c),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});m.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});v.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(v.style.display="none");q.appendChild(v);b.editor.cancelFirst?(d||q.appendChild(k),q.appendChild(g),q.appendChild(m)):(q.appendChild(g),q.appendChild(m),d||q.appendChild(k));t.appendChild(q);this.container=t},CropImageDialog=function(b,f,l,d){function u(){var B=z.checked,F=L.checked,G=v.geometry,N=e.width,J=e.height,E=(300-N)/2,H=(300-J)/2;G.x<E?(G.width-=E-G.x,G.x=E):G.x+G.width>E+N&&(G.width=E+N-G.x,G.x=Math.min(G.x,E+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+J&&
-(G.height=H+J-G.y,G.y=Math.min(G.y,H+J));var S=(G.x-E)/N*100;N=100-(G.x+G.width-E)/N*100;E=(G.y-H)/J*100;G=100-(G.y+G.height-H)/J*100;return"inset("+mxUtils.format(E)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(S)+"%"+(B?" round "+q+"%":F?" round 50%":"")+")"}function t(B){null!=k&&(!0!==B&&(k.model.setGeometry(v,m.clone()),q=5,n.value=q),k.model.setStyle(v,y+u()),k.selectAll(),M.style.visibility=z.checked?"visible":"hidden")}var D=document.createElement("div"),c=document.createElement("div");
-c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function B(){k.model.setStyle(v,y+u())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var F=k.createVertexHandler;k.createVertexHandler=function(){var I=
-F.apply(this,arguments);I.livePreview=!1;return I};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,N=e.width,J=e.height,E=(300-N)/2,H=(300-J)/2,S=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(S[0]),Q=parseFloat(S[1]),W=parseFloat(S[2]),V=parseFloat(S[3]);isFinite(U)&&isFinite(Q)&&isFinite(W)&&isFinite(V)?(G.x=V/100*N+E,G.y=U/100*J+H,G.width=(100-Q)/100*N+E-G.x,G.height=(100-W)/100*J+H-G.y,"round"==S[4]?"50%"==S[5]?L.setAttribute("checked","checked"):(q=parseInt(S[5]),n.value=
-q,z.setAttribute("checked","checked"),M.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=y+(l?l:u());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,B);k.addListener(mxEvent.CELLS_RESIZED,B);var X=k.graphHandler.mouseUp,p=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){p.apply(this,arguments);g.style.backgroundColor=
+l[t].entries[e].id)&&c.entries.push(l[t].entries[e]);0<c.entries.length&&u.push(c)}l=u;if(f){t=mxUtils.bind(this,function(A){for(var B=0;B<A.length;B++)(function(G){var M=x.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,G.title);k.appendChild(M);for(var H=0;H<G.entries.length;H++)(function(F){var I=x.cloneNode(!1);I.style.cursor="pointer";I.style.padding="4px 0px 4px 20px";I.style.whiteSpace=
+"nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;I.appendChild(R);mxUtils.write(I," "+F.title);k.appendChild(I);var W=function(P){if(null==P||"INPUT"!=mxEvent.getSource(P).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
+V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);m.appendChild(V)}null!=F.imageCallback?F.imageCallback(m):null!=F.image?m.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=I;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
+P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",W);mxEvent.addListener(I,"dblclick",function(P){R.checked=!R.checked;mxEvent.consume(P)});v.push(function(){return R.checked?F.id:null});0==B&&0==H&&W()})(G.entries[H])})(A[B])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),
+m=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";var p=null,v=[],x=document.createElement("div");x.style.position="relative";x.style.left="0px";x.style.right="0px";t(l);d.style.padding=
+"30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;l.appendChild(z);t=
+document.createElement("span");mxUtils.write(t," "+mxResources.get("labels"));t.style.paddingRight="20px";l.appendChild(t);mxEvent.addListener(t,"click",function(A){z.checked=!z.checked;mxEvent.consume(A)});var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)t=document.createElement("span"),t.style.paddingRight="20px",t.appendChild(y),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",
+y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(t,"click",function(A){mxEvent.getSource(A)!=y&&(y.checked=!y.checked,mxEvent.consume(A))}),l.appendChild(t);t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var A=[],B=0;B<v.length;B++){var G=v[B].apply(this,arguments);null!=G&&A.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(B=mxUtils.indexOf(A,".scratchpad"),null!=b.scratchpad!=
+(0<=B&&0<A.splice(B,1).length)&&b.toggleScratchpad(),B=mxUtils.indexOf(A,"search"),mxSettings.settings.search=0<=B&&0<A.splice(B,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(A.join(";"),y.checked,!0);b.setSidebarTitles(z.checked,y.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");t=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");
+L.style.width="100%";f=document.createElement("td");u=document.createElement("td");D=document.createElement("td");var N=mxUtils.bind(this,function(A,B,G){var M=document.createElement("input");M.type="checkbox";L.appendChild(M);M.checked=b.sidebar.isEntryVisible(G);var H=document.createElement("span");mxUtils.write(H,B);B=document.createElement("div");B.style.display="block";B.appendChild(M);B.appendChild(H);mxEvent.addListener(H,"click",function(F){M.checked=!M.checked;mxEvent.consume(F)});A.appendChild(B);
+return function(){return M.checked?G:null}});e.appendChild(f);e.appendChild(u);e.appendChild(D);t.appendChild(e);L.appendChild(t);v=[];var K=0;for(t=0;t<l.length;t++)for(e=0;e<l[t].entries.length;e++)K++;var q=[f,u,D],E=0;for(t=0;t<l.length;t++)(function(A){for(var B=0;B<A.entries.length;B++){var G=A.entries[B];v.push(N(q[Math.floor(E/(K/3))],G.title,G.id));E++}})(l[t]);d.appendChild(L);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";y=document.createElement("input");
+isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,l.appendChild(y),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),l.appendChild(t),mxEvent.addListener(t,"click",function(A){y.checked=!y.checked;mxEvent.consume(A)}));d.appendChild(l);t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var A=["search"],B=0;B<v.length;B++){var G=
+v[B].apply(this,arguments);null!=G&&A.push(G)}b.sidebar.showEntries(0<A.length?A.join(";"):"",y.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(t),l.appendChild(e)):(l.appendChild(e),l.appendChild(t));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function u(){e=!0;if(0==c.length)D.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{D.innerHTML=
+"";for(var x=0;x<c.length;x++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";z.appendChild(y);mxUtils.write(z,c[x]);D.appendChild(z);mxUtils.br(D);mxEvent.addListener(y,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
+l(c[L]);c.splice(L,1);u()})}}(x))}}}var t=document.createElement("div"),D=document.createElement("div");D.style.height="180px";D.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;t.appendChild(D);u();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);u()})}:function(){var x=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
+x.appendChild(z);var y=document.createElement("select");y.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[z]);L.value=App.publicPlugin[z];y.appendChild(L)}x.appendChild(y);mxUtils.br(x);mxUtils.br(x);z=mxUtils.button(mxResources.get("custom")+"...",function(){var N=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=K.split(";");for(var q=0;q<K.length;q++){var E=K[q],
+A=App.pluginRegistry[E];null!=A&&(E=A);0<E.length&&0>mxUtils.indexOf(c,E)&&c.push(E)}u()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(N.container,300,80,!0,!0);N.init()});z.className="geBtn";x=new CustomDialog(b,x,mxUtils.bind(this,function(){var N=App.pluginRegistry[y.value];0>mxUtils.indexOf(c,N)&&(c.push(N),u())}),null,null,null,z);b.showDialog(x.container,300,100,!0,!0)});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+k.className="geBtn";var m=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){e?(mxSettings.setPlugins(c),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});m.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});v.className="geBtn";b.isOffline()&&
+!mxClient.IS_CHROMEAPP&&(v.style.display="none");p.appendChild(v);b.editor.cancelFirst?(d||p.appendChild(k),p.appendChild(g),p.appendChild(m)):(p.appendChild(g),p.appendChild(m),d||p.appendChild(k));t.appendChild(p);this.container=t},CropImageDialog=function(b,f,l,d){function u(){var A=y.checked,B=L.checked,G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,I=(300-H)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+M&&(G.width=F+M-G.x,G.x=Math.min(G.x,F+M));G.y<I?(G.height-=I-G.y,G.y=I):G.y+G.height>I+H&&
+(G.height=I+H-G.y,G.y=Math.min(G.y,I+H));var R=(G.x-F)/M*100;M=100-(G.x+G.width-F)/M*100;F=(G.y-I)/H*100;G=100-(G.y+G.height-I)/H*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(M)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(A?" round "+p+"%":B?" round 50%":"")+")"}function t(A){null!=k&&(!0!==A&&(k.model.setGeometry(v,m.clone()),p=5,K.value=p),k.model.setStyle(v,x+u()),k.selectAll(),N.style.visibility=y.checked?"visible":"hidden")}var D=document.createElement("div"),c=document.createElement("div");
+c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function A(){k.model.setStyle(v,x+u())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var B=k.createVertexHandler;k.createVertexHandler=function(){var J=
+B.apply(this,arguments);J.livePreview=!1;return J};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,I=(300-H)/2,R=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),P=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(P)&&isFinite(V)&&isFinite(U)?(G.x=U/100*M+F,G.y=W/100*H+I,G.width=(100-P)/100*M+F-G.x,G.height=(100-V)/100*H+I-G.y,"round"==R[4]?"50%"==R[5]?L.setAttribute("checked","checked"):(p=parseInt(R[5]),K.value=
+p,y.setAttribute("checked","checked"),N.style.visibility="visible"):z.setAttribute("checked","checked")):l=null}else l=null}catch(J){}v.style=x+(l?l:u());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,A);k.addListener(mxEvent.CELLS_RESIZED,A);var X=k.graphHandler.mouseUp,n=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){n.apply(this,arguments);g.style.backgroundColor=
""};k.dblClick=function(){};var C=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){C.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);D.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";D.appendChild(g);var k=null,m=new mxGeometry(100,
-100,100,100),q=5,v=new mxCell("",m.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";D.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));D.appendChild(f);
-var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRounded");z.setAttribute("name","croppingShape");z.style.margin="5px";D.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));D.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";D.appendChild(L);
-f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));D.appendChild(f);mxEvent.addListener(A,"change",t);mxEvent.addListener(z,"change",t);mxEvent.addListener(L,"change",t);var M=document.createElement("div");M.style.textAlign="center";M.style.visibility="hidden";var n=document.createElement("input");n.setAttribute("type","range");n.setAttribute("min","1");n.setAttribute("max","49");n.setAttribute("value",q);n.setAttribute("title",mxResources.get("arcSize"));
-M.appendChild(n);D.appendChild(M);mxEvent.addListener(n,"change",function(){q=this.value;t(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(u(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var x=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});x.className="geBtn";var K=document.createElement("div");K.style.marginTop=
-"10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(f),K.appendChild(x),K.appendChild(c)):(K.appendChild(x),K.appendChild(c),K.appendChild(f));D.appendChild(K);this.container=D},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,u=document.createElement("div"),t=document.createElement("table"),D=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");t.style.paddingLeft=
+100,100,100),p=5,v=new mxCell("",m.clone(),""),x="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";D.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));D.appendChild(f);
+var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";D.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));D.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";D.appendChild(L);
+f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));D.appendChild(f);mxEvent.addListener(z,"change",t);mxEvent.addListener(y,"change",t);mxEvent.addListener(L,"change",t);var N=document.createElement("div");N.style.textAlign="center";N.style.visibility="hidden";var K=document.createElement("input");K.setAttribute("type","range");K.setAttribute("min","1");K.setAttribute("max","49");K.setAttribute("value",p);K.setAttribute("title",mxResources.get("arcSize"));
+N.appendChild(K);D.appendChild(N);mxEvent.addListener(K,"change",function(){p=this.value;t(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(u(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});q.className="geBtn";var E=document.createElement("div");E.style.marginTop=
+"10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(f),E.appendChild(q),E.appendChild(c)):(E.appendChild(q),E.appendChild(c),E.appendChild(f));D.appendChild(E);this.container=D},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,u=document.createElement("div"),t=document.createElement("table"),D=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");t.style.paddingLeft=
"6px";mxUtils.write(e,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.y:"";g.appendChild(q);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
-g=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(v);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("dy")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
-y.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(y);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=d?d.width:"";g.appendChild(A);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
-document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.height:"";g.appendChild(z);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
-1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);D.appendChild(c);t.appendChild(D);u.appendChild(t);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var M=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var n=0;n<f.length;n++){var x=l.getCellGeometry(f[n]);null!=x&&(x=x.clone(),l.isCellMovable(f[n])&&(x.relative=k.checked,
-0<mxUtils.trim(m.value).length&&(x.x=Number(m.value)),0<mxUtils.trim(q.value).length&&(x.y=Number(q.value)),0<mxUtils.trim(v.value).length&&(null==x.offset&&(x.offset=new mxPoint),x.offset.x=Number(v.value)),0<mxUtils.trim(y.value).length&&(null==x.offset&&(x.offset=new mxPoint),x.offset.y=Number(y.value))),l.isCellResizable(f[n])&&(0<mxUtils.trim(A.value).length&&(x.width=Number(A.value)),0<mxUtils.trim(z.value).length&&(x.height=Number(z.value))),l.getModel().setGeometry(f[n],x));0<mxUtils.trim(L.value).length&&
-l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[n]])}}finally{l.getModel().endUpdate()}});M.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(n){13==n.keyCode&&M.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(M)):(t.appendChild(M),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(F){for(F=document.elementFromPoint(F.clientX,
-F.clientY);null!=F&&F.parentNode!=v;)F=F.parentNode;var G=null;if(null!=F){var N=v.firstChild;for(G=0;null!=N&&N!=F;)N=N.nextSibling,G++}return G}function c(F,G,N,J,E,H,S,U,Q){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==F&&null!=S||null==A[F]){var W=function(){O.innerHTML="";O.style.cursor="pointer";O.style.whiteSpace="nowrap";O.style.textOverflow="ellipsis";mxUtils.write(O,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));O.style.color=null==R.title||0==
-R.title.length?"#d0d0d0":""};v.style.backgroundImage="";y.style.display="none";var V=E,X=H;if(E>b.maxImageSize||H>b.maxImageSize){var p=Math.min(1,Math.min(b.maxImageSize/Math.max(1,E)),b.maxImageSize/Math.max(1,H));E*=p;H*=p}V>X?(X=Math.round(100*X/V),V=100):(V=Math.round(100*V/X),X=100);var C=document.createElement("div");C.setAttribute("draggable","true");C.style.display="inline-block";C.style.position="relative";C.style.padding="0 12px";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition",
-"transform .1s ease-in-out");if(null!=F){var I=document.createElement("img");I.setAttribute("src",n.convert(F));I.style.width=V+"px";I.style.height=X+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-X)/2)+"px";I.style.paddingLeft=Math.floor((100-V)/2)+"px";C.appendChild(I)}else if(null!=S){var T=b.stringToCells(Graph.decompress(S.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,C,null,!0,!1),C.firstChild.style.display="inline-block",C.firstChild.style.cursor="")}var P=document.createElement("img");
-P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,ea,aa){mxEvent.addListener(P,"click",function(va){A[ea]=null;for(var la=0;la<k.length;la++)if(null!=k[la].data&&k[la].data==ea||null!=k[la].xml&&
-null!=aa&&k[la].xml==aa.xml){k.splice(la,1);break}C.parentNode.removeChild(Z);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(va)});mxEvent.addListener(P,"dblclick",function(va){mxEvent.consume(va)})})(C,F,S);C.appendChild(P);C.style.marginBottom="30px";var O=document.createElement("div");O.style.position="absolute";O.style.boxSizing="border-box";O.style.bottom="-18px";O.style.left="10px";O.style.right="10px";O.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";O.style.overflow="hidden";O.style.textAlign="center";var R=null;null!=F?(R={data:F,w:E,h:H,title:Q},null!=U&&(R.aspect=U),A[F]=I,k.push(R)):null!=S&&(S.aspect="fixed",k.push(S),R=S);mxEvent.addListener(O,"keydown",function(Z){13==Z.keyCode&&null!=M&&(M(),M=null,mxEvent.consume(Z))});W();C.appendChild(O);mxEvent.addListener(O,"mousedown",function(Z){"true"!=O.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
-!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,R.title||"",mxResources.get("ok"),function(aa){null!=aa&&(R.title=aa,W())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(Z)}else if("true"!=O.getAttribute("contentEditable")){null!=M&&(M(),M=null);if(null==R.title||0==R.title.length)O.innerHTML="";O.style.textOverflow="";O.style.whiteSpace="";O.style.cursor="text";O.style.color="";O.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(O.style,"user-select","text");O.focus();document.execCommand("selectAll",!1,null);M=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";R.title=O.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==F&&null!=S&&(P.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",
-S.xml);z=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(C,30);P.style.visibility="";O.style.visibility=""},0)});mxEvent.addListener(C,"dragend",function(Z){"hidden"==P.style.visibility&&(P.style.visibility="",O.style.visibility="");z=null;mxUtils.setOpacity(C,100);mxUtils.setPrefixedStyle(C.style,"transform",null)})}else x||(x=!0,b.handleError({message:mxResources.get("fileExists")}));else{E=
-!1;try{if(V=mxUtils.parseXml(F),"mxlibrary"==V.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(V.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?c(null,null,0,0,0,0,X[Y]):c(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);E=!0}else if("mxfile"==V.documentElement.nodeName){var da=V.documentElement.getElementsByTagName("diagram");for(Y=0;Y<da.length;Y++){X=mxUtils.getTextContent(da[Y]);T=b.stringToCells(Graph.decompress(X));var ha=b.editor.graph.getBoundingBoxFromGeometry(T);
-c(null,null,0,0,0,0,{xml:X,w:ha.width,h:ha.height})}E=!0}}catch(Z){}E||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function e(F){F.dataTransfer.dropEffect=null!=z?"move":"copy";F.stopPropagation();F.preventDefault()}function g(F){F.stopPropagation();F.preventDefault();x=!1;L=D(F);if(null!=z)null!=L&&L<v.children.length?(k.splice(L>z?L-1:L,0,k.splice(z,1)[0]),v.insertBefore(v.children[z],v.children[L])):(k.push(k.splice(z,1)[0]),v.appendChild(v.children[z]));
-else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,K(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){c(G,null,0,0,N.width,N.height);v.scrollTop=v.scrollHeight})}F.stopPropagation();F.preventDefault()}var k=[];l=document.createElement("div");
-l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",f);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==u||u.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==u||u.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};m.appendChild(q);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");
-y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));l.appendChild(y);var A={},z=null,L=null,M=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=M&&(M(),M=null,mxEvent.consume(F))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var n=new mxUrlConverter,x=
-!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(F){y.style.cursor="";for(var G=mxEvent.getSource(F);null!=G;){if(G==v||G==y){F.stopPropagation();F.preventDefault();break}G=G.parentNode}});var K=function(F){return function(G,N,J,E,H,S,U,Q,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(V){c(V,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?
-null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(c(V.responseText,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(c(G,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);mxEvent.addListener(y,"dragover",e);mxEvent.addListener(y,"drop",g);l.appendChild(v);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
-d.appendChild(f);"draw.io"!=b.getServiceName()||null==u||u.constructor!=DriveLibrary&&u.constructor!=GitHubLibrary||(m=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&u.getPublicUrl(function(F){b.spinner.stop();if(null!=F){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(F);F=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(F.container,450,240,!0);F.init()}else u.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("export"),
-function(){var F=b.createLibraryDataFromImages(k),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");
-B.setAttribute("type","file");mxEvent.addListener(B,"change",function(F){x=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,J,E,H,S,U,Q,W){null!=B.files&&(K(F)(G,N,J,E,H,S,U,Q,W),B.type="",B.type="file",B.value="")});v.scrollTop=v.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}m=mxUtils.button(mxResources.get("import"),function(){null!=M&&(M(),M=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
-mxUtils.button(mxResources.get("addImages"),function(){null!=M&&(M(),M=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(F,G,N){x=!1;if(null!=F){if("data:image/"==F.substring(0,11)){var J=F.indexOf(",");0<J&&(F=F.substring(0,J)+";base64,"+F.substring(J+1))}c(F,null,0,0,G,N);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(F,G,N,J){b.saveLibrary(F,G,N,J)};m=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=M&&(M(),M=null);this.saveBtnClickHandler(q.value,k,u,t)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);l.appendChild(d);this.container=l},EditShapeDialog=function(b,f,l,d,u){d=null!=d?d:300;u=null!=u?u:120;var t=document.createElement("table"),D=document.createElement("tbody");t.style.cellPadding="4px";var c=document.createElement("tr");var e=document.createElement("td");e.setAttribute("colspan",
+"text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";g.appendChild(p);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
+g=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(v);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("dy")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";
+x.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(x);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";g.appendChild(z);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
+document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
+1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);D.appendChild(c);t.appendChild(D);u.appendChild(t);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var K=0;K<f.length;K++){var q=l.getCellGeometry(f[K]);null!=q&&(q=q.clone(),l.isCellMovable(f[K])&&(q.relative=k.checked,
+0<mxUtils.trim(m.value).length&&(q.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(q.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.x=Number(v.value)),0<mxUtils.trim(x.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.y=Number(x.value))),l.isCellResizable(f[K])&&(0<mxUtils.trim(z.value).length&&(q.width=Number(z.value)),0<mxUtils.trim(y.value).length&&(q.height=Number(y.value))),l.getModel().setGeometry(f[K],q));0<mxUtils.trim(L.value).length&&
+l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[K]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(K){13==K.keyCode&&N.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(N)):(t.appendChild(N),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(B){for(B=document.elementFromPoint(B.clientX,
+B.clientY);null!=B&&B.parentNode!=v;)B=B.parentNode;var G=null;if(null!=B){var M=v.firstChild;for(G=0;null!=M&&M!=B;)M=M.nextSibling,G++}return G}function c(B,G,M,H,F,I,R,W,P){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==B&&null!=R||null==z[B]){var V=function(){O.innerHTML="";O.style.cursor="pointer";O.style.whiteSpace="nowrap";O.style.textOverflow="ellipsis";mxUtils.write(O,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));O.style.color=null==S.title||0==
+S.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var U=F,X=I;if(F>b.maxImageSize||I>b.maxImageSize){var n=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,I));F*=n;I*=n}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var C=document.createElement("div");C.setAttribute("draggable","true");C.style.display="inline-block";C.style.position="relative";C.style.padding="0 12px";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition",
+"transform .1s ease-in-out");if(null!=B){var J=document.createElement("img");J.setAttribute("src",K.convert(B));J.style.width=U+"px";J.style.height=X+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-X)/2)+"px";J.style.paddingLeft=Math.floor((100-U)/2)+"px";C.appendChild(J)}else if(null!=R){var T=b.stringToCells(Graph.decompress(R.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,C,null,!0,!1),C.firstChild.style.display="inline-block",C.firstChild.style.cursor="")}var Q=document.createElement("img");
+Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,ea,aa){mxEvent.addListener(Q,"click",function(va){z[ea]=null;for(var la=0;la<k.length;la++)if(null!=k[la].data&&k[la].data==ea||null!=k[la].xml&&
+null!=aa&&k[la].xml==aa.xml){k.splice(la,1);break}C.parentNode.removeChild(Z);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(va)});mxEvent.addListener(Q,"dblclick",function(va){mxEvent.consume(va)})})(C,B,R);C.appendChild(Q);C.style.marginBottom="30px";var O=document.createElement("div");O.style.position="absolute";O.style.boxSizing="border-box";O.style.bottom="-18px";O.style.left="10px";O.style.right="10px";O.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";O.style.overflow="hidden";O.style.textAlign="center";var S=null;null!=B?(S={data:B,w:F,h:I,title:P},null!=W&&(S.aspect=W),z[B]=J,k.push(S)):null!=R&&(R.aspect="fixed",k.push(R),S=R);mxEvent.addListener(O,"keydown",function(Z){13==Z.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(Z))});V();C.appendChild(O);mxEvent.addListener(O,"mousedown",function(Z){"true"!=O.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(aa){null!=aa&&(S.title=aa,V())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(Z)}else if("true"!=O.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==S.title||0==S.title.length)O.innerHTML="";O.style.textOverflow="";O.style.whiteSpace="";O.style.cursor="text";O.style.color="";O.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(O.style,"user-select","text");O.focus();document.execCommand("selectAll",!1,null);N=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";S.title=O.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==B&&null!=R&&(Q.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);y=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(C,30);Q.style.visibility="";O.style.visibility=""},0)});mxEvent.addListener(C,"dragend",function(Z){"hidden"==Q.style.visibility&&(Q.style.visibility="",O.style.visibility="");y=null;mxUtils.setOpacity(C,100);mxUtils.setPrefixedStyle(C.style,"transform",null)})}else q||(q=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(U=mxUtils.parseXml(B),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?c(null,null,0,0,0,0,X[Y]):c(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var da=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<da.length;Y++){X=mxUtils.getTextContent(da[Y]);T=b.stringToCells(Graph.decompress(X));var ha=b.editor.graph.getBoundingBoxFromGeometry(T);
+c(null,null,0,0,0,0,{xml:X,w:ha.width,h:ha.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function e(B){B.dataTransfer.dropEffect=null!=y?"move":"copy";B.stopPropagation();B.preventDefault()}function g(B){B.stopPropagation();B.preventDefault();q=!1;L=D(B);if(null!=y)null!=L&&L<v.children.length?(k.splice(L>y?L-1:L,0,k.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[L])):(k.push(k.splice(y,1)[0]),v.appendChild(v.children[y]));
+else if(0<B.dataTransfer.files.length)b.importFiles(B.dataTransfer.files,0,0,b.maxImageSize,E(B));else if(0<=mxUtils.indexOf(B.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(B.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(M){c(G,null,0,0,M.width,M.height);v.scrollTop=v.scrollHeight})}B.stopPropagation();B.preventDefault()}var k=[];l=document.createElement("div");
+l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",f);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==u||u.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==u||u.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var x=document.createElement("div");
+x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));l.appendChild(x);var z={},y=null,L=null,N=null;f=function(B){"true"!=mxEvent.getSource(B).getAttribute("contentEditable")&&null!=N&&(N(),N=null,mxEvent.consume(B))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var K=new mxUrlConverter,q=
+!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(B){x.style.cursor="";for(var G=mxEvent.getSource(B);null!=G;){if(G==v||G==x){B.stopPropagation();B.preventDefault();break}G=G.parentNode}});var E=function(B){return function(G,M,H,F,I,R,W,P,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){c(U,M,H,F,I,R,W,"fixed",mxEvent.isAltDown(B)?
+null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(c(U.responseText,M,H,F,I,R,W,"fixed",mxEvent.isAltDown(B)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(c(G,M,H,F,I,R,W,"fixed",mxEvent.isAltDown(B)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);mxEvent.addListener(x,"dragover",e);mxEvent.addListener(x,"drop",g);l.appendChild(v);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
+d.appendChild(f);"draw.io"!=b.getServiceName()||null==u||u.constructor!=DriveLibrary&&u.constructor!=GitHubLibrary||(m=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&u.getPublicUrl(function(B){b.spinner.stop();if(null!=B){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(B);B=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(B.container,450,240,!0);B.init()}else u.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("export"),
+function(){var B=b.createLibraryDataFromImages(k),G=p.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(B,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(B))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");
+A.setAttribute("type","file");mxEvent.addListener(A,"change",function(B){q=!1;b.importFiles(A.files,0,0,b.maxImageSize,function(G,M,H,F,I,R,W,P,V){null!=A.files&&(E(B)(G,M,H,F,I,R,W,P,V),A.type="",A.type="file",A.value="")});v.scrollTop=v.scrollHeight});A.style.display="none";document.body.appendChild(A);b.libDlgFileInputElt=A}m=mxUtils.button(mxResources.get("import"),function(){null!=N&&(N(),N=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
+mxUtils.button(mxResources.get("addImages"),function(){null!=N&&(N(),N=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(B,G,M){q=!1;if(null!=B){if("data:image/"==B.substring(0,11)){var H=B.indexOf(",");0<H&&(B=B.substring(0,H)+";base64,"+B.substring(H+1))}c(B,null,0,0,G,M);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(B,G,M,H){b.saveLibrary(B,G,M,H)};m=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=N&&(N(),N=null);this.saveBtnClickHandler(p.value,k,u,t)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);l.appendChild(d);this.container=l},EditShapeDialog=function(b,f,l,d,u){d=null!=d?d:300;u=null!=u?u:120;var t=document.createElement("table"),D=document.createElement("tbody");t.style.cellPadding="4px";var c=document.createElement("tr");var e=document.createElement("td");e.setAttribute("colspan",
"2");e.style.fontSize="10pt";mxUtils.write(e,l);c.appendChild(e);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=d-200+"px";g.style.height=u+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};e.appendChild(g);c.appendChild(e);e=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top=
-"6px";l.style.width="200px";l.style.height=u+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);e.appendChild(l);var k=new Graph(l);k.setEnabled(!1);var m=b.editor.graph.cloneCell(f);k.addCells([m]);l=k.view.getState(m);var q="";null!=l.shape&&null!=l.shape.stencil&&(q=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(g,q||"");l=k.getGraphBounds();u=Math.min(160/l.width,(u-40)/l.height);k.view.scaleAndTranslate(u,20/u-l.x,20/u-l.y);c.appendChild(e);
+"6px";l.style.width="200px";l.style.height=u+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);e.appendChild(l);var k=new Graph(l);k.setEnabled(!1);var m=b.editor.graph.cloneCell(f);k.addCells([m]);l=k.view.getState(m);var p="";null!=l.shape&&null!=l.shape.stencil&&(p=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(g,p||"");l=k.getGraphBounds();u=Math.min(160/l.width,(u-40)/l.height);k.view.scaleAndTranslate(u,20/u-l.x,20/u-l.y);c.appendChild(e);
D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");e.setAttribute("colspan","2");e.style.paddingTop="2px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),u.className="geBtn",e.appendChild(u));u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&e.appendChild(u);
-var v=function(y,A,z){var L=g.value,M=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(M.documentElement);M=M.documentElement.getElementsByTagName("parsererror");if(null!=M&&0<M.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(z&&b.hideDialog(),M=!y.model.contains(A),!z||M||L!=q){L=Graph.compress(L);y.getModel().beginUpdate();try{if(M){var n=b.editor.graph.getFreeInsertPoint();A.geometry.x=n.x;A.geometry.y=n.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+L+")",[A])}catch(x){throw x;}finally{y.getModel().endUpdate()}M&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(u);c.appendChild(e);D.appendChild(c);t.appendChild(D);this.container=t},CustomDialog=function(b,f,l,d,u,t,
-D,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=D&&q.appendChild(D);b.isOffline()||null==t||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(t)}),f.className="geBtn",q.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&q.appendChild(e);u=mxUtils.button(u||
-mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,y,A){v=mxUtils.button(v,function(z){y(z)});null!=A&&v.setAttribute("title",A);v.className="geBtn";q.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
-m.appendChild(q);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,y){function A(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+
-ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}
+var v=function(x,z,y){var L=g.value,N=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(N.documentElement);N=N.documentElement.getElementsByTagName("parsererror");if(null!=N&&0<N.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),N=!x.model.contains(z),!y||N||L!=p){L=Graph.compress(L);x.getModel().beginUpdate();try{if(N){var K=b.editor.graph.getFreeInsertPoint();z.geometry.x=K.x;z.geometry.y=K.y;x.addCell(z)}x.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+L+")",[z])}catch(q){throw q;}finally{x.getModel().endUpdate()}N&&(x.setSelectionCell(z),x.scrollCellToVisible(z))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(u);c.appendChild(e);D.appendChild(c);t.appendChild(D);this.container=t},CustomDialog=function(b,f,l,d,u,t,
+D,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="center";null!=D&&p.appendChild(D);b.isOffline()||null==t||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(t)}),f.className="geBtn",p.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&p.appendChild(e);u=mxUtils.button(u||
+mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));p.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||p.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,z){v=mxUtils.button(v,function(y){x(y)});null!=z&&v.setAttribute("title",z);v.className="geBtn";p.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
+m.appendChild(p);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,p,v,x){function z(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function y(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",n=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";P.querySelector(".geTempDlgRadioBtn[data-id="+
+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");P.querySelector("."+ca).src="/images/"+ba+"-sel.svg";P.querySelector("."+ia).src="/images/"+ma+".svg";return!0}function N(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}
function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==
-ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function n(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,
-1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,I=ba,Fa.className="geTempDlgCreateBtn"):(I=C=null,Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function x(fa,ca){if(null!=I){var ba=function(oa){qa.isExternal?e(qa,function(na){ja(na,oa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?ja(na.getText(),oa):ia()})):ja(b.emptyDiagramXml,oa)},ja=function(oa,na){y||b.hideDialog(!0);f(oa,na,qa,ca)},ia=function(){A(mxResources.get("cannotLoad"));
-ma()},ma=function(){I=qa;Fa.className="geTempDlgCreateBtn";ca&&(Ka.className="geTempDlgOpenBtn")},qa=I;I=null;"boolean"!==typeof ca&&(ca=qa.isExternal&&m);1==fa?g(qa.url,qa):ca?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",fa=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),fa=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ba,fa,function(oa){var na=null!=oa&&0<oa.length;return na&&y?(ba(oa),!1):na},null,null,null,ma,v?null:[]),b.showDialog(fa.container,350,80,!0,!0),fa.init())}}function K(fa){Fa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||fa?"create":"copy"));fa=fa?"none":"";m&&(Ka.style.display=fa);for(var ca=Q.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<ca.length;ba++)ca[ba].style.display=fa}function B(fa,ca,ba,ja,ia){ia||(aa.innerHTML="",n(),R=fa,Y=ja);var ma=null;if(ba){ma=document.createElement("table");
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";P.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(P.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==
+ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){z(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function K(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,
+1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,J=ba,Fa.className="geTempDlgCreateBtn"):(J=C=null,Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(fa,ca){if(null!=J){var ba=function(oa){qa.isExternal?e(qa,function(na){ja(na,oa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?ja(na.getText(),oa):ia()})):ja(b.emptyDiagramXml,oa)},ja=function(oa,na){x||b.hideDialog(!0);f(oa,na,qa,ca)},ia=function(){z(mxResources.get("cannotLoad"));
+ma()},ma=function(){J=qa;Fa.className="geTempDlgCreateBtn";ca&&(Ka.className="geTempDlgOpenBtn")},qa=J;J=null;"boolean"!==typeof ca&&(ca=qa.isExternal&&m);1==fa?g(qa.url,qa):ca?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",fa=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),fa=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),ba,fa,function(oa){var na=null!=oa&&0<oa.length;return na&&x?(ba(oa),!1):na},null,null,null,ma,v?null:[]),b.showDialog(fa.container,350,80,!0,!0),fa.init())}}function E(fa){Fa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||fa?"create":"copy"));fa=fa?"none":"";m&&(Ka.style.display=fa);for(var ca=P.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<ca.length;ba++)ca[ba].style.display=fa}function A(fa,ca,ba,ja,ia){ia||(aa.innerHTML="",K(),S=fa,Y=ja);var ma=null;if(ba){ma=document.createElement("table");
ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"),oa=document.createElement("th");oa.style.width="50%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));qa.appendChild(oa);oa=document.createElement("th");oa.style.width="25%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));qa.appendChild(oa);oa=document.createElement("th");oa.style.width="25%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));qa.appendChild(oa);ma.appendChild(qa);
aa.appendChild(ma)}for(qa=0;qa<fa.length;qa++){fa[qa].isExternal=!ca;var na=fa[qa].url,Ja=(oa=mxUtils.htmlEntities(ca?mxResources.get(fa[qa].title,null,fa[qa].title):fa[qa].title))||fa[qa].url,Ga=fa[qa].imgUrl,Ra=mxUtils.htmlEntities(fa[qa].changedBy||""),Sa="";fa[qa].lastModifiedOn&&(Sa=b.timeSince(new Date(fa[qa].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ga||(Ga=TEMPLATE_PATH+"/"+na.substring(0,na.length-
4)+".png");na=ba?50:15;null!=oa&&oa.length>na&&(oa=oa.substring(0,na)+"&hellip;");if(ba){var Ha=document.createElement("tr");Ga=document.createElement("td");var Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramListPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));ia||Ga.appendChild(Na);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=oa;Ga.appendChild(Ja);Ha.appendChild(Ga);Ga=document.createElement("td");
-Ga.innerHTML=Ra;Ha.appendChild(Ga);Ga=document.createElement("td");Ga.innerHTML=Sa;Ha.appendChild(Ga);ma.appendChild(Ha);null==C&&(K(ca),n(Ha,"geTempDlgDiagramsListGridActive",fa[qa]));(function(La,Ta,Ua){mxEvent.addListener(Ha,"click",function(){C!=Ta&&(K(ca),n(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Ha,"dblclick",x);mxEvent.addListener(Na,"click",function(Za){M(La,Ta,Ua,Za)})})(fa[qa],Ha,Na)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
-Ja);null==C&&(K(ca),n(Pa,"geTempDlgDiagramTileActive",fa[qa]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(La,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ga?Ga.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Qa.src=Ga;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=oa?oa:"";Pa.appendChild(Ra);Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Na);(function(La,Ta,Ua){mxEvent.addListener(Pa,"click",function(){C!=Ta&&(K(ca),n(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Pa,
-"dblclick",x);mxEvent.addListener(Na,"click",function(Za){M(La,Ta,Ua,Za)})})(fa[qa],Pa,Na);aa.appendChild(Pa)}}for(var Ya in ja)fa=ja[Ya],0<fa.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),B(fa,ca,ba,null,!0))}function F(fa,ca){Da.innerHTML="";n();var ba=Math.floor(Da.offsetWidth/150)-1;ca=!ca&&fa.length>ba?ba:fa.length;for(var ja=0;ja<ca;ja++){var ia=fa[ja];ia.isCategory=!0;var ma=document.createElement("div"),
-qa=mxResources.get(ia.title);null==qa&&(qa=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==C&&(K(!0),n(ma,"geTempDlgNewDiagramCatItemActive",ia));var oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;oa.appendChild(na);ma.appendChild(oa);
-oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);(function(Ja,Ga){mxEvent.addListener(ma,"click",function(){C!=Ga&&(K(!0),n(Ga,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ma,"dblclick",x)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");ma.setAttribute("title",qa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";
-oa.innerHTML="...";oa.style.fontSize="32px";ma.appendChild(oa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ja(){var Ra=Ga.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}Z=!0;var Ga=Q.querySelector(".geTemplatesList");Ga.style.display="block";Aa.style.width="";Oa.style.display="";Oa.value="";da=null;Ja()});ea.style.display=fa.length<=
+Ga.innerHTML=Ra;Ha.appendChild(Ga);Ga=document.createElement("td");Ga.innerHTML=Sa;Ha.appendChild(Ga);ma.appendChild(Ha);null==C&&(E(ca),K(Ha,"geTempDlgDiagramsListGridActive",fa[qa]));(function(La,Ta,Ua){mxEvent.addListener(Ha,"click",function(){C!=Ta&&(E(ca),K(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Ha,"dblclick",q);mxEvent.addListener(Na,"click",function(Za){N(La,Ta,Ua,Za)})})(fa[qa],Ha,Na)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ja);null==C&&(E(ca),K(Pa,"geTempDlgDiagramTileActive",fa[qa]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(La,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ga?Ga.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Qa.src=Ga;Ra.appendChild(Qa);Pa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=oa?oa:"";Pa.appendChild(Ra);Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));ia||Pa.appendChild(Na);(function(La,Ta,Ua){mxEvent.addListener(Pa,"click",function(){C!=Ta&&(E(ca),K(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Pa,
+"dblclick",q);mxEvent.addListener(Na,"click",function(Za){N(La,Ta,Ua,Za)})})(fa[qa],Pa,Na);aa.appendChild(Pa)}}for(var Ya in ja)fa=ja[Ya],0<fa.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),A(fa,ca,ba,null,!0))}function B(fa,ca){Da.innerHTML="";K();var ba=Math.floor(Da.offsetWidth/150)-1;ca=!ca&&fa.length>ba?ba:fa.length;for(var ja=0;ja<ca;ja++){var ia=fa[ja];ia.isCategory=!0;var ma=document.createElement("div"),
+qa=mxResources.get(ia.title);null==qa&&(qa=ia.title.substring(0,1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==C&&(E(!0),K(ma,"geTempDlgNewDiagramCatItemActive",ia));var oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;oa.appendChild(na);ma.appendChild(oa);
+oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);(function(Ja,Ga){mxEvent.addListener(ma,"click",function(){C!=Ga&&(E(!0),K(Ga,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ma,"dblclick",q)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");ma.setAttribute("title",qa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";
+oa.innerHTML="...";oa.style.fontSize="32px";ma.appendChild(oa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ja(){var Ra=Ga.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}Z=!0;var Ga=P.querySelector(".geTemplatesList");Ga.style.display="block";Aa.style.width="";Oa.style.display="";Oa.value="";da=null;Ja()});ea.style.display=fa.length<=
ba?"none":""}function G(fa,ca,ba){function ja(Qa,Ya){var La=mxResources.get(Qa);null==La&&(La=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=La+" ("+Ya.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,La,Ta,Ua){mxEvent.addListener(La,"click",function(){X!=La&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(ua.style.display="none",Ba.style.minHeight="100%"),
-X=La,X.style.fontWeight="bold",X.style.textDecoration="underline",Aa.scrollTop=0,W&&(V=!0),va.innerHTML=Ya,la.style.display="none",B(Ua?ca[Qa]:Ta?ka[Qa][Ta]:fa[Qa],Ua?!1:!0))})}var ma=Q.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));ma.appendChild(ba);for(var qa in ca){ba=document.createElement("div");var oa=ca[qa];
+X=La,X.style.fontWeight="bold",X.style.textDecoration="underline",Aa.scrollTop=0,V&&(U=!0),va.innerHTML=Ya,la.style.display="none",A(Ua?ca[Qa]:Ta?ka[Qa][Ta]:fa[Qa],Ua?!1:!0))})}var ma=P.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));ma.appendChild(ba);for(var qa in ca){ba=document.createElement("div");var oa=ca[qa];
oa=ja(qa,oa);ba.className="geTemplateCatLink";ba.setAttribute("title",oa.fullLbl);ba.innerHTML=oa.lbl;ma.appendChild(ba);ia(qa,oa.lblOnly,ba,null,!0)}ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,"draw.io");ma.appendChild(ba)}for(qa in fa){var na=ka[qa],Ja=ba=document.createElement(na?"ul":"div");oa=fa[qa];oa=ja(qa,oa);if(null!=na){var Ga=document.createElement("li"),Ra=document.createElement("div");
Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",oa.fullLbl);Ra.innerHTML=oa.lbl;Ja=Ra;Ga.appendChild(Ra);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ha in na){var Na=document.createElement("li"),Pa=ja(Ha,na[Ha]);Na.setAttribute("title",Pa.fullLbl);Na.innerHTML=Pa.lbl;Na.className="geTemplateCatLink";Na.style.padding="0";Na.style.margin="0";ia(qa,Pa.lblOnly,Na,Ha);Sa.appendChild(Na)}Ga.appendChild(Sa);
ba.className="geTempTree";ba.appendChild(Ga);(function(Qa,Ya){mxEvent.addListener(Ya,"click",function(){for(var La=Qa.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Qa.style.visibility="visible";Qa.classList.toggle("geTempTreeActive");Qa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<La.length;Ua++)La[Ua].style.margin="0";Qa.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Sa,Ra)}else ba.className="geTemplateCatLink geTemplateDrawioCatLink",
-ba.setAttribute("title",oa.fullLbl),ba.innerHTML=oa.lbl;ma.appendChild(ba);ia(qa,oa.lblOnly,Ja)}}function N(){mxUtils.get(d,function(fa){if(!Ma){Ma=!0;fa=fa.getXml().documentElement.firstChild;for(var ca={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==fa.nodeName){for(var ba=fa.getAttribute("name"),ja=fa.getElementsByTagName("add"),ia=[],ma=0;ma<ja.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(ja[ma])));null!=ba&&0<ia.length&&(ca[ba]=ia.join(";"))}else if(ia=fa.getAttribute("url"),
+ba.setAttribute("title",oa.fullLbl),ba.innerHTML=oa.lbl;ma.appendChild(ba);ia(qa,oa.lblOnly,Ja)}}function M(){mxUtils.get(d,function(fa){if(!Ma){Ma=!0;fa=fa.getXml().documentElement.firstChild;for(var ca={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==fa.nodeName){for(var ba=fa.getAttribute("name"),ja=fa.getElementsByTagName("add"),ia=[],ma=0;ma<ja.length;ma++)ia.push(encodeURIComponent(mxUtils.getTextContent(ja[ma])));null!=ba&&0<ia.length&&(ca[ba]=ia.join(";"))}else if(ia=fa.getAttribute("url"),
null!=ia){ja=fa.getAttribute("section");ba=fa.getAttribute("subsection");if(null==ja&&(ma=ia.indexOf("/"),ja=ia.substring(0,ma),null==ba)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ba=ia.substring(ma+1,qa))}ma=ta[ja];null==ma&&(ya++,ma=[],ta[ja]=ma);ia=fa.getAttribute("clibs");null!=ca[ia]&&(ia=ca[ia]);ia={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title")||fa.getAttribute("name"),preview:fa.getAttribute("preview"),clibs:ia,tags:fa.getAttribute("tags")};ma.push(ia);null!=
-ba&&(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,wa)}})}function J(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),V=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){A(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function E(fa){if(""==fa)null!=p&&(p.click(),p=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia=
+ba&&(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,wa)}})}function H(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,V=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){z(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function F(fa){if(""==fa)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia=
ba[ja];if(null!=ia.tags)for(var ma=ia.tags.toLowerCase().split(";"),qa=0;qa<ma.length;qa++)null==ca[ma[qa]]&&(ca[ma[qa]]=[]),ca[ma[qa]].push(ia)}TemplatesDialog.tagsList[d]=ca}var oa=fa.toLowerCase().split(" ");ca=TemplatesDialog.tagsList[d];if(0<wa&&null==ca.__tagsList__){for(Ja in pa)for(ba=pa[Ja],ja=0;ja<ba.length;ja++)for(ia=ba[ja],ma=ia.title.split(" "),ma.push(Ja),qa=0;qa<ma.length;qa++){var na=ma[qa].toLowerCase();null==ca[na]&&(ca[na]=[]);ca[na].push(ia)}ca.__tagsList__=!0}var Ja=[];ba={};
-for(ja=ma=0;ja<oa.length;ja++)if(0<oa[ja].length){na=ca[oa[ja]];var Ga={};Ja=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ba[ia.url])&&(Ga[ia.url]=!0,Ja.push(ia));ba=Ga;ma++}0==Ja.length?va.innerHTML=mxResources.get("noResultsFor",[fa]):B(Ja,!0)}}function H(fa){if(da!=fa||P!=ha)z(),Aa.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',xa=null,Z?E(fa):c&&(fa?(Ea.spin(aa),V=!1,W=!0,c(fa,ra,function(){A(mxResources.get("searchFailed"));
-ra([])},P?null:t)):J(P)),da=fa,ha=P}function S(fa){null!=xa&&clearTimeout(xa);13==fa.keyCode?H(Oa.value):xa=setTimeout(function(){H(Oa.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+for(ja=ma=0;ja<oa.length;ja++)if(0<oa[ja].length){na=ca[oa[ja]];var Ga={};Ja=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ba[ia.url])&&(Ga[ia.url]=!0,Ja.push(ia));ba=Ga;ma++}0==Ja.length?va.innerHTML=mxResources.get("noResultsFor",[fa]):A(Ja,!0)}}function I(fa){if(da!=fa||Q!=ha)y(),Aa.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',xa=null,Z?F(fa):c&&(fa?(Ea.spin(aa),U=!1,V=!0,c(fa,ra,function(){z(mxResources.get("searchFailed"));
+ra([])},Q?null:t)):H(Q)),da=fa,ha=Q}function R(fa){null!=xa&&clearTimeout(xa);13==fa.keyCode?I(Oa.value):xa=setTimeout(function(){I(Oa.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(m?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",Q=document.createElement("div");Q.innerHTML=U;Q.className=
-"geTemplateDlg";this.container=Q;d=null!=d?d:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,V=!1,X=null,p=null,C=null,I=null,T=!1,P=!0,O=!1,R=[],Y=null,da,ha,Z=!1,ea=Q.querySelector(".geTempDlgShowAllBtn"),aa=Q.querySelector(".geTempDlgDiagramsTiles"),va=Q.querySelector(".geTempDlgDiagramsListTitle"),la=Q.querySelector(".geTempDlgDiagramsListBtns"),Aa=Q.querySelector(".geTempDlgContent"),Ba=Q.querySelector(".geTempDlgDiagramsList"),ua=Q.querySelector(".geTempDlgNewDiagramCat"),
-Da=Q.querySelector(".geTempDlgNewDiagramCatList"),Fa=Q.querySelector(".geTempDlgCreateBtn"),Ka=Q.querySelector(".geTempDlgOpenBtn"),Oa=Q.querySelector(".geTempDlgSearchBox"),Ia=Q.querySelector(".geTempDlgErrMsg"),Ea=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(Q.querySelector(".geTempDlgBack"),"click",function(){z();Z=!1;Q.querySelector(".geTemplatesList").style.display="none";Aa.style.width=
-"100%";ua.style.display="";Ba.style.minHeight="calc(100% - 280px)";Oa.style.display=c?"":"none";Oa.value="";da=null;J(P)});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==da?J(P):H(da))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==da?J(P):H(da))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(O=!0,B(R,!1,O,Y))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(O=!1,B(R,!1,O,Y))});
-var Ca=!1;mxEvent.addListener(ea,"click",function(){T?(ua.style.height="280px",Da.style.height="190px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),F(sa)):(ua.style.height="440px",Da.style.height="355px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),F(sa,!0));T=!T});var Ma=!1,za=!1,ta={},ka={},pa={},sa=[],ya=1,wa=0;null!=k?k(function(fa,ca){pa=fa;wa=ca;N()},N):N();mxUtils.get(u,function(fa){if(!za){za=!0;for(fa=fa.getXml().documentElement.firstChild;null!=fa;)"undefined"!==
-typeof fa.getAttribute&&null!=fa.getAttribute("title")&&sa.push({img:fa.getAttribute("img"),libs:fa.getAttribute("libs"),clibs:fa.getAttribute("clibs"),title:fa.getAttribute("title")}),fa=fa.nextSibling;F(sa)}});var ra=function(fa,ca,ba){la.style.display="";Ea.stop();W=!1;if(V)V=!1;else if(ca)aa.innerHTML=ca;else{ba=ba||{};ca=0;for(var ja in ba)ca+=ba[ja].length;0==fa.length&&0==ca?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(fa,!1,O,0==ca?null:ba)}};J(P);var xa=null;mxEvent.addListener(Oa,
-"keyup",S);mxEvent.addListener(Oa,"search",S);mxEvent.addListener(Oa,"input",S);mxEvent.addListener(Fa,"click",function(fa){x(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(fa){x(!1,!0)});q&&mxEvent.addListener(Q.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(fa){x(!0)});mxEvent.addListener(Q.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(p?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(m?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",P=document.createElement("div");P.innerHTML=W;P.className=
+"geTemplateDlg";this.container=P;d=null!=d?d:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,n=null,C=null,J=null,T=!1,Q=!0,O=!1,S=[],Y=null,da,ha,Z=!1,ea=P.querySelector(".geTempDlgShowAllBtn"),aa=P.querySelector(".geTempDlgDiagramsTiles"),va=P.querySelector(".geTempDlgDiagramsListTitle"),la=P.querySelector(".geTempDlgDiagramsListBtns"),Aa=P.querySelector(".geTempDlgContent"),Ba=P.querySelector(".geTempDlgDiagramsList"),ua=P.querySelector(".geTempDlgNewDiagramCat"),
+Da=P.querySelector(".geTempDlgNewDiagramCatList"),Fa=P.querySelector(".geTempDlgCreateBtn"),Ka=P.querySelector(".geTempDlgOpenBtn"),Oa=P.querySelector(".geTempDlgSearchBox"),Ia=P.querySelector(".geTempDlgErrMsg"),Ea=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(P.querySelector(".geTempDlgBack"),"click",function(){y();Z=!1;P.querySelector(".geTemplatesList").style.display="none";Aa.style.width=
+"100%";ua.style.display="";Ba.style.minHeight="calc(100% - 280px)";Oa.style.display=c?"":"none";Oa.value="";da=null;H(Q)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==da?H(Q):I(da))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==da?H(Q):I(da))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(O=!0,A(S,!1,O,Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(O=!1,A(S,!1,O,Y))});
+var Ca=!1;mxEvent.addListener(ea,"click",function(){T?(ua.style.height="280px",Da.style.height="190px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),B(sa)):(ua.style.height="440px",Da.style.height="355px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),B(sa,!0));T=!T});var Ma=!1,za=!1,ta={},ka={},pa={},sa=[],ya=1,wa=0;null!=k?k(function(fa,ca){pa=fa;wa=ca;M()},M):M();mxUtils.get(u,function(fa){if(!za){za=!0;for(fa=fa.getXml().documentElement.firstChild;null!=fa;)"undefined"!==
+typeof fa.getAttribute&&null!=fa.getAttribute("title")&&sa.push({img:fa.getAttribute("img"),libs:fa.getAttribute("libs"),clibs:fa.getAttribute("clibs"),title:fa.getAttribute("title")}),fa=fa.nextSibling;B(sa)}});var ra=function(fa,ca,ba){la.style.display="";Ea.stop();V=!1;if(U)U=!1;else if(ca)aa.innerHTML=ca;else{ba=ba||{};ca=0;for(var ja in ba)ca+=ba[ja].length;0==fa.length&&0==ca?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):A(fa,!1,O,0==ca?null:ba)}};H(Q);var xa=null;mxEvent.addListener(Oa,
+"keyup",R);mxEvent.addListener(Oa,"search",R);mxEvent.addListener(Oa,"input",R);mxEvent.addListener(Fa,"click",function(fa){q(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(fa){q(!1,!0)});p&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(fa){q(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,f,l,d){var u=document.createElement("div");u.style.textAlign="center";var t=document.createElement("p");t.style.fontSize="16pt";t.style.padding="0px";t.style.margin="0px";t.style.color="gray";mxUtils.write(t,mxResources.get("done"));var D="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
(D=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(D=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(D=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(D=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[D],"You are now authorized in {1}"));
-l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";u.appendChild(t);u.appendChild(b);u.appendChild(l);this.container=u},FontDialog=function(b,f,l,d,u){function t(n){this.style.border="";13==n.keyCode&&M.click()}var D=document.createElement("table"),c=document.createElement("tbody");D.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
+l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";u.appendChild(t);u.appendChild(b);u.appendChild(l);this.container=u},FontDialog=function(b,f,l,d,u){function t(K){this.style.border="";13==K.keyCode&&N.click()}var D=document.createElement("table"),c=document.createElement("tbody");D.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
"nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","sysfonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-sysfonts");g.appendChild(k);var m=document.createElement("label");m.setAttribute("for","fontdialog-sysfonts");mxUtils.write(m,mxResources.get("sysFonts",null,"System Fonts"));g.appendChild(m);e.appendChild(g);
-c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var q=document.createElement("input");"s"==d&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";g=document.createElement("td");g.appendChild(q);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");
+c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var p=document.createElement("input");"s"==d&&p.setAttribute("value",f);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";g=document.createElement("td");g.appendChild(p);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");
g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","googlefonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-googlefonts");g.appendChild(v);m=document.createElement("label");m.setAttribute("for","fontdialog-googlefonts");mxUtils.write(m,mxResources.get("googleFonts",
null,"Google Fonts"));g.appendChild(m);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(m=b.menus.createHelpLink("https://fonts.google.com/"),m.getElementsByTagName("img")[0].setAttribute("valign","middle"),g.appendChild(m));e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");
-e.appendChild(g);var y=document.createElement("input");"g"==d&&y.setAttribute("value",f);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(y);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
-"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");g.appendChild(A);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
-"15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var z=document.createElement("input");"w"==d&&(Editor.enableWebFonts?z.setAttribute("value",f):q.setAttribute("value",f));z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontName_w";g=document.createElement("td");g.appendChild(z);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";
-g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontUrl",null,"Font URL")+":");e.appendChild(g);var L=document.createElement("input");L.setAttribute("value",l||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";g=document.createElement("td");g.appendChild(L);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);this.init=function(){var n=q;"g"==d?n=y:"w"==d&&Editor.enableWebFonts&&(n=z);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null)};e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",g.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();u()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);
-var M=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var n=q.value;var x="s"}else if(v.checked){n=y.value;var K=Editor.GOOGLE_FONTS+encodeURIComponent(n).replace(/%20/g,"+");x="g"}else A.checked&&(n=z.value,K=L.value,x="w");var B=K;var F=x,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==n||0==n.length?(D.querySelector(".dlg_fontName_"+F).style.border="1px solid red",B=!1):"w"!=F||G.test(B)?B=!0:(D.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",B=!1);B&&(u(n,K,x),b.hideDialog())});M.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",t);mxEvent.addListener(y,"keypress",t);mxEvent.addListener(z,"keypress",t);mxEvent.addListener(L,"keypress",t);mxEvent.addListener(q,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(z,"focus",function(){A.setAttribute("checked","checked");A.checked=
-!0});mxEvent.addListener(L,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});g.appendChild(M);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);D.appendChild(c);this.container=D};
+e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("value",f);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(x);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");g.appendChild(z);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
+"15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var y=document.createElement("input");"w"==d&&(Editor.enableWebFonts?y.setAttribute("value",f):p.setAttribute("value",f));y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";g=document.createElement("td");g.appendChild(y);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";
+g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontUrl",null,"Font URL")+":");e.appendChild(g);var L=document.createElement("input");L.setAttribute("value",l||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";g=document.createElement("td");g.appendChild(L);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);this.init=function(){var K=p;"g"==d?K=x:"w"==d&&Editor.enableWebFonts&&(K=y);K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+K.select():document.execCommand("selectAll",!1,null)};e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",g.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();u()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);
+var N=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var K=p.value;var q="s"}else if(v.checked){K=x.value;var E=Editor.GOOGLE_FONTS+encodeURIComponent(K).replace(/%20/g,"+");q="g"}else z.checked&&(K=y.value,E=L.value,q="w");var A=E;var B=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==K||0==K.length?(D.querySelector(".dlg_fontName_"+B).style.border="1px solid red",A=!1):"w"!=B||G.test(A)?A=!0:(D.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",A=!1);A&&(u(K,E,q),b.hideDialog())});N.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",t);mxEvent.addListener(x,"keypress",t);mxEvent.addListener(y,"keypress",t);mxEvent.addListener(L,"keypress",t);mxEvent.addListener(p,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(L,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});g.appendChild(N);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);D.appendChild(c);this.container=D};
function AspectDialog(b,f,l,d,u){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:l||[]};f=document.createElement("div");var t=document.createElement("h5");t.style.margin="0 0 10px";mxUtils.write(t,mxResources.get("pages"));f.appendChild(t);l=document.createElement("div");l.className="geAspectDlgList";f.appendChild(l);t=document.createElement("h5");t.style.margin="0 0 10px";mxUtils.write(t,mxResources.get("layers"));f.appendChild(t);t=document.createElement("div");t.className="geAspectDlgList";
f.appendChild(t);this.pagesContainer=l;this.layersContainer=t;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u()});t.className="geBtn";b.editor.cancelFirst&&l.appendChild(t);var D=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(D);D.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||l.appendChild(t);D.setAttribute("disabled","disabled");this.okBtn=D;f.appendChild(l);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -11397,25 +11398,25 @@ c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtil
mxUtils.write(c,mxResources.get("borderWidth")+":");u.appendChild(c);var g=document.createElement("input");g.setAttribute("value",D);g.style.marginLeft="4px";g.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(g);u.appendChild(c);l.appendChild(u);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};t=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
parseInt(e.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(g.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var k=null!=d?d.isCompressed():Editor.compressXml;u=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");u.appendChild(c);var m=document.createElement("input");m.setAttribute("type","checkbox");
k&&(m.setAttribute("checked","checked"),m.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(m);u.appendChild(c);l.appendChild(u);this.init=function(){m.focus()};t=function(){null!=b.fileNode&&k!=m.checked&&(b.fileNode.setAttribute("compressed",m.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){u=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
-c.style.width="120px";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");u.appendChild(c);var q=document.createElement("input");q.setAttribute("type","checkbox");var v=d.isRealtimeEnabled();if(v="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=t;t=function(){prevApply();b.hideDialog();q.checked!=v&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(q.checked,mxUtils.bind(this,
-function(y){b.spinner.stop()}),mxUtils.bind(this,function(y){b.spinner.stop();b.showError(mxResources.get("error"),null!=y&&null!=y.error?y.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(q);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(c);l.appendChild(u)}this.init=null!=this.init?this.init:
+c.style.width="120px";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");u.appendChild(c);var p=document.createElement("input");p.setAttribute("type","checkbox");var v=d.isRealtimeEnabled();if(v="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))p.setAttribute("checked","checked"),p.defaultChecked=!0;prevApply=t;t=function(){prevApply();b.hideDialog();p.checked!=v&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(p.checked,mxUtils.bind(this,
+function(x){b.spinner.stop()}),mxUtils.bind(this,function(x){b.spinner.stop();b.showError(mxResources.get("error"),null!=x&&null!=x.error?x.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){p.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(c);l.appendChild(u)}this.init=null!=this.init?this.init:
function(){};t=mxUtils.button(mxResources.get("apply"),t);t.className="geBtn gePrimaryBtn";u=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","center");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(t);b.editor.cancelFirst||c.appendChild(D);u.appendChild(c);l.appendChild(u);f.appendChild(l);this.container=
-f},ConnectionPointsDialog=function(b,f){function l(){null!=u&&u.destroy()}var d=document.createElement("div");d.style.userSelect="none";var u=null;this.init=function(){function t(E,H){E=new mxCell("",new mxGeometry(E,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");E.vertex=!0;E.cp=!0;return m.addCell(E)}function D(E){E=m.getSelectionCells();m.deleteCells(E)}function c(){var E=parseInt(F.value)||0;E=0>E?0:100<E?100:E;
-F.value=E;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var S=parseInt(G.value)||0,U=parseInt(J.value)||0;E=m.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(E/100,H/100),!1,null,S,U));H=m.getSelectionCell();if(null!=H){S=H.geometry.clone();U=m.view.scale;var Q=m.view.translate;S.x=(E.x-3*U)/U-Q.x;S.y=(E.y-3*U)/U-Q.y;m.model.setGeometry(H,S)}}function e(E){var H=0,S=0,U=q.geometry,Q=mxUtils.format((E.geometry.x+3-U.x)/U.width);E=mxUtils.format((E.geometry.y+3-U.y)/U.height);
-0>Q?(H=Q*U.width,Q=0):1<Q&&(H=(Q-1)*U.width,Q=1);0>E?(S=E*U.height,E=0):1<E&&(S=(E-1)*U.height,E=1);return{x:Q,y:E,dx:parseInt(H),dy:parseInt(S)}}function g(){if(1==m.getSelectionCount()){var E=m.getSelectionCell();E=e(E);F.value=100*E.x;N.value=100*E.y;G.value=E.dx;J.value=E.dy;B.style.visibility=""}else B.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
-mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.autoExtend=!1;m.autoScroll=!1;m.setGridEnabled(!1);m.setEnabled(!0);m.setPanning(!0);m.setConnectable(!1);m.setTooltips(!1);m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;m.maxFitScale=2;k=f.geometry;var q=new mxCell(f.value,new mxGeometry(0,0,k.width,k.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;m.addCell(q);m.dblClick=function(E,H){if(null!=H&&H!=q)m.setSelectionCell(H);else{H=
-mxUtils.convertPoint(m.container,mxEvent.getClientX(E),mxEvent.getClientY(E));mxEvent.consume(E);E=m.view.scale;var S=m.view.translate;m.setSelectionCell(t((H.x-3*E)/E-S.x,(H.y-3*E)/E-S.y))}};u=new mxKeyHandler(m);u.bindKey(46,D);u.bindKey(8,D);m.getRubberband().isForceRubberbandEvent=function(E){return 0==E.evt.button&&(null==E.getCell()||E.getCell()==q)};m.panningHandler.isForcePanningEvent=function(E){return 2==E.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(E){return E==q?!1:
-v.apply(this,arguments)};m.getLinkForCell=function(){return null};var y=m.view.getState(q);k=m.getAllConnectionConstraints(y);for(var A=0;null!=k&&A<k.length;A++){var z=m.getConnectionPoint(y,k[A]);t(z.x-3,z.y-3)}m.fit(8);m.center();A=mxUtils.button("",function(){m.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(A,60);z=mxUtils.button("",function(){m.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(z,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
-"relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.cursor="pointer";L.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(L,60);var M=mxUtils.button("",function(){m.zoomActual();m.center()});M.className="geSprite geSprite-actualsize";M.setAttribute("title",mxResources.get("actualSize"));M.style.position="relative";M.style.outline="none";M.style.border="none";M.style.margin="2px";M.style.cursor="pointer";M.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(M,
-60);var n=mxUtils.button("",D);n.className="geSprite geSprite-delete";n.setAttribute("title",mxResources.get("delete"));n.style.position="relative";n.style.outline="none";n.style.border="none";n.style.margin="2px";n.style.float="right";n.style.cursor="pointer";mxUtils.setOpacity(n,10);k=document.createElement("div");k.appendChild(A);k.appendChild(z);k.appendChild(M);k.appendChild(L);k.appendChild(n);d.appendChild(k);var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min",
-"1");x.setAttribute("value","1");x.style.width="45px";x.style.position="relative";x.style.top=mxClient.IS_FF?"0px":"-4px";x.style.margin="0 4px 0 4px";k.appendChild(x);var K=document.createElement("select");K.style.position="relative";K.style.top=mxClient.IS_FF?"0px":"-4px";z=["left","right","top","bottom"];for(A=0;A<z.length;A++)L=z[A],M=document.createElement("option"),mxUtils.write(M,mxResources.get(L)),M.value=L,K.appendChild(M);k.appendChild(K);A=mxUtils.button(mxResources.get("add"),function(){var E=
-parseInt(x.value);E=1>E?1:100<E?100:E;x.value=E;for(var H=K.value,S=q.geometry,U=[],Q=0;Q<E;Q++){switch(H){case "left":var W=S.x;var V=S.y+(Q+1)*S.height/(E+1);break;case "right":W=S.x+S.width;V=S.y+(Q+1)*S.height/(E+1);break;case "top":W=S.x+(Q+1)*S.width/(E+1);V=S.y;break;case "bottom":W=S.x+(Q+1)*S.width/(E+1),V=S.y+S.height}U.push(t(W-3,V-3))}m.setSelectionCells(U)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(A);var B=document.createElement("div");
-B.style.margin="4px 0px 8px 0px";B.style.whiteSpace="nowrap";B.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));B.appendChild(k);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";B.appendChild(F);mxUtils.write(B,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-B.appendChild(G);mxUtils.write(B,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";B.appendChild(k);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);mxUtils.write(B,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";B.appendChild(J);
-mxUtils.write(B,"pt");d.appendChild(B);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(n,60):mxUtils.setOpacity(n,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(F,"change",c);mxEvent.addListener(N,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(J,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var E=
-m.model.cells,H=[],S=[],U;for(U in E){var Q=E[U];Q.cp&&S.push(e(Q))}S.sort(function(W,V){return W.x!=V.x?W.x-V.x:W.y!=V.y?W.y-V.y:W.dx!=V.dx?W.dx-V.dx:W.dy-V.dy});for(E=0;E<S.length;E++)0<E&&S[E].x==S[E-1].x&&S[E].y==S[E-1].y&&S[E].dx==S[E-1].dx&&S[E].dy==S[E-1].dy||H.push("["+S[E].x+","+S[E].y+",0,"+S[E].dx+","+S[E].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[f]);l();b.hideDialog()});A.className="geBtn gePrimaryBtn";z=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);l();b.hideDialog()});z.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(z),L.appendChild(A)):(L.appendChild(z),L.appendChild(A),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+f},ConnectionPointsDialog=function(b,f){function l(){null!=u&&u.destroy()}var d=document.createElement("div");d.style.userSelect="none";var u=null;this.init=function(){function t(F,I){F=new mxCell("",new mxGeometry(F,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return m.addCell(F)}function D(F){F=m.getSelectionCells();m.deleteCells(F)}function c(){var F=parseInt(B.value)||0;F=0>F?0:100<F?100:F;
+B.value=F;var I=parseInt(M.value)||0;I=0>I?0:100<I?100:I;M.value=I;var R=parseInt(G.value)||0,W=parseInt(H.value)||0;F=m.getConnectionPoint(x,new mxConnectionConstraint(new mxPoint(F/100,I/100),!1,null,R,W));I=m.getSelectionCell();if(null!=I){R=I.geometry.clone();W=m.view.scale;var P=m.view.translate;R.x=(F.x-3*W)/W-P.x;R.y=(F.y-3*W)/W-P.y;m.model.setGeometry(I,R)}}function e(F){var I=0,R=0,W=p.geometry,P=mxUtils.format((F.geometry.x+3-W.x)/W.width);F=mxUtils.format((F.geometry.y+3-W.y)/W.height);
+0>P?(I=P*W.width,P=0):1<P&&(I=(P-1)*W.width,P=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:P,y:F,dx:parseInt(I),dy:parseInt(R)}}function g(){if(1==m.getSelectionCount()){var F=m.getSelectionCell();F=e(F);B.value=100*F.x;M.value=100*F.y;G.value=F.dx;H.value=F.dy;A.style.visibility=""}else A.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
+mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.autoExtend=!1;m.autoScroll=!1;m.setGridEnabled(!1);m.setEnabled(!0);m.setPanning(!0);m.setConnectable(!1);m.setTooltips(!1);m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;m.maxFitScale=2;k=f.geometry;var p=new mxCell(f.value,new mxGeometry(0,0,k.width,k.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");p.vertex=!0;m.addCell(p);m.dblClick=function(F,I){if(null!=I&&I!=p)m.setSelectionCell(I);else{I=
+mxUtils.convertPoint(m.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=m.view.scale;var R=m.view.translate;m.setSelectionCell(t((I.x-3*F)/F-R.x,(I.y-3*F)/F-R.y))}};u=new mxKeyHandler(m);u.bindKey(46,D);u.bindKey(8,D);m.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==p)};m.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(F){return F==p?!1:
+v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(p);k=m.getAllConnectionConstraints(x);for(var z=0;null!=k&&z<k.length;z++){var y=m.getConnectionPoint(x,k[z]);t(y.x-3,y.y-3)}m.fit(8);m.center();z=mxUtils.button("",function(){m.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(z,60);y=mxUtils.button("",function(){m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
+"relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.cursor="pointer";L.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(L,60);var N=mxUtils.button("",function(){m.zoomActual();m.center()});N.className="geSprite geSprite-actualsize";N.setAttribute("title",mxResources.get("actualSize"));N.style.position="relative";N.style.outline="none";N.style.border="none";N.style.margin="2px";N.style.cursor="pointer";N.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(N,
+60);var K=mxUtils.button("",D);K.className="geSprite geSprite-delete";K.setAttribute("title",mxResources.get("delete"));K.style.position="relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.float="right";K.style.cursor="pointer";mxUtils.setOpacity(K,10);k=document.createElement("div");k.appendChild(z);k.appendChild(y);k.appendChild(N);k.appendChild(L);k.appendChild(K);d.appendChild(k);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min",
+"1");q.setAttribute("value","1");q.style.width="45px";q.style.position="relative";q.style.top=mxClient.IS_FF?"0px":"-4px";q.style.margin="0 4px 0 4px";k.appendChild(q);var E=document.createElement("select");E.style.position="relative";E.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(z=0;z<y.length;z++)L=y[z],N=document.createElement("option"),mxUtils.write(N,mxResources.get(L)),N.value=L,E.appendChild(N);k.appendChild(E);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(q.value);F=1>F?1:100<F?100:F;q.value=F;for(var I=E.value,R=p.geometry,W=[],P=0;P<F;P++){switch(I){case "left":var V=R.x;var U=R.y+(P+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(P+1)*R.height/(F+1);break;case "top":V=R.x+(P+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(P+1)*R.width/(F+1),U=R.y+R.height}W.push(t(V-3,U-3))}m.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(z);var A=document.createElement("div");
+A.style.margin="4px 0px 8px 0px";A.style.whiteSpace="nowrap";A.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));A.appendChild(k);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";A.appendChild(B);mxUtils.write(A,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
+A.appendChild(G);mxUtils.write(A,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";A.appendChild(k);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";A.appendChild(M);mxUtils.write(A,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";A.appendChild(H);
+mxUtils.write(A,"pt");d.appendChild(A);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(K,60):mxUtils.setOpacity(K,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(B,"change",c);mxEvent.addListener(M,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(H,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+m.model.cells,I=[],R=[],W;for(W in F){var P=F[W];P.cp&&R.push(e(P))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||I.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[f]);l();b.hideDialog()});z.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[f]);l();b.hideDialog()});y.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(y),L.appendChild(z)):(L.appendChild(y),L.appendChild(z),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11441,111 +11442,111 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(p){p.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(p,C){return"1"!=mxUtils.getValue(p.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"comic","0")||"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(p,
-C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(p,C){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(n){n.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,C){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"comic","0")||"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(n,
+C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(n,C){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
-dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(p){return"orthogonalEdgeStyle"==mxUtils.getValue(p.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
+dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(n){return"orthogonalEdgeStyle"==mxUtils.getValue(n.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(p,C){C=C.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&C.isTableCell(p.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(p,C){C=C.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&C.isTableCell(p.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(p,
-C){p=C.editorUi.editor.graph.getCellStyle(1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null);return"1"==mxUtils.getValue(p,"resizeLastRow","0")},isVisible:function(p,C){C=C.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&C.isTable(p.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(p,C){p=C.editorUi.editor.graph.getCellStyle(1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null);return"1"==mxUtils.getValue(p,"resizeLast",
-"0")},isVisible:function(p,C){C=C.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&C.isTable(p.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(n,C){C=C.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&C.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,C){C=C.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&C.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,
+C){n=C.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,C){C=C.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&C.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,C){n=C.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast",
+"0")},isVisible:function(n,C){C=C.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&C.isTable(n.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(p,C){return C.editorUi.editor.graph.isCellConnectable(0<p.vertices.length&&0==p.edges.length?p.vertices[0]:null)},isVisible:function(p,C){return 0<p.vertices.length&&0==p.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(n,C){return C.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,C){return 0<n.vertices.length&&0==n.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(p,C){return 1==p.vertices.length&&0==p.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(p,C){p=1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null;C=C.editorUi.editor.graph;return null!=p&&(C.isSwimlane(p)||0<C.model.getChildCount(p))},isVisible:function(p,C){return 1==p.vertices.length&&0==p.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(p,C){var I=1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null;C=C.editorUi.editor.graph;return null!=I&&(C.isContainer(I)&&
-"0"!=p.style.collapsible||!C.isContainer(I)&&"1"==p.style.collapsible)},isVisible:function(p,C){return 1==p.vertices.length&&0==p.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(p,C){return 1==p.vertices.length&&0==p.edges.length&&!C.editorUi.editor.graph.isSwimlane(p.vertices[0])&&null==mxUtils.getValue(p.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(p,C){C=C.editorUi.editor.graph.model;return 0<p.vertices.length?C.isVertex(C.getParent(p.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(p,C){p=0<p.vertices.length?
-C.editorUi.editor.graph.getCellGeometry(p.vertices[0]):null;return null!=p&&!p.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(p,C){var I=mxUtils.getValue(p.style,mxConstants.STYLE_FILLCOLOR,null);return C.editorUi.editor.graph.isSwimlane(p.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(p.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(p.style,mxConstants.STYLE_OPACITY,100)||null!=p.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(p,C){return 0<p.vertices.length&&C.editorUi.editor.graph.isContainer(p.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(p){var C=rough.canvas({getContext:function(){return p}});C.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var O=T[P];switch(O.type){case "path":null!=I.stroke&&this._drawToContext(p,O,I);break;case "fillPath":this._drawToContext(p,O,I);break;case "fillSketch":this.fillSketch(p,O,I)}}};C.fillSketch=function(I,T,P){var O=p.state.strokeColor,R=p.state.strokeWidth,Y=p.state.strokeAlpha,da=p.state.dashed,ha=P.fillWeight;
-0>ha&&(ha=P.strokeWidth/2);p.setStrokeAlpha(p.state.fillAlpha);p.setStrokeColor(P.fill||"");p.setStrokeWidth(ha);p.setDashed(!1);this._drawToContext(I,T,P);p.setDashed(da);p.setStrokeWidth(R);p.setStrokeColor(O);p.setStrokeAlpha(Y)};C._drawToContext=function(I,T,P){I.begin();for(var O=0;O<T.ops.length;O++){var R=T.ops[O],Y=R.data;switch(R.op){case "move":I.moveTo(Y[0],Y[1]);break;case "bcurveTo":I.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":I.lineTo(Y[0],Y[1])}}I.end();"fillPath"===
-T.type&&P.filled?I.fill():I.stroke()};return C};(function(){function p(O,R,Y){this.canvas=O;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,p.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,p.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,p.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,p.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,p.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,p.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,p.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,p.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-p.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,p.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,p.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,p.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,p.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,p.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}p.prototype.moveOp="M";p.prototype.lineOp="L";p.prototype.quadOp="Q";p.prototype.curveOp="C";p.prototype.closeOp="Z";p.prototype.getStyle=function(O,R){var Y=1;if(null!=this.shape.state){var da=this.shape.state.cell.id;if(null!=da)for(var ha=0;ha<da.length;ha++)Y=(Y<<5)-Y+da.charCodeAt(ha)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};da=this.rc.getDefaultOptions();Y.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;O=null;(Y.filled=R)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",da.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",da.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",da.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",da.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",da.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",da.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",da.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==R?-1:R;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);Y.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",R);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=Y.fill&&(null!=O||null!=R&&Y.fill==R)?"solid":da.fillStyle);Y.fillStyle=R;return Y};p.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};p.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};p.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};p.prototype.lineTo=function(O,R){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,O,R),this.lastX=O,this.lastY=R)};p.prototype.moveTo=function(O,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,R),this.lastX=O,this.lastY=R,this.firstX=O,this.firstY=R)};p.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};p.prototype.quadTo=function(O,R,Y,da){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,
-R,Y,da),this.lastX=Y,this.lastY=da)};p.prototype.curveTo=function(O,R,Y,da,ha,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,R,Y,da,ha,Z),this.lastX=ha,this.lastY=Z)};p.prototype.arcTo=function(O,R,Y,da,ha,Z,ea){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,O,R,Y,da,ha,Z,ea);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
-aa[va+5]);this.lastX=Z;this.lastY=ea}};p.prototype.rect=function(O,R,Y,da){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,R,Y,da,this.getStyle(!0,!0)))};p.prototype.ellipse=function(O,R,Y,da){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+Y/2,R+da/2,Y,da,this.getStyle(!0,!0)))};p.prototype.roundrect=function(O,R,Y,da,ha,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(O+ha,R),this.lineTo(O+Y-ha,R),this.quadTo(O+Y,R,O+Y,R+Z),this.lineTo(O+Y,R+da-Z),this.quadTo(O+Y,R+da,O+Y-ha,R+da),this.lineTo(O+ha,R+da),this.quadTo(O,R+da,O,R+da-Z),this.lineTo(O,R+Z),this.quadTo(O,R,O+ha,R))};p.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in O)this.nextShape.options[R]=O[R];O.stroke!=mxConstants.NONE&&null!=
-O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};p.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};p.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};p.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};p.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new p(O,Editor.createRoughCanvas(O),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,R,Y,da,ha){null!=O.handJiggle&&O.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var R=O.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==p&&!this.outline){O.save();
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(n,C){return 1==n.vertices.length&&0==n.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,C){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;C=C.editorUi.editor.graph;return null!=n&&(C.isSwimlane(n)||0<C.model.getChildCount(n))},isVisible:function(n,C){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,C){var J=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;C=C.editorUi.editor.graph;return null!=J&&(C.isContainer(J)&&
+"0"!=n.style.collapsible||!C.isContainer(J)&&"1"==n.style.collapsible)},isVisible:function(n,C){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,C){return 1==n.vertices.length&&0==n.edges.length&&!C.editorUi.editor.graph.isSwimlane(n.vertices[0])&&null==mxUtils.getValue(n.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(n,C){C=C.editorUi.editor.graph.model;return 0<n.vertices.length?C.isVertex(C.getParent(n.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(n,C){n=0<n.vertices.length?
+C.editorUi.editor.graph.getCellGeometry(n.vertices[0]):null;return null!=n&&!n.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(n,C){var J=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return C.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||null!=n.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(n,C){return 0<n.vertices.length&&C.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(n){var C=rough.canvas({getContext:function(){return n}});C.draw=function(J){var T=J.sets||[];J=J.options||this.getDefaultOptions();for(var Q=0;Q<T.length;Q++){var O=T[Q];switch(O.type){case "path":null!=J.stroke&&this._drawToContext(n,O,J);break;case "fillPath":this._drawToContext(n,O,J);break;case "fillSketch":this.fillSketch(n,O,J)}}};C.fillSketch=function(J,T,Q){var O=n.state.strokeColor,S=n.state.strokeWidth,Y=n.state.strokeAlpha,da=n.state.dashed,ha=Q.fillWeight;
+0>ha&&(ha=Q.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(Q.fill||"");n.setStrokeWidth(ha);n.setDashed(!1);this._drawToContext(J,T,Q);n.setDashed(da);n.setStrokeWidth(S);n.setStrokeColor(O);n.setStrokeAlpha(Y)};C._drawToContext=function(J,T,Q){J.begin();for(var O=0;O<T.ops.length;O++){var S=T.ops[O],Y=S.data;switch(S.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===
+T.type&&Q.filled?J.fill():J.stroke()};return C};(function(){function n(O,S,Y){this.canvas=O;this.rc=S;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,n.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,n.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,n.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,n.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,n.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(O,S){var Y=1;if(null!=this.shape.state){var da=this.shape.state.cell.id;if(null!=da)for(var ha=0;ha<da.length;ha++)Y=(Y<<5)-Y+da.charCodeAt(ha)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};da=this.rc.getDefaultOptions();Y.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;O=null;(Y.filled=S)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",da.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",da.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",da.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",da.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",da.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",da.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",da.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==S?-1:S;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);Y.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",S);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=Y.fill&&(null!=O||null!=S&&Y.fill==S)?"solid":da.fillStyle);Y.fillStyle=S;return Y};n.prototype.begin=function(){this.passThrough?
+this.originalBegin.apply(this.canvas,arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};n.prototype.lineTo=function(O,S){this.passThrough?this.originalLineTo.apply(this.canvas,
+arguments):(this.addOp(this.lineOp,O,S),this.lastX=O,this.lastY=S)};n.prototype.moveTo=function(O,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,S),this.lastX=O,this.lastY=S,this.firstX=O,this.firstY=S)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(O,S,Y,da){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,
+S,Y,da),this.lastX=Y,this.lastY=da)};n.prototype.curveTo=function(O,S,Y,da,ha,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,S,Y,da,ha,Z),this.lastX=ha,this.lastY=Z)};n.prototype.arcTo=function(O,S,Y,da,ha,Z,ea){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,O,S,Y,da,ha,Z,ea);if(null!=aa)for(var va=0;va<aa.length;va+=6)this.curveTo(aa[va],aa[va+1],aa[va+2],aa[va+3],aa[va+4],
+aa[va+5]);this.lastX=Z;this.lastY=ea}};n.prototype.rect=function(O,S,Y,da){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,S,Y,da,this.getStyle(!0,!0)))};n.prototype.ellipse=function(O,S,Y,da){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+Y/2,S+da/2,Y,da,this.getStyle(!0,!0)))};n.prototype.roundrect=function(O,S,Y,da,ha,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(O+ha,S),this.lineTo(O+Y-ha,S),this.quadTo(O+Y,S,O+Y,S+Z),this.lineTo(O+Y,S+da-Z),this.quadTo(O+Y,S+da,O+Y-ha,S+da),this.lineTo(O+ha,S+da),this.quadTo(O,S+da,O,S+da-Z),this.lineTo(O,S+Z),this.quadTo(O,S,O+ha,S))};n.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in O)this.nextShape.options[S]=O[S];O.stroke!=mxConstants.NONE&&null!=
+O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!0,!0))};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new n(O,Editor.createRoughCanvas(O),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,S,Y,da,ha){null!=O.handJiggle&&O.handJiggle.passThrough||J.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var S=O.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==n&&!this.outline){O.save();
var da=this.fill,ha=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ea=O.setStrokeColor;O.setStrokeColor=function(){};var aa=O.setFillColor;O.setFillColor=function(){};Y||null==da||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;T.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=aa;O.setStrokeColor=ea;this.configurePointerEvents=Z;this.stroke=ha;this.fill=da;O.restore();Y&&null!=da&&(O.addTolerance=function(){})}T.apply(this,arguments);
-O.addTolerance=R};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,R,Y,da,ha,Z){null!=O.handJiggle&&O.handJiggle.constructor==p?(O.handJiggle.passThrough=!0,P.apply(this,arguments),O.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(p){return null==p||0==p.length||"undefined"===typeof pako?p:Graph.arrayBufferToString(pako.deflateRaw(p))};Editor.fastDecompress=function(p){return null==p||0==p.length||"undefined"===typeof pako?
-p:pako.inflateRaw(Graph.stringToArrayBuffer(atob(p)),{to:"string"})};Editor.extractGraphModel=function(p,C,I){if(null!=p&&"undefined"!==typeof pako){var T=p.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var O=0;O<T.length;O++)if("mxgraph"==T[O].getAttribute("class")){P.push(T[O]);break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(p=mxUtils.parseXml(P.xml),p=p.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&
-(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,I),0<T.length&&(p=mxUtils.parseXml(T),p=p.documentElement))))}if(null!=p&&"svg"==p.nodeName)if(T=p.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)p=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==p||C||(P=null,"diagram"==p.nodeName?P=p:"mxfile"==
-p.nodeName&&(T=p.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(p=Editor.parseDiagramNode(P,I)));null==p||"mxGraphModel"==p.nodeName||C&&"mxfile"==p.nodeName||(p=null);return p};Editor.parseDiagramNode=function(p,C){var I=mxUtils.trim(mxUtils.getTextContent(p)),T=null;0<I.length?(p=Graph.decompress(I,null,C),null!=p&&0<p.length&&(T=mxUtils.parseXml(p).documentElement)):(p=mxUtils.getChildNodes(p),0<p.length&&(T=mxUtils.createXmlDocument(),
-T.appendChild(T.importNode(p[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(p){var C=mxUtils.getTextContent(p),I=null;0<C.length?I=Graph.decompress(C):null!=p.firstChild&&(I=mxUtils.getXml(p.firstChild));return I};Editor.extractGraphModelFromPdf=function(p){p=p.substring(p.indexOf(",")+1);p=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p,!0);if("%PDF-1.7"==p.substring(0,8)){var C=p.indexOf("EmbeddedFile");if(-1<C){var I=p.indexOf("stream",C)+9;if(0<p.substring(C,I).indexOf("application#2Fvnd.jgraph.mxfile"))return C=
-p.indexOf("endstream",I-1),pako.inflateRaw(Graph.stringToArrayBuffer(p.substring(I,C)),{to:"string"})}return null}I=null;C="";for(var T=0,P=0,O=[],R=null;P<p.length;){var Y=p.charCodeAt(P);P+=1;10!=Y&&(C+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var da=p.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(da>P){I=p.substring(P,da);break}}10==Y&&("endobj"==C?R=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(R=[],O[C.split(" ")[0]]=R):null!=R&&R.push(C),
-C="")}null==I&&(I=Editor.extractGraphModelFromXref(O));null!=I&&(I=decodeURIComponent(I.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return I};Editor.extractGraphModelFromXref=function(p){var C=p.trailer,I=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=p[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(p=p[C[1]],null!=p&&(p=p.join("\n"),I=p.substring(1,p.length-1))))));return I};Editor.extractParserError=function(p,C){var I=
-null;p=null!=p?p.getElementsByTagName("parsererror"):null;null!=p&&0<p.length&&(I=C||mxResources.get("invalidChars"),C=p[0].getElementsByTagName("div"),0<C.length&&(I=mxUtils.getTextContent(C[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(p,C){null!=p&&(p=null!=p.error?p.error:p,null==p.retry&&(p.retry=C))};Editor.configure=function(p,C){if(null!=p){Editor.config=p;Editor.configVersion=p.version;Menus.prototype.defaultFonts=p.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-p.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=p.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=p.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=p.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=p.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=p.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-p.debug&&(urlParams.test="1");null!=p.templateFile&&(EditorUi.templateFile=p.templateFile);null!=p.styles&&(Array.isArray(p.styles)?Editor.styles=p.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=p.globalVars&&(Editor.globalVars=p.globalVars);null!=p.compressXml&&(Editor.compressXml=p.compressXml);null!=p.includeDiagram&&(Editor.defaultIncludeDiagram=p.includeDiagram);null!=p.simpleLabels&&(Editor.simpleLabels=p.simpleLabels);null!=p.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-p.oneDriveInlinePicker);null!=p.darkColor&&(Editor.darkColor=p.darkColor);null!=p.lightColor&&(Editor.lightColor=p.lightColor);null!=p.settingsName&&(Editor.configurationKey="."+p.settingsName+"-configuration",Editor.settingsKey="."+p.settingsName+"-config",mxSettings.key=Editor.settingsKey);p.customFonts&&(Menus.prototype.defaultFonts=p.customFonts.concat(Menus.prototype.defaultFonts));p.customPresetColors&&(ColorDialog.prototype.presetColors=p.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=p.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=p.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=p.css){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(p.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(I,T)}null!=p.libraries&&(Sidebar.prototype.customEntries=p.libraries);null!=p.enabledLibraries&&(Array.isArray(p.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-p.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=p.defaultLibraries&&(Sidebar.prototype.defaultEntries=p.defaultLibraries);null!=p.defaultCustomLibraries&&(Editor.defaultCustomLibraries=p.defaultCustomLibraries);null!=p.enableCustomLibraries&&(Editor.enableCustomLibraries=p.enableCustomLibraries);null!=p.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=p.defaultVertexStyle);null!=p.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=p.defaultEdgeStyle);
-null!=p.defaultPageVisible&&(Graph.prototype.defaultPageVisible=p.defaultPageVisible);null!=p.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=p.defaultGridEnabled);null!=p.zoomWheel&&(Graph.zoomWheel=p.zoomWheel);null!=p.zoomFactor&&(I=parseFloat(p.zoomFactor),!isNaN(I)&&1<I?Graph.prototype.zoomFactor=I:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=p.gridSteps&&(I=parseInt(p.gridSteps),!isNaN(I)&&0<I?mxGraphView.prototype.gridSteps=I:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=p.pageFormat&&(I=parseInt(p.pageFormat.width),T=parseInt(p.pageFormat.height),!isNaN(I)&&0<I&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,I,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));p.thumbWidth&&(Sidebar.prototype.thumbWidth=p.thumbWidth);p.thumbHeight&&(Sidebar.prototype.thumbHeight=p.thumbHeight);p.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-p.emptyLibraryXml);p.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=p.emptyDiagramXml);p.sidebarWidth&&(EditorUi.prototype.hsplitPosition=p.sidebarWidth);p.sidebarTitles&&(Sidebar.prototype.sidebarTitles=p.sidebarTitles);p.sidebarTitleSize&&(I=parseInt(p.sidebarTitleSize),!isNaN(I)&&0<I?Sidebar.prototype.sidebarTitleSize=I:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));p.fontCss&&("string"===typeof p.fontCss?Editor.configureFontCss(p.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=p.autosaveDelay&&(I=parseInt(p.autosaveDelay),!isNaN(I)&&0<I?DrawioFile.prototype.autosaveDelay=I:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=p.plugins&&!C)for(App.initPluginCallback(),C=0;C<p.plugins.length;C++)mxscript(p.plugins[C]);null!=p.maxImageBytes&&(EditorUi.prototype.maxImageBytes=p.maxImageBytes);null!=p.maxImageSize&&(EditorUi.prototype.maxImageSize=p.maxImageSize);null!=p.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=p.shareCursorPosition);
-null!=p.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=p.showRemoteCursors)}};Editor.configureFontCss=function(p){if(null!=p){Editor.prototype.fontCss=p;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(p));C.parentNode.insertBefore(I,C);p=p.split("url(");for(I=1;I<p.length;I++){var T=p[I].indexOf(")");T=Editor.trimCssUrl(p[I].substring(0,T));var P=
-document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");C.parentNode.insertBefore(P,C)}}}};Editor.trimCssUrl=function(p){return p.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(p){p=null!=
-p?p:Editor.GUID_LENGTH;for(var C=[],I=0;I<p;I++)C.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return C.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(p){p=null!=p&&"mxlibrary"!=p.nodeName?this.extractGraphModel(p):
-null;if(null!=p){var C=Editor.extractParserError(p,mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[p],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==p.nodeName){C=p.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),
-T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==p.getAttribute("math");C=p.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==p.getAttribute("shadow"),!1);if(C=p.getAttribute("extFonts"))try{for(C=C.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<C.length;I++)this.graph.addExtFont(C[I].name,C[I].url)}catch(P){console.log("ExtFonts format error: "+
-P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(p,C){p=null!=p?p:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
-C);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(p){try{var C=mxUtils.parseXml(p).documentElement.getAttribute("content");if(null!=C&&(null!=C&&"<"!=C.charAt(0)&&"%"!=
-C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(cont,C))),null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C)),null!=C&&0<C.length)){var I=mxUtils.parseXml(C).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(p,C,I){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+O.addTolerance=S};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,S,Y,da,ha,Z){null!=O.handJiggle&&O.handJiggle.constructor==n?(O.handJiggle.passThrough=!0,Q.apply(this,arguments),O.handJiggle.passThrough=!1):Q.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?
+n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};Editor.extractGraphModel=function(n,C,J){if(null!=n&&"undefined"!==typeof pako){var T=n.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=T&&0<T.length)for(var O=0;O<T.length;O++)if("mxgraph"==T[O].getAttribute("class")){Q.push(T[O]);break}0<Q.length&&(T=Q[0].getAttribute("data-mxgraph"),null!=T?(Q=JSON.parse(T),null!=Q&&null!=Q.xml&&(n=mxUtils.parseXml(Q.xml),n=n.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&
+(T=mxUtils.getTextContent(Q[0]),T=Graph.decompress(T,null,J),0<T.length&&(n=mxUtils.parseXml(T),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(T=n.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)n=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||C||(Q=null,"diagram"==n.nodeName?Q=n:"mxfile"==
+n.nodeName&&(T=n.getElementsByTagName("diagram"),0<T.length&&(Q=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=Q&&(n=Editor.parseDiagramNode(Q,J)));null==n||"mxGraphModel"==n.nodeName||C&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,C){var J=mxUtils.trim(mxUtils.getTextContent(n)),T=null;0<J.length?(n=Graph.decompress(J,null,C),null!=n&&0<n.length&&(T=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(T=mxUtils.createXmlDocument(),
+T.appendChild(T.importNode(n[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(n){var C=mxUtils.getTextContent(n),J=null;0<C.length?J=Graph.decompress(C):null!=n.firstChild&&(J=mxUtils.getXml(n.firstChild));return J};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var C=n.indexOf("EmbeddedFile");if(-1<C){var J=n.indexOf("stream",C)+9;if(0<n.substring(C,J).indexOf("application#2Fvnd.jgraph.mxfile"))return C=
+n.indexOf("endstream",J-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(J,C)),{to:"string"})}return null}J=null;C="";for(var T=0,Q=0,O=[],S=null;Q<n.length;){var Y=n.charCodeAt(Q);Q+=1;10!=Y&&(C+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var da=n.indexOf("%3C%2Fmxfile%3E)",Q)+15;Q-=9;if(da>Q){J=n.substring(Q,da);break}}10==Y&&("endobj"==C?S=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(S=[],O[C.split(" ")[0]]=S):null!=S&&S.push(C),
+C="")}null==J&&(J=Editor.extractGraphModelFromXref(O));null!=J&&(J=decodeURIComponent(J.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return J};Editor.extractGraphModelFromXref=function(n){var C=n.trailer,J=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=n[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(n=n[C[1]],null!=n&&(n=n.join("\n"),J=n.substring(1,n.length-1))))));return J};Editor.extractParserError=function(n,C){var J=
+null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(J=C||mxResources.get("invalidChars"),C=n[0].getElementsByTagName("div"),0<C.length&&(J=mxUtils.getTextContent(C[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(n,C){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=C))};Editor.configure=function(n,C){if(null!=n){Editor.config=n;Editor.configVersion=n.version;Menus.prototype.defaultFonts=n.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+n.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=n.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=n.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=n.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=n.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=n.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+n.debug&&(urlParams.test="1");null!=n.templateFile&&(EditorUi.templateFile=n.templateFile);null!=n.styles&&(Array.isArray(n.styles)?Editor.styles=n.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=n.globalVars&&(Editor.globalVars=n.globalVars);null!=n.compressXml&&(Editor.compressXml=n.compressXml);null!=n.includeDiagram&&(Editor.defaultIncludeDiagram=n.includeDiagram);null!=n.simpleLabels&&(Editor.simpleLabels=n.simpleLabels);null!=n.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+n.oneDriveInlinePicker);null!=n.darkColor&&(Editor.darkColor=n.darkColor);null!=n.lightColor&&(Editor.lightColor=n.lightColor);null!=n.settingsName&&(Editor.configurationKey="."+n.settingsName+"-configuration",Editor.settingsKey="."+n.settingsName+"-config",mxSettings.key=Editor.settingsKey);n.customFonts&&(Menus.prototype.defaultFonts=n.customFonts.concat(Menus.prototype.defaultFonts));n.customPresetColors&&(ColorDialog.prototype.presetColors=n.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(n.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(J,T)}null!=n.libraries&&(Sidebar.prototype.customEntries=n.libraries);null!=n.enabledLibraries&&(Array.isArray(n.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+n.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=n.defaultLibraries&&(Sidebar.prototype.defaultEntries=n.defaultLibraries);null!=n.defaultCustomLibraries&&(Editor.defaultCustomLibraries=n.defaultCustomLibraries);null!=n.enableCustomLibraries&&(Editor.enableCustomLibraries=n.enableCustomLibraries);null!=n.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=n.defaultVertexStyle);null!=n.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=n.defaultEdgeStyle);
+null!=n.defaultPageVisible&&(Graph.prototype.defaultPageVisible=n.defaultPageVisible);null!=n.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=n.defaultGridEnabled);null!=n.zoomWheel&&(Graph.zoomWheel=n.zoomWheel);null!=n.zoomFactor&&(J=parseFloat(n.zoomFactor),!isNaN(J)&&1<J?Graph.prototype.zoomFactor=J:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.gridSteps&&(J=parseInt(n.gridSteps),!isNaN(J)&&0<J?mxGraphView.prototype.gridSteps=J:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=n.pageFormat&&(J=parseInt(n.pageFormat.width),T=parseInt(n.pageFormat.height),!isNaN(J)&&0<J&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,J,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+n.emptyLibraryXml);n.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=n.emptyDiagramXml);n.sidebarWidth&&(EditorUi.prototype.hsplitPosition=n.sidebarWidth);n.sidebarTitles&&(Sidebar.prototype.sidebarTitles=n.sidebarTitles);n.sidebarTitleSize&&(J=parseInt(n.sidebarTitleSize),!isNaN(J)&&0<J?Sidebar.prototype.sidebarTitleSize=J:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));n.fontCss&&("string"===typeof n.fontCss?Editor.configureFontCss(n.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=n.autosaveDelay&&(J=parseInt(n.autosaveDelay),!isNaN(J)&&0<J?DrawioFile.prototype.autosaveDelay=J:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=n.plugins&&!C)for(App.initPluginCallback(),C=0;C<n.plugins.length;C++)mxscript(n.plugins[C]);null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);
+null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(n));C.parentNode.insertBefore(J,C);n=n.split("url(");for(J=1;J<n.length;J++){var T=n[J].indexOf(")");T=Editor.trimCssUrl(n[J].substring(0,T));var Q=
+document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",T);Q.setAttribute("as","font");Q.setAttribute("crossorigin","");C.parentNode.insertBefore(Q,C)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=
+n?n:Editor.GUID_LENGTH;for(var C=[],J=0;J<n;J++)C.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return C.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):
+null;if(null!=n){var C=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==n.nodeName){C=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(J=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=J&&(T=new mxCodec(J.ownerDocument),
+T.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var T=new mxCodec(J.ownerDocument);T.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");C=n.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(C=n.getAttribute("extFonts"))try{for(C=C.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}}),J=0;J<C.length;J++)this.graph.addExtFont(C[J].name,C[J].url)}catch(Q){console.log("ExtFonts format error: "+
+Q.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,C){n=null!=n?n:!0;var J=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+C);null!=T&&J.setAttribute("backgroundImage",JSON.stringify(T));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(Q){return Q.name+"^"+Q.url}),J.setAttribute("extFonts",T.join("|")));return J};Editor.prototype.isDataSvg=function(n){try{var C=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=C&&(null!=C&&"<"!=C.charAt(0)&&"%"!=
+C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(cont,C))),null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C)),null!=C&&0<C.length)){var J=mxUtils.parseXml(C).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(n,C,J){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
-!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(p,C){if("undefined"===typeof window.MathJax){p=(null!=p?p:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
-[];Editor.doMathJaxRender=function(R){window.setTimeout(function(){"hidden"!=R.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,R])},0)};var I=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";C=null!=C?C:{"HTML-CSS":{availableFonts:[I],imageFont:null},SVG:{font:I,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(C);
-MathJax.Hub.Register.StartupHook("Begin",function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])})}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,
-Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};I=document.getElementsByTagName("script");if(null!=I&&0<I.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",p);I[0].parentNode.appendChild(P)}try{if(mxClient.IS_GC||mxClient.IS_SF){var O=document.createElement("style");O.type="text/css";O.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(O)}}catch(R){}}};
-Editor.prototype.csvToArray=function(p){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(p))return null;var C=[];p.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(I,T,P,O){void 0!==T?C.push(T.replace(/\\'/g,"'")):void 0!==P?C.push(P.replace(/\\"/g,
-'"')):void 0!==O&&C.push(O);return""});/,\s*$/.test(p)&&C.push("");return C};Editor.prototype.isCorsEnabledForUrl=function(p){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||p.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(p)||"https://raw.githubusercontent.com/"===p.substring(0,34)||"https://fonts.googleapis.com/"===
-p.substring(0,29)||"https://fonts.gstatic.com/"===p.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var p=new mxUrlConverter;p.updateBaseUrl();var C=p.convert,I=this;p.convert=function(T){if(null!=T){var P="http://"==T.substring(0,7)||"https://"==T.substring(0,8);P&&!navigator.onLine?T=Editor.svgBrokenImage.src:!P||T.substring(0,p.baseUrl.length)==p.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=C.apply(this,
-arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return p};Editor.createSvgDataUri=function(p){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(p)))};Editor.prototype.convertImageToDataUri=function(p,C){try{var I=!0,T=window.setTimeout(mxUtils.bind(this,function(){I=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(p))mxUtils.get(p,mxUtils.bind(this,function(O){window.clearTimeout(T);I&&C(Editor.createSvgDataUri(O.getText()))}),function(){window.clearTimeout(T);
-I&&C(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(T);if(I)try{var O=document.createElement("canvas"),R=O.getContext("2d");O.height=P.height;O.width=P.width;R.drawImage(P,0,0);C(O.toDataURL())}catch(Y){C(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(T);I&&C(Editor.svgBrokenImage.src)};P.src=p}}catch(O){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(p,C,I,
-T){null==T&&(T=this.createImageUrlConverter());var P=0,O=I||{};I=mxUtils.bind(this,function(R,Y){R=p.getElementsByTagName(R);for(var da=0;da<R.length;da++)mxUtils.bind(this,function(ha){try{if(null!=ha){var Z=T.convert(ha.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var ea=O[Z];null==ea?(P++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(O[Z]=aa,ha.setAttribute(Y,aa));P--;0==P&&C(p)})):ha.setAttribute(Y,ea)}else null!=Z&&ha.setAttribute(Y,Z)}}catch(aa){}})(R[da])});I("image","xlink:href");
-I("img","src");0==P&&C(p)};Editor.base64Encode=function(p){for(var C="",I=0,T=p.length,P,O,R;I<T;){P=p.charCodeAt(I++)&255;if(I==T){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);C+="==";break}O=p.charCodeAt(I++);if(I==T){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(O&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);C+="=";break}R=p.charCodeAt(I++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(O&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(R&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return C};
-Editor.prototype.loadUrl=function(p,C,I,T,P,O,R,Y){try{var da=!R&&(T||/(\.png)($|\?)/i.test(p)||/(\.jpe?g)($|\?)/i.test(p)||/(\.gif)($|\?)/i.test(p)||/(\.pdf)($|\?)/i.test(p));P=null!=P?P:!0;var ha=mxUtils.bind(this,function(){mxUtils.get(p,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=C){var ea=Z.getText();if(da){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
-ea=Array(Z.length);for(var aa=0;aa<Z.length;aa++)ea[aa]=String.fromCharCode(Z[aa]);ea=ea.join("")}O=null!=O?O:"data:image/png;base64,";ea=O+Editor.base64Encode(ea)}C(ea)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):I({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},da,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:ha})},Y)});ha()}catch(Z){null!=I&&I(Z)}};
-Editor.prototype.absoluteCssFonts=function(p){var C=null;if(null!=p){var I=p.split("url(");if(0<I.length){C=[I[0]];p=window.location.pathname;var T=null!=p?p.lastIndexOf("/"):-1;0<=T&&(p=p.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var O=1;O<I.length;O++)if(T=I[O].indexOf(")"),0<T){var R=Editor.trimCssUrl(I[O].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=P?P+R:window.location.protocol+"//"+window.location.hostname+
-("/"==R.charAt(0)?"":p)+R);C.push('url("'+R+'"'+I[O].substring(T))}else C.push(I[O])}else C=[p]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(p,C,I){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+encodeURIComponent(C));I(p,C)};Editor.prototype.embedCssFonts=function(p,C){var I=p.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var da=[I[0]],ha=1;ha<I.length;ha++){var Z=I[ha].indexOf(")");
-da.push('url("');da.push(this.cachedFonts[Editor.trimCssUrl(I[ha].substring(0,Z))]);da.push('"'+I[ha].substring(Z))}C(da.join(""))}});if(0<I.length){for(p=1;p<I.length;p++){var O=I[p].indexOf(")"),R=null,Y=I[p].indexOf("format(",O);0<Y&&(R=Editor.trimCssUrl(I[p].substring(Y+7,I[p].indexOf(")",Y))));mxUtils.bind(this,function(da){if(null==this.cachedFonts[da]){this.cachedFonts[da]=da;T++;var ha="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(da))ha="image/svg+xml";else if("otf"==R||"embedded-opentype"==
-R||/(\.otf)($|\?)/i.test(da))ha="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(da))ha="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(da))ha="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(da))ha="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(da))ha="application/font-sfnt";this.mapFontUrl(ha,da,mxUtils.bind(this,function(Z,ea){this.loadUrl(ea,mxUtils.bind(this,function(aa){this.cachedFonts[da]=aa;T--;P()}),mxUtils.bind(this,
-function(aa){T--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[p].substring(0,O)),R)}P()}else C(p)};Editor.prototype.loadFonts=function(p){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss=C;null!=p&&p()})):null!=p&&p()};Editor.prototype.createGoogleFontCache=function(){var p={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(p[C]=Graph.fontMapping[C]);return p};Editor.prototype.embedExtFonts=
-function(p){var C=this.graph.getCustomFonts();if(0<C.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),p)}),O=0;O<C.length;O++)mxUtils.bind(this,function(R,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(da){this.cachedGoogleFonts[Y]=da;I.push(da+"\n");T--;P()}),mxUtils.bind(this,function(da){T--;I.push("@import url("+
-Y+");\n");P()}))):I.push(this.cachedGoogleFonts[Y]+"\n"):I.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(C[O].name,C[O].url);P()}else p()};Editor.prototype.addMathCss=function(p){p=p.getElementsByTagName("defs");if(null!=p&&0<p.length)for(var C=document.getElementsByTagName("style"),I=0;I<C.length;I++){var T=mxUtils.getTextContent(C[I]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&p[0].appendChild(C[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(p,C){C=null!=
-C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var I=p.getElementsByTagName("defs"),T=p.ownerDocument;0==I.length?(I=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=p.firstChild?p.insertBefore(I,p.firstChild):p.appendChild(I)):I=I[0];p=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");p.setAttribute("type","text/css");mxUtils.setTextContent(p,C);I.appendChild(p)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(p,C,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/p,T/C))};Editor.prototype.exportToCanvas=function(p,C,I,T,P,O,R,Y,da,ha,Z,ea,aa,va,la,Aa,Ba,ua){try{O=null!=O?O:!0;R=null!=R?R:!0;ea=null!=ea?ea:this.graph;aa=null!=aa?aa:0;var Da=da?null:ea.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=T);null==Da&&0==da&&(Da=Aa?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(ea.getSvg(null,null,aa,va,null,R,null,null,null,ha,null,Aa,Ba,ua),mxUtils.bind(this,function(Fa){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var Ia=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ka,0,0);p(Ea,Fa)},0):(za.drawImage(Ka,0,0),p(Ea,Fa))},Ea=document.createElement("canvas"),Ca=parseInt(Fa.getAttribute("width")),Ma=parseInt(Fa.getAttribute("height"));Y=null!=Y?Y:1;null!=C&&(Y=O?Math.min(1,Math.min(3*C/(4*Ma),C/Ca)):C/Ca);Y=this.getMaxCanvasScale(Ca,
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(n,C){if("undefined"===typeof window.MathJax){n=(null!=n?n:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
+[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var J=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";C=null!=C?C:{"HTML-CSS":{availableFonts:[J],imageFont:null},SVG:{font:J,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(C);
+MathJax.Hub.Register.StartupHook("Begin",function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])})}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,
+Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};J=document.getElementsByTagName("script");if(null!=J&&0<J.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);J[0].parentNode.appendChild(Q)}try{if(mxClient.IS_GC||mxClient.IS_SF){var O=document.createElement("style");O.type="text/css";O.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(O)}}catch(S){}}};
+Editor.prototype.csvToArray=function(n){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(n))return null;var C=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(J,T,Q,O){void 0!==T?C.push(T.replace(/\\'/g,"'")):void 0!==Q?C.push(Q.replace(/\\"/g,
+'"')):void 0!==O&&C.push(O);return""});/,\s*$/.test(n)&&C.push("");return C};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===
+n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var C=n.convert,J=this;n.convert=function(T){if(null!=T){var Q="http://"==T.substring(0,7)||"https://"==T.substring(0,8);Q&&!navigator.onLine?T=Editor.svgBrokenImage.src:!Q||T.substring(0,n.baseUrl.length)==n.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=C.apply(this,
+arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,C){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(O){window.clearTimeout(T);J&&C(Editor.createSvgDataUri(O.getText()))}),function(){window.clearTimeout(T);
+J&&C(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(T);if(J)try{var O=document.createElement("canvas"),S=O.getContext("2d");O.height=Q.height;O.width=Q.width;S.drawImage(Q,0,0);C(O.toDataURL())}catch(Y){C(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(T);J&&C(Editor.svgBrokenImage.src)};Q.src=n}}catch(O){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,C,J,
+T){null==T&&(T=this.createImageUrlConverter());var Q=0,O=J||{};J=mxUtils.bind(this,function(S,Y){S=n.getElementsByTagName(S);for(var da=0;da<S.length;da++)mxUtils.bind(this,function(ha){try{if(null!=ha){var Z=T.convert(ha.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var ea=O[Z];null==ea?(Q++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(O[Z]=aa,ha.setAttribute(Y,aa));Q--;0==Q&&C(n)})):ha.setAttribute(Y,ea)}else null!=Z&&ha.setAttribute(Y,Z)}}catch(aa){}})(S[da])});J("image","xlink:href");
+J("img","src");0==Q&&C(n)};Editor.base64Encode=function(n){for(var C="",J=0,T=n.length,Q,O,S;J<T;){Q=n.charCodeAt(J++)&255;if(J==T){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4);C+="==";break}O=n.charCodeAt(J++);if(J==T){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
+3)<<4|(O&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);C+="=";break}S=n.charCodeAt(J++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(O&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(S&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return C};
+Editor.prototype.loadUrl=function(n,C,J,T,Q,O,S,Y){try{var da=!S&&(T||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));Q=null!=Q?Q:!0;var ha=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=C){var ea=Z.getText();if(da){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+ea=Array(Z.length);for(var aa=0;aa<Z.length;aa++)ea[aa]=String.fromCharCode(Z[aa]);ea=ea.join("")}O=null!=O?O:"data:image/png;base64,";ea=O+Editor.base64Encode(ea)}C(ea)}}else null!=J&&(0==Z.getStatus()?J({message:mxResources.get("accessDenied")},Z):J({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=J&&J({message:mxResources.get("error")+" "+Z.getStatus()})},da,this.timeout,function(){Q&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:ha})},Y)});ha()}catch(Z){null!=J&&J(Z)}};
+Editor.prototype.absoluteCssFonts=function(n){var C=null;if(null!=n){var J=n.split("url(");if(0<J.length){C=[J[0]];n=window.location.pathname;var T=null!=n?n.lastIndexOf("/"):-1;0<=T&&(n=n.substring(0,T+1));T=document.getElementsByTagName("base");var Q=null;null!=T&&0<T.length&&(Q=T[0].getAttribute("href"));for(var O=1;O<J.length;O++)if(T=J[O].indexOf(")"),0<T){var S=Editor.trimCssUrl(J[O].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=Q?Q+S:window.location.protocol+"//"+window.location.hostname+
+("/"==S.charAt(0)?"":n)+S);C.push('url("'+S+'"'+J[O].substring(T))}else C.push(J[O])}else C=[n]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(n,C,J){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+encodeURIComponent(C));J(n,C)};Editor.prototype.embedCssFonts=function(n,C){var J=n.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==T){for(var da=[J[0]],ha=1;ha<J.length;ha++){var Z=J[ha].indexOf(")");
+da.push('url("');da.push(this.cachedFonts[Editor.trimCssUrl(J[ha].substring(0,Z))]);da.push('"'+J[ha].substring(Z))}C(da.join(""))}});if(0<J.length){for(n=1;n<J.length;n++){var O=J[n].indexOf(")"),S=null,Y=J[n].indexOf("format(",O);0<Y&&(S=Editor.trimCssUrl(J[n].substring(Y+7,J[n].indexOf(")",Y))));mxUtils.bind(this,function(da){if(null==this.cachedFonts[da]){this.cachedFonts[da]=da;T++;var ha="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(da))ha="image/svg+xml";else if("otf"==S||"embedded-opentype"==
+S||/(\.otf)($|\?)/i.test(da))ha="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(da))ha="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(da))ha="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(da))ha="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(da))ha="application/font-sfnt";this.mapFontUrl(ha,da,mxUtils.bind(this,function(Z,ea){this.loadUrl(ea,mxUtils.bind(this,function(aa){this.cachedFonts[da]=aa;T--;Q()}),mxUtils.bind(this,
+function(aa){T--;Q()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[n].substring(0,O)),S)}Q()}else C(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss=C;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(n[C]=Graph.fontMapping[C]);return n};Editor.prototype.embedExtFonts=
+function(n){var C=this.graph.getCustomFonts();if(0<C.length){var J=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(J.join(""),n)}),O=0;O<C.length;O++)mxUtils.bind(this,function(S,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(da){this.cachedGoogleFonts[Y]=da;J.push(da+"\n");T--;Q()}),mxUtils.bind(this,function(da){T--;J.push("@import url("+
+Y+");\n");Q()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(C[O].name,C[O].url);Q()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var C=document.getElementsByTagName("style"),J=0;J<C.length;J++){var T=mxUtils.getTextContent(C[J]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&n[0].appendChild(C[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,C){C=null!=
+C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var J=n.getElementsByTagName("defs"),T=n.ownerDocument;0==J.length?(J=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=n.firstChild?n.insertBefore(J,n.firstChild):n.appendChild(J)):J=J[0];n=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,C);J.appendChild(n)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,C,J){var T=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(T/n,T/C))};Editor.prototype.exportToCanvas=function(n,C,J,T,Q,O,S,Y,da,ha,Z,ea,aa,va,la,Aa,Ba,ua){try{O=null!=O?O:!0;S=null!=S?S:!0;ea=null!=ea?ea:this.graph;aa=null!=aa?aa:0;var Da=da?null:ea.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=T);null==Da&&0==da&&(Da=Aa?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(ea.getSvg(null,null,aa,va,null,S,null,null,null,ha,null,Aa,Ba,ua),mxUtils.bind(this,function(Fa){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var Ia=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ka,0,0);n(Ea,Fa)},0):(za.drawImage(Ka,0,0),n(Ea,Fa))},Ea=document.createElement("canvas"),Ca=parseInt(Fa.getAttribute("width")),Ma=parseInt(Fa.getAttribute("height"));Y=null!=Y?Y:1;null!=C&&(Y=O?Math.min(1,Math.min(3*C/(4*Ma),C/Ca)):C/Ca);Y=this.getMaxCanvasScale(Ca,
Ma,Y);Ca=Math.ceil(Y*Ca);Ma=Math.ceil(Y*Ma);Ea.setAttribute("width",Ca);Ea.setAttribute("height",Ma);var za=Ea.getContext("2d");null!=Da&&(za.beginPath(),za.rect(0,0,Ca,Ma),za.fillStyle=Da,za.fill());1!=Y&&za.scale(Y,Y);if(la){var ta=ea.view,ka=ta.scale;ta.scale=1;var pa=btoa(unescape(encodeURIComponent(ta.createSvgGrid(ta.gridColor))));ta.scale=ka;pa="data:image/svg+xml;base64,"+pa;var sa=ea.gridSize*ta.gridSteps*Y,ya=ea.getGraphBounds(),wa=ta.translate.x*ka,ra=ta.translate.y*ka,xa=wa+(ya.x-wa)/
-ka-aa,fa=ra+(ya.y-ra)/ka-aa,ca=new Image;ca.onload=function(){try{for(var ba=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),ja=-Math.round(sa-mxUtils.mod((ra-fa)*Y,sa));ba<Ca;ba+=sa)for(var ia=ja;ia<Ma;ia+=sa)za.drawImage(ca,ba/Y,ia/Y);Ia()}catch(ma){null!=P&&P(ma)}};ca.onerror=function(ba){null!=P&&P(ba)};ca.src=pa}else Ia()}catch(ba){null!=P&&P(ba)}});Ka.onerror=function(Ia){null!=P&&P(Ia)};ha&&this.graph.addSvgShadow(Fa);this.graph.mathEnabled&&this.addMathCss(Fa);var Oa=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(Fa,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Fa))}catch(Ia){null!=P&&P(Ia)}});this.embedExtFonts(mxUtils.bind(this,function(Ia){try{null!=Ia&&this.addFontCss(Fa,Ia),this.loadFonts(Oa)}catch(Ea){null!=P&&P(Ea)}}))}catch(Ia){null!=P&&P(Ia)}}),I,Z)}catch(Fa){null!=P&&P(Fa)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var t=u,D=0;8>D;D++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[u]=t;Editor.updateCRC=function(p,C,I,T){for(var P=
-0;P<T;P++)p=Editor.crcTable[(p^C.charCodeAt(I+P))&255]^p>>>8;return p};Editor.crc32=function(p){for(var C=-1,I=0;I<p.length;I++)C=C>>>8^Editor.crcTable[(C^p.charCodeAt(I))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(p,C,I,T,P){function O(Z,ea){var aa=da;da+=ea;return Z.substring(aa,da)}function R(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}p=p.substring(p.indexOf(",")+
-1);p=window.atob?atob(p):Base64.decode(p,!0);var da=0;if(O(p,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(O(p,4),"IHDR"!=O(p,4))null!=P&&P();else{O(p,17);P=p.substring(0,da);do{var ha=R(p);if("IDAT"==O(p,4)){P=p.substring(0,da-8);"pHYs"==C&&"dpi"==I?(I=Math.round(T/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==C?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,C,0,4);T=Editor.updateCRC(T,I,0,I.length);P+=Y(I.length)+
-C+I+Y(T^4294967295);P+=p.substring(da-8,p.length);break}P+=p.substring(da-8,da-4+ha);O(p,ha);O(p,4)}while(ha);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(p,C){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(p,C){var I=null;null!=p.editor.graph.getModel().getParent(C)?I=C.getId():null!=p.currentPage&&(I=p.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var k=Format.prototype.refresh;
-Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?k.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var p=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=p&&p.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(p){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(p){p=m.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,I=C.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return I.shadowVisible},function(P){var O=new ChangePageSetup(C);O.ignoreColor=!0;O.ignoreImage=!0;O.shadowVisible=P;I.model.execute(O)},{install:function(P){this.listener=function(){P(I.shadowVisible)};C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||
-(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));p.appendChild(T)}return p};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(p){p=q.apply(this,arguments);var C=this.editorUi,I=C.editor.graph;if(I.isEnabled()){var T=C.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var P=this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(R){C.editor.setAutosave(R);C.editor.autosave&&
-T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});p.appendChild(P)}}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(R){C.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=
-function(){R(I.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});P.style.paddingTop="5px";p.appendChild(P);var O=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");O.style.position="relative";O.style.marginLeft="6px";O.style.top="2px";P.appendChild(O)}return p};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+ka-aa,fa=ra+(ya.y-ra)/ka-aa,ca=new Image;ca.onload=function(){try{for(var ba=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),ja=-Math.round(sa-mxUtils.mod((ra-fa)*Y,sa));ba<Ca;ba+=sa)for(var ia=ja;ia<Ma;ia+=sa)za.drawImage(ca,ba/Y,ia/Y);Ia()}catch(ma){null!=Q&&Q(ma)}};ca.onerror=function(ba){null!=Q&&Q(ba)};ca.src=pa}else Ia()}catch(ba){null!=Q&&Q(ba)}});Ka.onerror=function(Ia){null!=Q&&Q(Ia)};ha&&this.graph.addSvgShadow(Fa);this.graph.mathEnabled&&this.addMathCss(Fa);var Oa=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(Fa,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Fa))}catch(Ia){null!=Q&&Q(Ia)}});this.embedExtFonts(mxUtils.bind(this,function(Ia){try{null!=Ia&&this.addFontCss(Fa,Ia),this.loadFonts(Oa)}catch(Ea){null!=Q&&Q(Ea)}}))}catch(Ia){null!=Q&&Q(Ia)}}),J,Z)}catch(Fa){null!=Q&&Q(Fa)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var t=u,D=0;8>D;D++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[u]=t;Editor.updateCRC=function(n,C,J,T){for(var Q=
+0;Q<T;Q++)n=Editor.crcTable[(n^C.charCodeAt(J+Q))&255]^n>>>8;return n};Editor.crc32=function(n){for(var C=-1,J=0;J<n.length;J++)C=C>>>8^Editor.crcTable[(C^n.charCodeAt(J))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(n,C,J,T,Q){function O(Z,ea){var aa=da;da+=ea;return Z.substring(aa,da)}function S(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}n=n.substring(n.indexOf(",")+
+1);n=window.atob?atob(n):Base64.decode(n,!0);var da=0;if(O(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=Q&&Q();else if(O(n,4),"IHDR"!=O(n,4))null!=Q&&Q();else{O(n,17);Q=n.substring(0,da);do{var ha=S(n);if("IDAT"==O(n,4)){Q=n.substring(0,da-8);"pHYs"==C&&"dpi"==J?(J=Math.round(T/.0254),J=Y(J)+Y(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==C?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,C,0,4);T=Editor.updateCRC(T,J,0,J.length);Q+=Y(J.length)+
+C+J+Y(T^4294967295);Q+=n.substring(da-8,n.length);break}Q+=n.substring(da-8,da-4+ha);O(n,ha);O(n,4)}while(ha);return"data:image/png;base64,"+(window.btoa?btoa(Q):Base64.encode(Q,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,C){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,C){var J=null;null!=n.editor.graph.getModel().getParent(C)?J=C.getId():null!=n.currentPage&&(J=n.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var k=Format.prototype.refresh;
+Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?k.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var n=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=n&&n.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(n){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(n){n=m.apply(this,arguments);
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,J=C.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(Q){var O=new ChangePageSetup(C);O.ignoreColor=!0;O.ignoreImage=!0;O.shadowVisible=Q;J.model.execute(O)},{install:function(Q){this.listener=function(){Q(J.shadowVisible)};C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||
+(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));n.appendChild(T)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var C=this.editorUi,J=C.editor.graph;if(J.isEnabled()){var T=C.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var Q=this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(S){C.editor.setAutosave(S);C.editor.autosave&&
+T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});n.appendChild(Q)}}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){Q=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(S){C.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(J.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Q.style.paddingTop="5px";n.appendChild(Q);var O=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");O.style.position="relative";O.style.marginLeft="6px";O.style.top="2px";Q.appendChild(O)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
@@ -11568,93 +11569,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(p,C,I){if(null!=C){var T=function(O){if(null!=O)if(I)for(var R=0;R<O.length;R++)C[O[R].name]=O[R];else for(var Y in C){var da=!1;for(R=0;R<O.length;R++)if(O[R].name==Y&&O[R].type==C[Y].type){da=!0;break}da||delete C[Y]}},P=this.editorUi.editor.graph.view.getState(p);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),T(P.shape.customProperties));p=p.getAttribute("customProperties");if(null!=p)try{T(JSON.parse(p))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var p=this.editorUi.getSelectionState();"image"!=p.style.shape&&!p.containsLabel&&0<p.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var C=
-{},I=p.vertices,T=p.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],C,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],C,0==I.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,p))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(p){this.addActions(p,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(p,C,I){function T(za,ta,ka,pa){ea.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ra=ka.parentRow.nextSibling;ra&&ra.getAttribute("data-pName")==za;)wa.push(ra.getAttribute("data-pValue")),ra=ra.nextSibling;ka.index<wa.length?null!=pa?wa.splice(pa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(ea.setCellStyles(ka.countProperty,wa.length,
+function(n,C,J){if(null!=C){var T=function(O){if(null!=O)if(J)for(var S=0;S<O.length;S++)C[O[S].name]=O[S];else for(var Y in C){var da=!1;for(S=0;S<O.length;S++)if(O[S].name==Y&&O[S].type==C[Y].type){da=!0;break}da||delete C[Y]}},Q=this.editorUi.editor.graph.view.getState(n);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),T(Q.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{T(JSON.parse(n))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var C=
+{},J=n.vertices,T=n.edges,Q=0;Q<J.length;Q++)this.findCommonProperties(J[Q],C,0==Q);for(Q=0;Q<T.length;Q++)this.findCommonProperties(T[Q],C,0==J.length&&0==Q);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,n))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(n,C,J){function T(za,ta,ka,pa){ea.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ka.index){for(var wa=[],ra=ka.parentRow.nextSibling;ra&&ra.getAttribute("data-pName")==za;)wa.push(ra.getAttribute("data-pValue")),ra=ra.nextSibling;ka.index<wa.length?null!=pa?wa.splice(pa,1):wa[ka.index]=ta:wa.push(ta);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ta=wa.join(",");null!=ka.countProperty&&(ea.setCellStyles(ka.countProperty,wa.length,
ea.getSelectionCells()),sa.push(ka.countProperty),ya.push(wa.length))}ea.setCellStyles(za,ta,ea.getSelectionCells());sa.push(za);ya.push(ta);if(null!=ka.dependentProps)for(za=0;za<ka.dependentProps.length;za++){var xa=ka.dependentPropsDefVal[za],fa=ka.dependentPropsVals[za];if(fa.length>ta)fa=fa.slice(0,ta);else for(var ca=fa.length;ca<ta;ca++)fa.push(xa);fa=fa.join(",");ea.setCellStyles(ka.dependentProps[za],fa,ea.getSelectionCells());sa.push(ka.dependentProps[za]);ya.push(fa)}if("function"==typeof ka.onChange)ka.onChange(ea,
-ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",ea.getSelectionCells()))}finally{ea.getModel().endUpdate()}}function P(za,ta,ka){var pa=mxUtils.getOffset(p,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-pa.x+"px";ta.style.top=sa.y-pa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function O(za,ta,ka){var pa=document.createElement("div");pa.style.width="32px";pa.style.height=
-"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function R(za,ta,ka,pa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
+ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",ea.getSelectionCells()))}finally{ea.getModel().endUpdate()}}function Q(za,ta,ka){var pa=mxUtils.getOffset(n,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-pa.x+"px";ta.style.top=sa.y-pa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function O(za,ta,ka){var pa=document.createElement("div");pa.style.width="32px";pa.style.height=
+"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function S(za,ta,ka,pa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
aa.push({name:za,values:ta,type:ka,defVal:pa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ra){for(var xa=ya,fa=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==za)xa=xa.nextSibling,fa++;else break;var ca={type:ka,parentRow:ya,index:fa,isDeletable:!0,defVal:pa,countProperty:sa};fa=ha(za,"",ca,0==fa%2,wa);T(za,pa,ca);xa.parentNode.insertBefore(fa,xa.nextSibling);mxEvent.consume(ra)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,wa){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ra[xa]=null!=ta[xa]?ta[xa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za,
ta,ka,pa,sa){var ya=ka.dispName,wa=ka.type,ra=document.createElement("tr");ra.className="gePropRow"+(sa?"Dark":"")+(pa?"Alt":"")+" gePropNonHeaderRow";ra.setAttribute("data-pName",za);ra.setAttribute("data-pValue",ta);pa=!1;null!=ka.index&&(ra.setAttribute("data-index",ka.index),ya=(null!=ya?ya:"")+"["+ka.index+"]",pa=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(xa,ya);xa.setAttribute("title",ya);pa&&(xa.style.textAlign="right");
-ra.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(O(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(da(za,ta,ka));else if("enum"==wa){var fa=ka.enumList;for(sa=0;sa<fa.length;sa++)if(ya=fa[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var ca=document.createElement("select");P(xa,ca);for(var ba=0;ba<fa.length;ba++){var ja=fa[ba],ia=
-document.createElement("option");ia.value=mxUtils.htmlEntities(ja.val);mxUtils.write(ia,mxResources.get(ja.dispName,null,ja.dispName));ca.appendChild(ia)}ca.value=ta;p.appendChild(ca);mxEvent.addListener(ca,"change",function(){var ma=mxUtils.htmlEntities(ca.value);T(za,ma,ka)});ca.focus();mxEvent.addListener(ca,"blur",function(){p.removeChild(ca)})}))}else"dynamicArr"==wa?xa.appendChild(R(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ra,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
+ra.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";if("color"==wa)xa.appendChild(O(za,ta,ka));else if("bool"==wa||"boolean"==wa)xa.appendChild(da(za,ta,ka));else if("enum"==wa){var fa=ka.enumList;for(sa=0;sa<fa.length;sa++)if(ya=fa[sa],ya.val==ta){mxUtils.write(xa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){var ca=document.createElement("select");Q(xa,ca);for(var ba=0;ba<fa.length;ba++){var ja=fa[ba],ia=
+document.createElement("option");ia.value=mxUtils.htmlEntities(ja.val);mxUtils.write(ia,mxResources.get(ja.dispName,null,ja.dispName));ca.appendChild(ia)}ca.value=ta;n.appendChild(ca);mxEvent.addListener(ca,"change",function(){var ma=mxUtils.htmlEntities(ca.value);T(za,ma,ka)});ca.focus();mxEvent.addListener(ca,"blur",function(){n.removeChild(ca)})}))}else"dynamicArr"==wa?xa.appendChild(S(za,ta,ka.subType,ka.subDefVal,ka.countProperty,ra,sa)):"staticArr"==wa?xa.appendChild(Y(za,ta,ka.subType,ka.subDefVal,
ka.size,ra,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ta,sa.style.width="96px",sa.style.borderWidth="0px",xa.appendChild(sa)):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ta)),mxEvent.addListener(xa,"click",mxUtils.bind(Z,function(){function ca(){var ja=ba.value;ja=0==ja.length&&"string"!=wa?0:ja;ka.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",wa="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=ka.min&&ja<
-ka.min?ja=ka.min:null!=ka.max&&ja>ka.max&&(ja=ka.max);ja=encodeURIComponent(("int"==wa?parseInt(ja):ja)+"");T(za,ja,ka)}var ba=document.createElement("input");P(xa,ba,!0);ba.value=decodeURIComponent(ta);ba.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ba.type="number",ba.step="int"==wa?"1":"any",null!=ka.min&&(ba.min=parseFloat(ka.min)),null!=ka.max&&(ba.max=parseFloat(ka.max)));p.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ja){13==ja.keyCode&&ca()});ba.focus();mxEvent.addListener(ba,
-"blur",function(){ca()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(ca){T(za,"",ka,ka.index);mxEvent.consume(ca)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ra.appendChild(xa);return ra}var Z=this,ea=this.editorUi.editor.graph,aa=[];p.style.position="relative";p.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var la=
-document.createElement("tr");la.className="gePropHeader";var Aa=document.createElement("th");Aa.className="gePropHeaderCell";var Ba=document.createElement("img");Ba.src=Sidebar.prototype.expandedImage;Ba.style.verticalAlign="middle";Aa.appendChild(Ba);mxUtils.write(Aa,mxResources.get("property"));la.style.cursor="pointer";var ua=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=p.childNodes.length-
-1;0<=ka;ka--)try{var pa=p.childNodes[ka],sa=pa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||p.removeChild(pa)}catch(ya){}}else Ba.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(la,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;ua()});la.appendChild(Aa);Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.innerHTML=mxResources.get("value");la.appendChild(Aa);va.appendChild(la);var Da=
-!1,Fa=!1;la=null;1==I.vertices.length&&0==I.edges.length?la=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(la=I.edges[0].id);null!=la&&va.appendChild(ha("id",mxUtils.htmlEntities(la),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ka in C)if(la=C[Ka],"function"!=typeof la.isVisible||la.isVisible(I,this)){var Oa=null!=I.style[Ka]?mxUtils.htmlEntities(I.style[Ka]+""):null!=la.getDefaultValue?la.getDefaultValue(I,this):la.defVal;if("separator"==la.type)Fa=!Fa;else{if("staticArr"==la.type)la.size=
-parseInt(I.style[la.sizeProperty]||C[la.sizeProperty].defVal)||0;else if(null!=la.dependentProps){var Ia=la.dependentProps,Ea=[],Ca=[];for(Aa=0;Aa<Ia.length;Aa++){var Ma=I.style[Ia[Aa]];Ca.push(C[Ia[Aa]].subDefVal);Ea.push(null!=Ma?Ma.split(","):[])}la.dependentPropsDefVal=Ca;la.dependentPropsVals=Ea}va.appendChild(ha(Ka,Oa,la,Da,Fa));Da=!Da}}for(Aa=0;Aa<aa.length;Aa++)for(la=aa[Aa],C=la.parentRow,I=0;I<la.values.length;I++)Ka=ha(la.name,la.values[I],{type:la.type,parentRow:la.parentRow,isDeletable:la.isDeletable,
-index:I,defVal:la.defVal,countProperty:la.countProperty,size:la.size},0==I%2,la.flipBkg),C.parentNode.insertBefore(Ka,C.nextSibling),C=Ka;p.appendChild(va);ua();return p};StyleFormatPanel.prototype.addStyles=function(p){function C(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
-P.style.paddingRight="20px";p.style.paddingLeft="16px";p.style.paddingBottom="6px";p.style.position="relative";p.appendChild(P);var O="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var Y=[],da=0;da<this.defaultColorSchemes.length;da++){var ha=
-document.createElement("div");ha.style.display="inline-block";ha.style.width="6px";ha.style.height="6px";ha.style.marginLeft="4px";ha.style.marginRight="3px";ha.style.borderRadius="3px";ha.style.cursor="pointer";ha.style.background="transparent";ha.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(la){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(la)}))})(da);Y.push(ha);R.appendChild(ha)}var Z=mxUtils.bind(this,function(la){null!=Y[la]&&(null!=this.format.currentScheme&&
-null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=la,ea(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),ea=mxUtils.bind(this,function(la){var Aa=mxUtils.bind(this,function(ua){var Da=mxUtils.button("",mxUtils.bind(this,function(Oa){T.getModel().beginUpdate();try{for(var Ia=I.getSelectionState().cells,Ea=0;Ea<Ia.length;Ea++){for(var Ca=T.getModel().getStyle(Ia[Ea]),
+ka.min?ja=ka.min:null!=ka.max&&ja>ka.max&&(ja=ka.max);ja=encodeURIComponent(("int"==wa?parseInt(ja):ja)+"");T(za,ja,ka)}var ba=document.createElement("input");Q(xa,ba,!0);ba.value=decodeURIComponent(ta);ba.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(ba.type="number",ba.step="int"==wa?"1":"any",null!=ka.min&&(ba.min=parseFloat(ka.min)),null!=ka.max&&(ba.max=parseFloat(ka.max)));n.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ja){13==ja.keyCode&&ca()});ba.focus();mxEvent.addListener(ba,
+"blur",function(){ca()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(ca){T(za,"",ka,ka.index);mxEvent.consume(ca)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",xa.appendChild(sa));ra.appendChild(xa);return ra}var Z=this,ea=this.editorUi.editor.graph,aa=[];n.style.position="relative";n.style.padding="0";var va=document.createElement("table");va.className="geProperties";va.style.whiteSpace="nowrap";va.style.width="100%";var la=
+document.createElement("tr");la.className="gePropHeader";var Aa=document.createElement("th");Aa.className="gePropHeaderCell";var Ba=document.createElement("img");Ba.src=Sidebar.prototype.expandedImage;Ba.style.verticalAlign="middle";Aa.appendChild(Ba);mxUtils.write(Aa,mxResources.get("property"));la.style.cursor="pointer";var ua=function(){var za=va.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=n.childNodes.length-
+1;0<=ka;ka--)try{var pa=n.childNodes[ka],sa=pa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||n.removeChild(pa)}catch(ya){}}else Ba.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(la,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;ua()});la.appendChild(Aa);Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.innerHTML=mxResources.get("value");la.appendChild(Aa);va.appendChild(la);var Da=
+!1,Fa=!1;la=null;1==J.vertices.length&&0==J.edges.length?la=J.vertices[0].id:0==J.vertices.length&&1==J.edges.length&&(la=J.edges[0].id);null!=la&&va.appendChild(ha("id",mxUtils.htmlEntities(la),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ka in C)if(la=C[Ka],"function"!=typeof la.isVisible||la.isVisible(J,this)){var Oa=null!=J.style[Ka]?mxUtils.htmlEntities(J.style[Ka]+""):null!=la.getDefaultValue?la.getDefaultValue(J,this):la.defVal;if("separator"==la.type)Fa=!Fa;else{if("staticArr"==la.type)la.size=
+parseInt(J.style[la.sizeProperty]||C[la.sizeProperty].defVal)||0;else if(null!=la.dependentProps){var Ia=la.dependentProps,Ea=[],Ca=[];for(Aa=0;Aa<Ia.length;Aa++){var Ma=J.style[Ia[Aa]];Ca.push(C[Ia[Aa]].subDefVal);Ea.push(null!=Ma?Ma.split(","):[])}la.dependentPropsDefVal=Ca;la.dependentPropsVals=Ea}va.appendChild(ha(Ka,Oa,la,Da,Fa));Da=!Da}}for(Aa=0;Aa<aa.length;Aa++)for(la=aa[Aa],C=la.parentRow,J=0;J<la.values.length;J++)Ka=ha(la.name,la.values[J],{type:la.type,parentRow:la.parentRow,isDeletable:la.isDeletable,
+index:J,defVal:la.defVal,countProperty:la.countProperty,size:la.size},0==J%2,la.flipBkg),C.parentNode.insertBefore(Ka,C.nextSibling),C=Ka;n.appendChild(va);ua();return n};StyleFormatPanel.prototype.addStyles=function(n){function C(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var J=this.editorUi,T=J.editor.graph,Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.paddingLeft="24px";
+Q.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom="6px";n.style.position="relative";n.appendChild(Q);var O="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var Y=[],da=0;da<this.defaultColorSchemes.length;da++){var ha=
+document.createElement("div");ha.style.display="inline-block";ha.style.width="6px";ha.style.height="6px";ha.style.marginLeft="4px";ha.style.marginRight="3px";ha.style.borderRadius="3px";ha.style.cursor="pointer";ha.style.background="transparent";ha.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(la){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(la)}))})(da);Y.push(ha);S.appendChild(ha)}var Z=mxUtils.bind(this,function(la){null!=Y[la]&&(null!=this.format.currentScheme&&
+null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=la,ea(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),ea=mxUtils.bind(this,function(la){var Aa=mxUtils.bind(this,function(ua){var Da=mxUtils.button("",mxUtils.bind(this,function(Oa){T.getModel().beginUpdate();try{for(var Ia=J.getSelectionState().cells,Ea=0;Ea<Ia.length;Ea++){for(var Ca=T.getModel().getStyle(Ia[Ea]),
Ma=0;Ma<O.length;Ma++)Ca=mxUtils.removeStylename(Ca,O[Ma]);var za=T.getModel().isVertex(Ia[Ea])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=ua?(mxEvent.isShiftDown(Oa)||(Ca=""==ua.fill?mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,ua.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_GRADIENTCOLOR,ua.gradient||mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Oa)||
mxClient.IS_MAC&&mxEvent.isMetaDown(Oa)||!T.getModel().isVertex(Ia[Ea])||(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FONTCOLOR,ua.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Oa)||(Ca=""==ua.stroke?mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,ua.stroke||mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,null)))):(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
"#ffffff")),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ia[Ea])&&(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ia[Ea],Ca)}}finally{T.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";
Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px";if(null!=ua){var Fa="1"==urlParams.sketch?"2px solid":"1px solid";null!=ua.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ua.fill+"', EndColorStr='"+ua.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+ua.fill+" 0px,"+ua.gradient+" 100%)":ua.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+
"')":Da.style.backgroundColor=""==ua.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ua.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=ua.stroke==mxConstants.NONE?Fa+" transparent":""==ua.stroke?Fa+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Fa+" "+(ua.stroke||mxUtils.getValue(T.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ua.title&&Da.setAttribute("title",ua.title)}else{Fa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ka=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=Fa;Da.style.border="1px solid "+Ka}Da.style.borderRadius="0";P.appendChild(Da)});P.innerHTML="";for(var Ba=0;Ba<la.length;Ba++)0<Ba&&0==mxUtils.mod(Ba,4)&&mxUtils.br(P),Aa(la[Ba])});
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ua.title&&Da.setAttribute("title",ua.title)}else{Fa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ka=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=Fa;Da.style.border="1px solid "+Ka}Da.style.borderRadius="0";Q.appendChild(Da)});Q.innerHTML="";for(var Ba=0;Ba<la.length;Ba++)0<Ba&&0==mxUtils.mod(Ba,4)&&mxUtils.br(Q),Aa(la[Ba])});
null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);da=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+da+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var va=document.createElement("div");va.style.cssText="position:absolute;left:202px;top:8px;bottom:"+da+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(p.appendChild(aa),p.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(aa);C(va);ea(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&p.appendChild(R);return p};StyleFormatPanel.prototype.addEditOps=function(p){var C=this.editorUi.getSelectionState(),I=this.editorUi.editor.graph,T=null;1==C.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",p.appendChild(T));I=1==C.cells.length?I.view.getState(C.cells[0]):null;null!=I&&null!=I.shape&&null!=I.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title",
-mxResources.get("editShape")),C.style.marginBottom="2px",null==T?C.style.width="210px":(T.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),p.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==T?C.style.width="210px":(T.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),
-p.appendChild(C));return p}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(p){return p.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(p){return Graph.isGoogleFontUrl(p)};Graph.createFontElement=function(p,
-C){var I=Graph.fontMapping[C];null==I&&Graph.isCssFontUrl(C)?(p=document.createElement("link"),p.setAttribute("rel","stylesheet"),p.setAttribute("type","text/css"),p.setAttribute("charset","UTF-8"),p.setAttribute("href",C)):(null==I&&(I='@font-face {\nfont-family: "'+p+'";\nsrc: url("'+C+'");\n}'),p=document.createElement("style"),mxUtils.write(p,I));return p};Graph.addFont=function(p,C,I){if(null!=p&&0<p.length&&null!=C&&0<C.length){var T=p.toLowerCase();if("helvetica"!=T&&"arial"!=p&&"sans-serif"!=
-T){var P=Graph.customFontElements[T];null!=P&&P.url!=C&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=C,"http:"==C.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(C)),P={name:p,url:C,elt:Graph.createFontElement(p,P)},Graph.customFontElements[T]=P,Graph.recentCustomFonts[T]=P,C=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=I):I()),null!=C&&C.appendChild(P.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();
-return p};Graph.getFontUrl=function(p,C){p=Graph.customFontElements[p.toLowerCase()];null!=p&&(C=p.url);return C};Graph.processFontAttributes=function(p){p=p.getElementsByTagName("*");for(var C=0;C<p.length;C++){var I=p[C].getAttribute("data-font-src");if(null!=I){var T="FONT"==p[C].nodeName?p[C].getAttribute("face"):p[C].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(p){if(null!=p){var C=mxUtils.getValue(p,"fontSource",null);if(null!=C){var I=mxUtils.getValue(p,mxConstants.STYLE_FONTFAMILY,
-null);null!=I&&Graph.addFont(I,decodeURIComponent(C))}}return p};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function p(P){C=P}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var C=null;mxEvent.addListener(this.container,"mouseenter",p);mxEvent.addListener(this.container,"mousemove",p);mxEvent.addListener(this.container,"mouseleave",function(P){C=null});this.isMouseInsertPoint=function(){return null!=C};var I=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var O=this.graph.getCellStyle(P);if(null!=O&&"rack"==O.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=O.marginLeft||0;R.marginRight=O.marginRight||0;R.marginTop=O.marginTop||0;R.marginBottom=
-O.marginBottom||0;R.allowGaps=O.allowGaps||0;R.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var z=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(p,C){return Graph.processFontStyle(z.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(p,C,I,T,P,O,R,Y,da,ha,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
-var M=mxText.prototype.redraw;mxText.prototype.redraw=function(){M.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(p,C,I){function T(){for(var la=R.getSelectionCells(),Aa=[],Ba=0;Ba<la.length;Ba++)R.isCellVisible(la[Ba])&&Aa.push(la[Ba]);R.setSelectionCells(Aa)}function P(la){R.hiddenTags=la?[]:Y.slice();T();R.refresh()}function O(la,Aa){ha.innerHTML="";if(0<la.length){var Ba=document.createElement("table");
-Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var ua=document.createElement("tbody");if(null!=la&&0<la.length)for(var Da=0;Da<la.length;Da++)(function(Fa){var Ka=0>mxUtils.indexOf(R.hiddenTags,Fa),Oa=document.createElement("tr"),Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Ea=document.createElement("img");Ea.setAttribute("src",Ka?Editor.visibleImage:Editor.hiddenImage);Ea.setAttribute("title",
-mxResources.get(Ka?"hideIt":"show",[Fa]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(C||Editor.isDarkMode())Ea.style.filter="invert(100%)";Ia.appendChild(Ea);mxEvent.addListener(Ea,"click",function(Ma){var za=mxUtils.indexOf(R.hiddenTags,Fa);mxEvent.isShiftDown(Ma)?P(0<=mxUtils.indexOf(R.hiddenTags,Fa)):(0>za?R.hiddenTags.push(Fa):0<=za&&R.hiddenTags.splice(za,1),T(),R.refresh());mxEvent.consume(Ma)});Oa.appendChild(Ia);Ia=document.createElement("td");
-Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Fa);a=document.createElement("a");mxUtils.write(a,Fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ka?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,"click",function(Ma){if(mxEvent.isShiftDown(Ma)){P(!0);var za=R.getCellsForTags([Fa],null,null,!0);R.isEnabled()?R.setSelectionCells(za):R.highlightCells(za)}else if(Ka&&
-0<R.hiddenTags.length)P(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Fa);za.splice(ta,1);R.hiddenTags=za;T();R.refresh()}mxEvent.consume(Ma)});Oa.appendChild(Ia);if(R.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==Aa){Ia.style.align="center";Ia.style.width="16px";Ea=document.createElement("img");Ea.setAttribute("src",Editor.crossImage);Ea.setAttribute("title",mxResources.get("removeIt",[Fa]));mxUtils.setOpacity(Ea,
-Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(C||Editor.isDarkMode())Ea.style.filter="invert(100%)";mxEvent.addListener(Ea,"click",function(Ma){var za=mxUtils.indexOf(Y,Fa);0<=za&&Y.splice(za,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[Fa]);R.refresh();mxEvent.consume(Ma)});Ia.appendChild(Ea)}else{var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.margin="0px";Ca.defaultChecked=null!=Aa&&0<=mxUtils.indexOf(Aa,
-Fa);Ca.checked=Ca.defaultChecked;Ca.style.background="transparent";Ca.setAttribute("title",mxResources.get(Ca.defaultChecked?"removeIt":"add",[Fa]));mxEvent.addListener(Ca,"change",function(Ma){Ca.checked?R.addTagsForCells(R.getSelectionCells(),[Fa]):R.removeTagsForCells(R.getSelectionCells(),[Fa]);mxEvent.consume(Ma)});Ia.appendChild(Ca)}Oa.appendChild(Ia)}ua.appendChild(Oa)})(la[Da]);Ba.appendChild(ua);ha.appendChild(Ba)}}var R=this,Y=R.hiddenTags.slice(),da=document.createElement("div");da.style.userSelect=
-"none";da.style.overflow="hidden";da.style.padding="10px";da.style.height="100%";var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.borderRadius="4px";ha.style.userSelect="none";ha.style.overflow="auto";ha.style.position="absolute";ha.style.left="10px";ha.style.right="10px";ha.style.top="10px";ha.style.border=R.isEnabled()?"1px solid #808080":"none";ha.style.bottom=R.isEnabled()?"48px":"10px";da.appendChild(ha);var Z=mxUtils.button(mxResources.get("reset"),function(la){R.hiddenTags=
-[];mxEvent.isShiftDown(la)||(Y=R.hiddenTags.slice());T();R.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ea=mxUtils.button(mxResources.get("add"),function(){null!=I&&I(Y,function(la){Y=la;aa()})});ea.setAttribute("title",mxResources.get("add"));ea.className="geBtn";ea.style.margin="0";R.addListener(mxEvent.ROOT,function(){Y=R.hiddenTags.slice()});var aa=mxUtils.bind(this,function(la,Aa){if(p()){la=R.getAllTags();for(Aa=0;Aa<la.length;Aa++)0>
-mxUtils.indexOf(Y,la[Aa])&&Y.push(la[Aa]);Y.sort();R.isSelectionEmpty()?O(Y):O(Y,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,aa);R.model.addListener(mxEvent.CHANGE,aa);R.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";R.isEnabled()&&
-(va.appendChild(Z),va.appendChild(ea),da.appendChild(va));return{div:da,refresh:aa}};Graph.prototype.getCustomFonts=function(){var p=this.extFonts;p=null!=p?p.slice():[];for(var C in Graph.customFontElements){var I=Graph.customFontElements[C];p.push({name:I.name,url:I.url})}return p};Graph.prototype.setFont=function(p,C){Graph.addFont(p,C);document.execCommand("fontname",!1,p);if(null!=C){var I=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(p,C);for(var T=0;T<I.length;T++)I[T].getAttribute("face")==
-p&&I[T].getAttribute("data-font-src")!=C&&I[T].setAttribute("data-font-src",C)}};var n=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return n.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var C in p)this.globalVars[C]=
-p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var x=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=x.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(p.ownerDocument)).decode(p)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(p,C,I,T,P,O,R,Y,da,ha,Z,ea,aa,va){var la=null,Aa=null,Ba=null;ea||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,Aa=this.shapeForegroundColor,Ba=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var ua=K.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var Fa=ua.ownerDocument,Ka=null!=Fa.createElementNS?Fa.createElementNS(mxConstants.NS_SVG,"style"):Fa.createElement("style");null!=Fa.setAttributeNS?Ka.setAttributeNS("type","text/css"):Ka.setAttribute("type","text/css");for(var Oa="",Ia="",Ea=0;Ea<Da.length;Ea++){var Ca=Da[Ea].name,Ma=Da[Ea].url;Graph.isCssFontUrl(Ma)?
-Oa+="@import url("+Ma+");\n":Ia+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Ma+'");\n}\n'}Ka.appendChild(Fa.createTextNode(Oa+Ia));ua.getElementsByTagName("defs")[0].appendChild(Ka)}null!=la&&(this.shapeBackgroundColor=Ba,this.shapeForegroundColor=Aa,this.stylesheet=la,this.refresh());return ua};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var p=B.apply(this,arguments);if(this.mathEnabled){var C=p.drawText;p.drawText=function(I,T){if(null!=I.text&&
-null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var P=I.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var O=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<O.length;)O[0].parentNode.removeChild(O[0]);null!=P.innerHTML&&(O=I.text.value,I.text.value=P.innerHTML,C.apply(this,arguments),I.text.value=O)}}else C.apply(this,arguments)}}return p};var F=mxCellRenderer.prototype.destroy;
-mxCellRenderer.prototype.destroy=function(p){F.apply(this,arguments);null!=p.secondLabel&&(p.secondLabel.destroy(),p.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(p){return[p.shape,p.text,p.secondLabel,p.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var N=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(p){null!=p.shape&&this.redrawEnumerationState(p);
-return N.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(p){p=decodeURIComponent(mxUtils.getValue(p.style,"enumerateValue",""));""==p&&(p=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(p)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(p){var C="1"==mxUtils.getValue(p.style,"enumerate",0);C&&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)):C||null==p.secondLabel||(p.secondLabel.destroy(),p.secondLabel=null);C=p.secondLabel;if(null!=C){var I=p.view.scale,T=this.createEnumerationValue(p);p=this.graph.model.isVertex(p.cell)?new mxRectangle(p.x+p.width-4*I,p.y+4*I,0,0):mxRectangle.fromPoint(p.view.getPoint(p));C.bounds.equals(p)&&C.value==T&&C.scale==I||(C.bounds=
-p,C.value=T,C.scale=I,C.redraw())}};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.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 E=Graph.prototype.refresh;Graph.prototype.refresh=function(){E.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.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,C){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,T=0,P=0,O=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,
-function(){I&&(I=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&da()}),da=mxUtils.bind(this,function(){if(P<p.length){var ha=this.stoppingCustomActions,Z=p[P++],ea=[];if(null!=Z.open)if(R(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ha||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),R());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ha?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ha?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ea=ea.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+1<this.defaultColorSchemes.length&&(n.appendChild(aa),n.appendChild(va));mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(aa);C(va);ea(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(S);return n};StyleFormatPanel.prototype.addEditOps=function(n){var C=this.editorUi.getSelectionState(),J=this.editorUi.editor.graph,T=null;1==C.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(Q){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",n.appendChild(T));J=1==C.cells.length?J.view.getState(C.cells[0]):null;null!=J&&null!=J.shape&&null!=J.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title",
+mxResources.get("editShape")),C.style.marginBottom="2px",null==T?C.style.width="210px":(T.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),n.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==T?C.style.width="210px":(T.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),
+n.appendChild(C));return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.createFontElement=function(n,
+C){var J=Graph.fontMapping[C];null==J&&Graph.isCssFontUrl(C)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",C)):(null==J&&(J='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+C+'");\n}'),n=document.createElement("style"),mxUtils.write(n,J));return n};Graph.addFont=function(n,C,J){if(null!=n&&0<n.length&&null!=C&&0<C.length){var T=n.toLowerCase();if("helvetica"!=T&&"arial"!=n&&"sans-serif"!=
+T){var Q=Graph.customFontElements[T];null!=Q&&Q.url!=C&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=C,"http:"==C.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(C)),Q={name:n,url:C,elt:Graph.createFontElement(n,Q)},Graph.customFontElements[T]=Q,Graph.recentCustomFonts[T]=Q,C=document.getElementsByTagName("head")[0],null!=J&&("link"==Q.elt.nodeName.toLowerCase()?(Q.elt.onload=J,Q.elt.onerror=J):J()),null!=C&&C.appendChild(Q.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();
+return n};Graph.getFontUrl=function(n,C){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(C=n.url);return C};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var C=0;C<n.length;C++){var J=n[C].getAttribute("data-font-src");if(null!=J){var T="FONT"==n[C].nodeName?n[C].getAttribute("face"):n[C].style.fontFamily;null!=T&&Graph.addFont(T,J)}}};Graph.processFontStyle=function(n){if(null!=n){var C=mxUtils.getValue(n,"fontSource",null);if(null!=C){var J=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
+null);null!=J&&Graph.addFont(J,decodeURIComponent(C))}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function n(Q){C=Q}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var C=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(Q){C=null});this.isMouseInsertPoint=function(){return null!=C};var J=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):J.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var O=this.graph.getCellStyle(Q);if(null!=O&&"rack"==O.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=O.marginLeft||0;S.marginRight=O.marginRight||0;S.marginTop=O.marginTop||0;S.marginBottom=
+O.marginBottom||0;S.allowGaps=O.allowGaps||0;S.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,C){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,C,J,T,Q,O,S,Y,da,ha,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
+var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,C,J){function T(){for(var la=S.getSelectionCells(),Aa=[],Ba=0;Ba<la.length;Ba++)S.isCellVisible(la[Ba])&&Aa.push(la[Ba]);S.setSelectionCells(Aa)}function Q(la){S.hiddenTags=la?[]:Y.slice();T();S.refresh()}function O(la,Aa){ha.innerHTML="";if(0<la.length){var Ba=document.createElement("table");
+Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var ua=document.createElement("tbody");if(null!=la&&0<la.length)for(var Da=0;Da<la.length;Da++)(function(Fa){var Ka=0>mxUtils.indexOf(S.hiddenTags,Fa),Oa=document.createElement("tr"),Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Ea=document.createElement("img");Ea.setAttribute("src",Ka?Editor.visibleImage:Editor.hiddenImage);Ea.setAttribute("title",
+mxResources.get(Ka?"hideIt":"show",[Fa]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(C||Editor.isDarkMode())Ea.style.filter="invert(100%)";Ia.appendChild(Ea);mxEvent.addListener(Ea,"click",function(Ma){var za=mxUtils.indexOf(S.hiddenTags,Fa);mxEvent.isShiftDown(Ma)?Q(0<=mxUtils.indexOf(S.hiddenTags,Fa)):(0>za?S.hiddenTags.push(Fa):0<=za&&S.hiddenTags.splice(za,1),T(),S.refresh());mxEvent.consume(Ma)});Oa.appendChild(Ia);Ia=document.createElement("td");
+Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Fa);a=document.createElement("a");mxUtils.write(a,Fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ka?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,"click",function(Ma){if(mxEvent.isShiftDown(Ma)){Q(!0);var za=S.getCellsForTags([Fa],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ka&&
+0<S.hiddenTags.length)Q(!0);else{za=Y.slice();var ta=mxUtils.indexOf(za,Fa);za.splice(ta,1);S.hiddenTags=za;T();S.refresh()}mxEvent.consume(Ma)});Oa.appendChild(Ia);if(S.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==Aa){Ia.style.align="center";Ia.style.width="16px";Ea=document.createElement("img");Ea.setAttribute("src",Editor.crossImage);Ea.setAttribute("title",mxResources.get("removeIt",[Fa]));mxUtils.setOpacity(Ea,
+Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(C||Editor.isDarkMode())Ea.style.filter="invert(100%)";mxEvent.addListener(Ea,"click",function(Ma){var za=mxUtils.indexOf(Y,Fa);0<=za&&Y.splice(za,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Fa]);S.refresh();mxEvent.consume(Ma)});Ia.appendChild(Ea)}else{var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.margin="0px";Ca.defaultChecked=null!=Aa&&0<=mxUtils.indexOf(Aa,
+Fa);Ca.checked=Ca.defaultChecked;Ca.style.background="transparent";Ca.setAttribute("title",mxResources.get(Ca.defaultChecked?"removeIt":"add",[Fa]));mxEvent.addListener(Ca,"change",function(Ma){Ca.checked?S.addTagsForCells(S.getSelectionCells(),[Fa]):S.removeTagsForCells(S.getSelectionCells(),[Fa]);mxEvent.consume(Ma)});Ia.appendChild(Ca)}Oa.appendChild(Ia)}ua.appendChild(Oa)})(la[Da]);Ba.appendChild(ua);ha.appendChild(Ba)}}var S=this,Y=S.hiddenTags.slice(),da=document.createElement("div");da.style.userSelect=
+"none";da.style.overflow="hidden";da.style.padding="10px";da.style.height="100%";var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.borderRadius="4px";ha.style.userSelect="none";ha.style.overflow="auto";ha.style.position="absolute";ha.style.left="10px";ha.style.right="10px";ha.style.top="10px";ha.style.border=S.isEnabled()?"1px solid #808080":"none";ha.style.bottom=S.isEnabled()?"48px":"10px";da.appendChild(ha);var Z=mxUtils.button(mxResources.get("reset"),function(la){S.hiddenTags=
+[];mxEvent.isShiftDown(la)||(Y=S.hiddenTags.slice());T();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ea=mxUtils.button(mxResources.get("add"),function(){null!=J&&J(Y,function(la){Y=la;aa()})});ea.setAttribute("title",mxResources.get("add"));ea.className="geBtn";ea.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var aa=mxUtils.bind(this,function(la,Aa){if(n()){la=S.getAllTags();for(Aa=0;Aa<la.length;Aa++)0>
+mxUtils.indexOf(Y,la[Aa])&&Y.push(la[Aa]);Y.sort();S.isSelectionEmpty()?O(Y):O(Y,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,aa);S.model.addListener(mxEvent.CHANGE,aa);S.addListener(mxEvent.REFRESH,aa);var va=document.createElement("div");va.style.boxSizing="border-box";va.style.whiteSpace="nowrap";va.style.position="absolute";va.style.overflow="hidden";va.style.bottom="0px";va.style.height="42px";va.style.right="10px";va.style.left="10px";S.isEnabled()&&
+(va.appendChild(Z),va.appendChild(ea),da.appendChild(va));return{div:da,refresh:aa}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var C in Graph.customFontElements){var J=Graph.customFontElements[C];n.push({name:J.name,url:J.url})}return n};Graph.prototype.setFont=function(n,C){Graph.addFont(n,C);document.execCommand("fontname",!1,n);if(null!=C){var J=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(n,C);for(var T=0;T<J.length;T++)J[T].getAttribute("face")==
+n&&J[T].getAttribute("data-font-src")!=C&&J[T].setAttribute("data-font-src",C)}};var K=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return K.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var C in n)this.globalVars[C]=
+n[C]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var C=q.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[n]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,C,J,T,Q,O,S,Y,da,ha,Z,ea,aa,va){var la=null,Aa=null,Ba=null;ea||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,Aa=this.shapeForegroundColor,Ba=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var ua=E.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var Fa=ua.ownerDocument,Ka=null!=Fa.createElementNS?Fa.createElementNS(mxConstants.NS_SVG,"style"):Fa.createElement("style");null!=Fa.setAttributeNS?Ka.setAttributeNS("type","text/css"):Ka.setAttribute("type","text/css");for(var Oa="",Ia="",Ea=0;Ea<Da.length;Ea++){var Ca=Da[Ea].name,Ma=Da[Ea].url;Graph.isCssFontUrl(Ma)?
+Oa+="@import url("+Ma+");\n":Ia+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Ma+'");\n}\n'}Ka.appendChild(Fa.createTextNode(Oa+Ia));ua.getElementsByTagName("defs")[0].appendChild(Ka)}null!=la&&(this.shapeBackgroundColor=Ba,this.shapeForegroundColor=Aa,this.stylesheet=la,this.refresh());return ua};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var n=A.apply(this,arguments);if(this.mathEnabled){var C=n.drawText;n.drawText=function(J,T){if(null!=J.text&&
+null!=J.text.value&&J.text.checkBounds()&&(mxUtils.isNode(J.text.value)||J.text.dialect==mxConstants.DIALECT_STRICTHTML)){var Q=J.text.getContentNode();if(null!=Q){Q=Q.cloneNode(!0);if(Q.getElementsByTagNameNS)for(var O=Q.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<O.length;)O[0].parentNode.removeChild(O[0]);null!=Q.innerHTML&&(O=J.text.value,J.text.value=Q.innerHTML,C.apply(this,arguments),J.text.value=O)}}else C.apply(this,arguments)}}return n};var B=mxCellRenderer.prototype.destroy;
+mxCellRenderer.prototype.destroy=function(n){B.apply(this,arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var M=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);
+return M.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var C="1"==mxUtils.getValue(n.style,"enumerate",0);C&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
+mxConstants.ALIGN_BOTTOM),n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):C||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);C=n.secondLabel;if(null!=C){var J=n.view.scale,T=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*J,n.y+4*J,0,0):mxRectangle.fromPoint(n.view.getPoint(n));C.bounds.equals(n)&&C.value==T&&C.scale==J||(C.bounds=
+n,C.value=T,C.scale=J,C.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=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;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var I=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){I.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=
+n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,C){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 J=!1,T=0,Q=0,O=mxUtils.bind(this,function(){J||(J=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){J&&(J=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&da()}),da=mxUtils.bind(this,function(){if(Q<n.length){var ha=this.stoppingCustomActions,Z=n[Q++],ea=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ha||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ha?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ha?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ea=ea.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
!0),!0)));null!=Z.wipeOut&&(ea=ea.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(O(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){O();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(O(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
(O(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(O(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));aa=[];null!=Z.select&&this.isEnabled()&&(aa=this.getCellsForAction(Z.select),this.setSelectionCells(aa));null!=Z.highlight&&(aa=this.getCellsForAction(Z.highlight),this.highlightCells(aa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
null!=Z.scroll&&(aa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);if(null!=Z.tags){aa=[];null!=Z.tags.hidden&&(aa=aa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var va=this.getAllTags(),la=0;la<va.length;la++)0>mxUtils.indexOf(Z.tags.visible,va[la])&&0>mxUtils.indexOf(aa,va[la])&&aa.push(va[la]);this.hiddenTags=aa;this.refresh()}0<ea.length&&(T++,this.executeAnimations(ea,Y,ha?1:Z.steps,ha?0:Z.delay));
-0==T?da():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=C&&C()});da()}};Graph.prototype.doUpdateCustomLinksForCell=function(p,C){var I=this.getLinkForCell(C);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(p,I));if(this.isHtmlLabel(C)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var P=T.getElementsByTagName("a"),O=!1,R=0;R<P.length;R++)I=P[R].getAttribute("href"),null!=I&&"data:action/json,"==
-I.substring(0,17)&&(P[R].setAttribute("href",this.updateCustomLink(p,I)),O=!0);O&&this.labelChanged(C,T.innerHTML)}};Graph.prototype.updateCustomLink=function(p,C){if("data:action/json,"==C.substring(0,17))try{var I=JSON.parse(C.substring(17));null!=I.actions&&(this.updateCustomLinkActions(p,I.actions),C="data:action/json,"+JSON.stringify(I))}catch(T){}return C};Graph.prototype.updateCustomLinkActions=function(p,C){for(var I=0;I<C.length;I++){var T=C[I],P;for(P in T)this.updateCustomLinkAction(p,
-T[P],"cells"),this.updateCustomLinkAction(p,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(p,C,I){if(null!=C&&null!=C[I]){for(var T=[],P=0;P<C[I].length;P++)if("*"==C[I][P])T.push(C[I][P]);else{var O=p[C[I][P]];null!=O?""!=O&&T.push(O):T.push(C[I][P])}C[I]=T}};Graph.prototype.getCellsForAction=function(p,C){C=this.getCellsById(p.cells).concat(this.getCellsForTags(p.tags,null,C));if(null!=p.excludeCells){for(var I=[],T=0;T<C.length;T++)0>p.excludeCells.indexOf(C[T].id)&&I.push(C[T]);
-C=I}return C};Graph.prototype.getCellsById=function(p){var C=[];if(null!=p)for(var I=0;I<p.length;I++)if("*"==p[I]){var T=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(O){return O!=T},T))}else{var P=this.model.getCell(p[I]);null!=P&&C.push(P)}return C};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(p){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(p))};Graph.prototype.isAllTagsHidden=function(p){if(null==p||0==p.length||
-0==this.hiddenTags.length)return!1;p=p.split(" ");if(p.length>this.hiddenTags.length)return!1;for(var C=0;C<p.length;C++)if(0>mxUtils.indexOf(this.hiddenTags,p[C]))return!1;return!0};Graph.prototype.getCellsForTags=function(p,C,I,T){var P=[];if(null!=p){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var O=0,R={},Y=0;Y<p.length;Y++)0<p[Y].length&&(R[p[Y]]=!0,O++);for(Y=0;Y<C.length;Y++)if(I&&this.model.getParent(C[Y])==this.model.root||this.model.isVertex(C[Y])||this.model.isEdge(C[Y])){var da=
-this.getTagsForCell(C[Y]),ha=!1;if(0<da.length&&(da=da.split(" "),da.length>=p.length)){for(var Z=ha=0;Z<da.length&&ha<O;Z++)null!=R[da[Z]]&&ha++;ha=ha==O}ha&&(1!=T||this.isCellVisible(C[Y]))&&P.push(C[Y])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(p){for(var C=null,I=[],T=0;T<p.length;T++){var P=this.getTagsForCell(p[T]);I=[];if(0<P.length){P=P.split(" ");for(var O={},
-R=0;R<P.length;R++)if(null==C||null!=C[P[R]])O[P[R]]=!0,I.push(P[R]);C=O}else return[]}return I};Graph.prototype.getTagsForCells=function(p){for(var C=[],I={},T=0;T<p.length;T++){var P=this.getTagsForCell(p[T]);if(0<P.length){P=P.split(" ");for(var O=0;O<P.length;O++)null==I[P[O]]&&(I[P[O]]=!0,C.push(P[O]))}}return C};Graph.prototype.getTagsForCell=function(p){return this.getAttributeForCell(p,"tags","")};Graph.prototype.addTagsForCells=function(p,C){if(0<p.length&&0<C.length){this.model.beginUpdate();
-try{for(var I=0;I<p.length;I++){for(var T=this.getTagsForCell(p[I]),P=T.split(" "),O=!1,R=0;R<C.length;R++){var Y=mxUtils.trim(C[R]);""!=Y&&0>mxUtils.indexOf(P,Y)&&(T=0<T.length?T+" "+Y:Y,O=!0)}O&&this.setAttributeForCell(p[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(p,C){if(0<p.length&&0<C.length){this.model.beginUpdate();try{for(var I=0;I<p.length;I++){var T=this.getTagsForCell(p[I]);if(0<T.length){for(var P=T.split(" "),O=!1,R=0;R<C.length;R++){var Y=
-mxUtils.indexOf(P,C[R]);0<=Y&&(P.splice(Y,1),O=!0)}O&&this.setAttributeForCell(p[I],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(p){this.model.beginUpdate();try{for(var C=0;C<p.length;C++)this.model.setVisible(p[C],!this.model.isVisible(p[C]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(p,C){this.model.beginUpdate();try{for(var I=0;I<p.length;I++)this.model.setVisible(p[I],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
-function(p,C,I,T){for(var P=0;P<p.length;P++)this.highlightCell(p[P],C,I,T)};Graph.prototype.highlightCell=function(p,C,I,T,P){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;p=this.view.getState(p);var O=null;null!=p&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(p.style,mxConstants.STYLE_STROKEWIDTH,1)+P),O=new mxCellHighlight(this,C,P,!1),null!=T&&(O.opacity=T),O.highlight(p),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),
-O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},I));return O};Graph.prototype.addSvgShadow=function(p,C,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var P=p.ownerDocument,O=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");O.setAttribute("id",this.shadowId);var R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",
-this.svgShadowBlur);R.setAttribute("result","blur");O.appendChild(R);R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");O.appendChild(R);R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",
-this.svgShadowOpacity);R.setAttribute("result","offsetColor");O.appendChild(R);R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");O.appendChild(R);R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2",
-"offsetBlur");O.appendChild(R);R=p.getElementsByTagName("defs");0==R.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=p.firstChild?p.insertBefore(P,p.firstChild):p.appendChild(P)):P=R[0];P.appendChild(O);I||(C=null!=C?C:p.getElementsByTagName("g")[0],null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(p.getAttribute("width")))&&T&&(p.setAttribute("width",parseInt(p.getAttribute("width"))+6),p.setAttribute("height",
-parseInt(p.getAttribute("height"))+6),C=p.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,p.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(p,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C=null!=C?C:!0,(this.shadowVisible=p)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),C&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var p=this.model.getChildCount(this.model.root),C=0;do var I=this.model.getChildAt(this.model.root,C);while(C++<p&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
+0==T?da():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=C&&C()});da()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,C){var J=this.getLinkForCell(C);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(n,J));if(this.isHtmlLabel(C)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var Q=T.getElementsByTagName("a"),O=!1,S=0;S<Q.length;S++)J=Q[S].getAttribute("href"),null!=J&&"data:action/json,"==
+J.substring(0,17)&&(Q[S].setAttribute("href",this.updateCustomLink(n,J)),O=!0);O&&this.labelChanged(C,T.innerHTML)}};Graph.prototype.updateCustomLink=function(n,C){if("data:action/json,"==C.substring(0,17))try{var J=JSON.parse(C.substring(17));null!=J.actions&&(this.updateCustomLinkActions(n,J.actions),C="data:action/json,"+JSON.stringify(J))}catch(T){}return C};Graph.prototype.updateCustomLinkActions=function(n,C){for(var J=0;J<C.length;J++){var T=C[J],Q;for(Q in T)this.updateCustomLinkAction(n,
+T[Q],"cells"),this.updateCustomLinkAction(n,T[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,C,J){if(null!=C&&null!=C[J]){for(var T=[],Q=0;Q<C[J].length;Q++)if("*"==C[J][Q])T.push(C[J][Q]);else{var O=n[C[J][Q]];null!=O?""!=O&&T.push(O):T.push(C[J][Q])}C[J]=T}};Graph.prototype.getCellsForAction=function(n,C){C=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,C));if(null!=n.excludeCells){for(var J=[],T=0;T<C.length;T++)0>n.excludeCells.indexOf(C[T].id)&&J.push(C[T]);
+C=J}return C};Graph.prototype.getCellsById=function(n){var C=[];if(null!=n)for(var J=0;J<n.length;J++)if("*"==n[J]){var T=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(O){return O!=T},T))}else{var Q=this.model.getCell(n[J]);null!=Q&&C.push(Q)}return C};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||
+0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var C=0;C<n.length;C++)if(0>mxUtils.indexOf(this.hiddenTags,n[C]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,C,J,T){var Q=[];if(null!=n){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var O=0,S={},Y=0;Y<n.length;Y++)0<n[Y].length&&(S[n[Y]]=!0,O++);for(Y=0;Y<C.length;Y++)if(J&&this.model.getParent(C[Y])==this.model.root||this.model.isVertex(C[Y])||this.model.isEdge(C[Y])){var da=
+this.getTagsForCell(C[Y]),ha=!1;if(0<da.length&&(da=da.split(" "),da.length>=n.length)){for(var Z=ha=0;Z<da.length&&ha<O;Z++)null!=S[da[Z]]&&ha++;ha=ha==O}ha&&(1!=T||this.isCellVisible(C[Y]))&&Q.push(C[Y])}}return Q};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var C=null,J=[],T=0;T<n.length;T++){var Q=this.getTagsForCell(n[T]);J=[];if(0<Q.length){Q=Q.split(" ");for(var O={},
+S=0;S<Q.length;S++)if(null==C||null!=C[Q[S]])O[Q[S]]=!0,J.push(Q[S]);C=O}else return[]}return J};Graph.prototype.getTagsForCells=function(n){for(var C=[],J={},T=0;T<n.length;T++){var Q=this.getTagsForCell(n[T]);if(0<Q.length){Q=Q.split(" ");for(var O=0;O<Q.length;O++)null==J[Q[O]]&&(J[Q[O]]=!0,C.push(Q[O]))}}return C};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,C){if(0<n.length&&0<C.length){this.model.beginUpdate();
+try{for(var J=0;J<n.length;J++){for(var T=this.getTagsForCell(n[J]),Q=T.split(" "),O=!1,S=0;S<C.length;S++){var Y=mxUtils.trim(C[S]);""!=Y&&0>mxUtils.indexOf(Q,Y)&&(T=0<T.length?T+" "+Y:Y,O=!0)}O&&this.setAttributeForCell(n[J],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,C){if(0<n.length&&0<C.length){this.model.beginUpdate();try{for(var J=0;J<n.length;J++){var T=this.getTagsForCell(n[J]);if(0<T.length){for(var Q=T.split(" "),O=!1,S=0;S<C.length;S++){var Y=
+mxUtils.indexOf(Q,C[S]);0<=Y&&(Q.splice(Y,1),O=!0)}O&&this.setAttributeForCell(n[J],"tags",Q.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var C=0;C<n.length;C++)this.model.setVisible(n[C],!this.model.isVisible(n[C]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,C){this.model.beginUpdate();try{for(var J=0;J<n.length;J++)this.model.setVisible(n[J],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(n,C,J,T){for(var Q=0;Q<n.length;Q++)this.highlightCell(n[Q],C,J,T)};Graph.prototype.highlightCell=function(n,C,J,T,Q){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;n=this.view.getState(n);var O=null;null!=n&&(Q=null!=Q?Q:4,Q=Math.max(Q+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+Q),O=new mxCellHighlight(this,C,Q,!1),null!=T&&(O.opacity=T),O.highlight(n),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),
+O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},J));return O};Graph.prototype.addSvgShadow=function(n,C,J,T){J=null!=J?J:!1;T=null!=T?T:!0;var Q=n.ownerDocument,O=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"filter"):Q.createElement("filter");O.setAttribute("id",this.shadowId);var S=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):Q.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",
+this.svgShadowBlur);S.setAttribute("result","blur");O.appendChild(S);S=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feOffset"):Q.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feFlood"):Q.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",
+this.svgShadowOpacity);S.setAttribute("result","offsetColor");O.appendChild(S);S=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feComposite"):Q.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feBlend"):Q.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2",
+"offsetBlur");O.appendChild(S);S=n.getElementsByTagName("defs");0==S.length?(Q=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=n.firstChild?n.insertBefore(Q,n.firstChild):n.appendChild(Q)):Q=S[0];Q.appendChild(O);J||(C=null!=C?C:n.getElementsByTagName("g")[0],null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&T&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",
+parseInt(n.getAttribute("height"))+6),C=n.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,n.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(n,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C=null!=C?C:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),C&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),C=0;do var J=this.model.getChildAt(this.model.root,C);while(C++<n&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",
STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=
[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];
@@ -11665,159 +11666,159 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(p){var C=null;null!=p&&0<p.length&&("ER"==p.substring(0,2)?C="mxgraph.er":"sysML"==p.substring(0,5)&&(C="mxgraph.sysml"));return C};var U=mxMarker.createMarker;mxMarker.createMarker=
-function(p,C,I,T,P,O,R,Y,da,ha){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return U.apply(this,arguments)};var Q=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(p,C,I,T,P,O){"1"==mxUtils.getValue(C.style,"lineShape",null)&&p.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return Q.apply(this,arguments)};PrintDialog.prototype.create=function(p,C){function I(){aa.value=Math.max(1,
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var C=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?C="mxgraph.er":"sysML"==n.substring(0,5)&&(C="mxgraph.sysml"));return C};var W=mxMarker.createMarker;mxMarker.createMarker=
+function(n,C,J,T,Q,O,S,Y,da,ha){if(null!=J&&null==mxMarker.markers[J]){var Z=this.getPackageForType(J);null!=Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,C,J,T,Q,O){"1"==mxUtils.getValue(C.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(n,C){function J(){aa.value=Math.max(1,
Math.min(Y,Math.max(parseInt(aa.value),parseInt(ea.value))));ea.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(ea.value))))}function T(ya){function wa(Ha,Na,Pa){var Qa=Ha.useCssTransforms,Ya=Ha.currentTranslate,La=Ha.currentScale,Ta=Ha.view.translate,Ua=Ha.view.scale;Ha.useCssTransforms&&(Ha.useCssTransforms=!1,Ha.currentTranslate=new mxPoint(0,0),Ha.currentScale=1,Ha.view.translate=new mxPoint(0,0),Ha.view.scale=1);var Za=Ha.getGraphBounds(),Wa=0,bb=0,Va=pa.get(),ab=1/Ha.pageScale,
$a=ua.checked;if($a){ab=parseInt(ta.value);var hb=parseInt(ka.value);ab=Math.min(Va.height*hb/(Za.height/Ha.view.scale),Va.width*ab/(Za.width/Ha.view.scale))}else ab=parseInt(Ba.value)/(100*Ha.pageScale),isNaN(ab)&&(ra=1/Ha.pageScale,Ba.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ra);Va.height=Math.ceil(Va.height*ra);ab*=ra;!$a&&Ha.pageVisible?(Za=Ha.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Na){Na=PrintDialog.createPrintPreview(Ha,ab,Va,
-0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;va.checked&&(Na.isCellVisible=function(Xa){return Ha.isCellSelected(Xa)});Wa=p.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
-Xa.writeln("}"),Xa.writeln("</style>"));null!=p.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(p.editor.fontCss),Xa.writeln("</style>"));for(var db=Ha.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
-'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Na.renderPage;Na.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!p.editor.useForeignObjectForMath?!0:p.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Va=P.enableFlowAnimation;
-P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Wa=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Na.open(null,null,Pa,!0);P.enableFlowAnimation=Va;null!=Wa&&(P.shapeForegroundColor=bb,P.shapeBackgroundColor=$a,P.stylesheet=Wa,P.refresh())}else{Va=Ha.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Na.backgroundColor=Va;Na.autoOrigin=$a;Na.appendGraph(Ha,ab,Wa,bb,Pa,!0);Pa=
+0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;va.checked&&(Na.isCellVisible=function(Xa){return Ha.isCellSelected(Xa)});Wa=n.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
+Xa.writeln("}"),Xa.writeln("</style>"));null!=n.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(n.editor.fontCss),Xa.writeln("</style>"));for(var db=Ha.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Na.renderPage;Na.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!n.editor.useForeignObjectForMath?!0:n.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=Q.shapeForegroundColor;$a=Q.shapeBackgroundColor;Va=Q.enableFlowAnimation;
+Q.enableFlowAnimation=!1;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(Wa=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());Na.open(null,null,Pa,!0);Q.enableFlowAnimation=Va;null!=Wa&&(Q.shapeForegroundColor=bb,Q.shapeBackgroundColor=$a,Q.stylesheet=Wa,Q.refresh())}else{Va=Ha.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Na.backgroundColor=Va;Na.autoOrigin=$a;Na.appendGraph(Ha,ab,Wa,bb,Pa,!0);Pa=
Ha.getCustomFonts();if(null!=Na.wnd)for(Wa=0;Wa<Pa.length;Wa++)bb=Pa[Wa].name,$a=Pa[Wa].url,Graph.isCssFontUrl($a)?Na.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Na.wnd.document.writeln('<style type="text/css">'),Na.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Na.wnd.document.writeln("</style>"))}Qa&&(Ha.useCssTransforms=Qa,Ha.currentTranslate=
-Ya,Ha.currentScale=La,Ha.view.translate=Ta,Ha.view.scale=Ua);return Na}var ra=parseInt(sa.value)/100;isNaN(ra)&&(ra=1,sa.value="100 %");ra*=.75;var xa=null,fa=P.shapeForegroundColor,ca=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(xa=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var ba=ea.value,ja=aa.value,ia=!ha.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(p,ha.checked,
-ba,ja,ua.checked,ta.value,ka.value,parseInt(Ba.value)/100,parseInt(sa.value)/100,pa.get());else{ia&&(ia=va.checked||ba==da&&ja==da);if(!ia&&null!=p.pages&&p.pages.length){var qa=0;ia=p.pages.length-1;ha.checked||(qa=parseInt(ba)-1,ia=parseInt(ja)-1);for(var oa=qa;oa<=ia;oa++){var na=p.pages[oa];ba=na==p.currentPage?P:null;if(null==ba){ba=p.createTemporaryGraph(P.stylesheet);ba.shapeForegroundColor=P.shapeForegroundColor;ba.shapeBackgroundColor=P.shapeBackgroundColor;ja=!0;qa=!1;var Ja=null,Ga=null;
-null==na.viewState&&null==na.root&&p.updatePageRoot(na);null!=na.viewState&&(ja=na.viewState.pageVisible,qa=na.viewState.mathEnabled,Ja=na.viewState.background,Ga=na.viewState.backgroundImage,ba.extFonts=na.viewState.extFonts);null!=Ga&&null!=Ga.originalSrc&&(Ga=p.createImageForPageLink(Ga.originalSrc,na));ba.background=Ja;ba.backgroundImage=null!=Ga?new mxImage(Ga.src,Ga.width,Ga.height,Ga.x,Ga.y):null;ba.pageVisible=ja;ba.mathEnabled=qa;var Ra=ba.getGraphBounds;ba.getGraphBounds=function(){var Ha=
-Ra.apply(this,arguments),Na=this.backgroundImage;if(null!=Na&&null!=Na.width&&null!=Na.height){var Pa=this.view.translate,Qa=this.view.scale;Ha=mxRectangle.fromRectangle(Ha);Ha.add(new mxRectangle((Pa.x+Na.x)*Qa,(Pa.y+Na.y)*Qa,Na.width*Qa,Na.height*Qa))}return Ha};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ha){return"page"==Ha?na.getName():"pagenumber"==Ha?oa+1:"pagecount"==Ha?null!=p.pages?p.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);p.updatePageRoot(na);
-ba.model.setRoot(na.root)}ma=wa(ba,ma,oa!=ia);ba!=P&&ba.container.parentNode.removeChild(ba.container)}}else ma=wa(P);null==ma?p.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(P.shapeForegroundColor=fa,P.shapeBackgroundColor=ca,P.stylesheet=
-xa,P.refresh())}}var P=p.editor.graph,O=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,C||mxResources.get("print"));O.appendChild(R);var Y=1,da=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ha=document.createElement("input");ha.style.cssText="margin-right:8px;margin-bottom:8px;";ha.setAttribute("value","all");ha.setAttribute("type",
-"radio");ha.setAttribute("name","pages-printdialog");R.appendChild(ha);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));R.appendChild(C);mxUtils.br(R);var Z=ha.cloneNode(!0);ha.setAttribute("checked","checked");Z.setAttribute("value","range");R.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");R.appendChild(C);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("type",
-"number");ea.setAttribute("min","1");ea.style.width="50px";R.appendChild(ea);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));R.appendChild(C);var aa=ea.cloneNode(!0);R.appendChild(aa);mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"change",I);mxEvent.addListener(aa,"change",I);if(null!=p.pages&&(Y=p.pages.length,null!=p.currentPage))for(C=0;C<p.pages.length;C++)if(p.currentPage==p.pages[C]){da=
-C+1;ea.value=da;aa.value=da;break}ea.setAttribute("max",Y);aa.setAttribute("max",Y);p.isPagesEnabled()?1<Y&&(O.appendChild(R),Z.checked=!0):Z.checked=!0;mxUtils.br(R);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";P.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var la=document.createElement("div");la.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",la.appendChild(va)):
-(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",R.appendChild(va));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));va.parentNode.appendChild(C);1==Y&&mxUtils.br(va.parentNode);var Aa=document.createElement("input");Aa.style.marginRight="8px";Aa.setAttribute("value","adjust");Aa.setAttribute("type","radio");Aa.setAttribute("name","printZoom");la.appendChild(Aa);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo"));
-la.appendChild(C);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","100 %");Ba.style.width="50px";la.appendChild(Ba);mxEvent.addListener(Ba,"focus",function(){Aa.checked=!0});O.appendChild(la);R=R.cloneNode(!1);var ua=Aa.cloneNode(!0);ua.setAttribute("value","fit");Aa.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(ua);R.appendChild(C);la=
+Ya,Ha.currentScale=La,Ha.view.translate=Ta,Ha.view.scale=Ua);return Na}var ra=parseInt(sa.value)/100;isNaN(ra)&&(ra=1,sa.value="100 %");ra*=.75;var xa=null,fa=Q.shapeForegroundColor,ca=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(xa=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var ba=ea.value,ja=aa.value,ia=!ha.checked,ma=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ha.checked,
+ba,ja,ua.checked,ta.value,ka.value,parseInt(Ba.value)/100,parseInt(sa.value)/100,pa.get());else{ia&&(ia=va.checked||ba==da&&ja==da);if(!ia&&null!=n.pages&&n.pages.length){var qa=0;ia=n.pages.length-1;ha.checked||(qa=parseInt(ba)-1,ia=parseInt(ja)-1);for(var oa=qa;oa<=ia;oa++){var na=n.pages[oa];ba=na==n.currentPage?Q:null;if(null==ba){ba=n.createTemporaryGraph(Q.stylesheet);ba.shapeForegroundColor=Q.shapeForegroundColor;ba.shapeBackgroundColor=Q.shapeBackgroundColor;ja=!0;qa=!1;var Ja=null,Ga=null;
+null==na.viewState&&null==na.root&&n.updatePageRoot(na);null!=na.viewState&&(ja=na.viewState.pageVisible,qa=na.viewState.mathEnabled,Ja=na.viewState.background,Ga=na.viewState.backgroundImage,ba.extFonts=na.viewState.extFonts);null!=Ga&&null!=Ga.originalSrc&&(Ga=n.createImageForPageLink(Ga.originalSrc,na));ba.background=Ja;ba.backgroundImage=null!=Ga?new mxImage(Ga.src,Ga.width,Ga.height,Ga.x,Ga.y):null;ba.pageVisible=ja;ba.mathEnabled=qa;var Ra=ba.getGraphBounds;ba.getGraphBounds=function(){var Ha=
+Ra.apply(this,arguments),Na=this.backgroundImage;if(null!=Na&&null!=Na.width&&null!=Na.height){var Pa=this.view.translate,Qa=this.view.scale;Ha=mxRectangle.fromRectangle(Ha);Ha.add(new mxRectangle((Pa.x+Na.x)*Qa,(Pa.y+Na.y)*Qa,Na.width*Qa,Na.height*Qa))}return Ha};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ha){return"page"==Ha?na.getName():"pagenumber"==Ha?oa+1:"pagecount"==Ha?null!=n.pages?n.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);n.updatePageRoot(na);
+ba.model.setRoot(na.root)}ma=wa(ba,ma,oa!=ia);ba!=Q&&ba.container.parentNode.removeChild(ba.container)}}else ma=wa(Q);null==ma?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(Q.shapeForegroundColor=fa,Q.shapeBackgroundColor=ca,Q.stylesheet=
+xa,Q.refresh())}}var Q=n.editor.graph,O=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,C||mxResources.get("print"));O.appendChild(S);var Y=1,da=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ha=document.createElement("input");ha.style.cssText="margin-right:8px;margin-bottom:8px;";ha.setAttribute("value","all");ha.setAttribute("type",
+"radio");ha.setAttribute("name","pages-printdialog");S.appendChild(ha);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));S.appendChild(C);mxUtils.br(S);var Z=ha.cloneNode(!0);ha.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");S.appendChild(C);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("type",
+"number");ea.setAttribute("min","1");ea.style.width="50px";S.appendChild(ea);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));S.appendChild(C);var aa=ea.cloneNode(!0);S.appendChild(aa);mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"change",J);mxEvent.addListener(aa,"change",J);if(null!=n.pages&&(Y=n.pages.length,null!=n.currentPage))for(C=0;C<n.pages.length;C++)if(n.currentPage==n.pages[C]){da=
+C+1;ea.value=da;aa.value=da;break}ea.setAttribute("max",Y);aa.setAttribute("max",Y);n.isPagesEnabled()?1<Y&&(O.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var va=document.createElement("input");va.setAttribute("value","all");va.setAttribute("type","radio");va.style.marginRight="8px";Q.isSelectionEmpty()&&va.setAttribute("disabled","disabled");var la=document.createElement("div");la.style.marginBottom="10px";1==Y?(va.setAttribute("type","checkbox"),va.style.marginBottom="12px",la.appendChild(va)):
+(va.setAttribute("name","pages-printdialog"),va.style.marginBottom="8px",S.appendChild(va));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));va.parentNode.appendChild(C);1==Y&&mxUtils.br(va.parentNode);var Aa=document.createElement("input");Aa.style.marginRight="8px";Aa.setAttribute("value","adjust");Aa.setAttribute("type","radio");Aa.setAttribute("name","printZoom");la.appendChild(Aa);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo"));
+la.appendChild(C);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","100 %");Ba.style.width="50px";la.appendChild(Ba);mxEvent.addListener(Ba,"focus",function(){Aa.checked=!0});O.appendChild(la);S=S.cloneNode(!1);var ua=Aa.cloneNode(!0);ua.setAttribute("value","fit");Aa.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(ua);S.appendChild(C);la=
document.createElement("table");la.style.display="inline-block";var Da=document.createElement("tbody"),Fa=document.createElement("tr"),Ka=Fa.cloneNode(!0),Oa=document.createElement("td"),Ia=Oa.cloneNode(!0),Ea=Oa.cloneNode(!0),Ca=Oa.cloneNode(!0),Ma=Oa.cloneNode(!0),za=Oa.cloneNode(!0);Oa.style.textAlign="right";Ca.style.textAlign="right";mxUtils.write(Oa,mxResources.get("fitTo"));var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","1");ta.setAttribute("min",
"1");ta.setAttribute("type","number");ta.style.width="40px";Ia.appendChild(ta);C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsAcross"));Ea.appendChild(C);mxUtils.write(Ca,mxResources.get("fitToBy"));var ka=ta.cloneNode(!0);Ma.appendChild(ka);mxEvent.addListener(ta,"focus",function(){ua.checked=!0});mxEvent.addListener(ka,"focus",function(){ua.checked=!0});C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsDown"));za.appendChild(C);Fa.appendChild(Oa);
-Fa.appendChild(Ia);Fa.appendChild(Ea);Ka.appendChild(Ca);Ka.appendChild(Ma);Ka.appendChild(za);Da.appendChild(Fa);Da.appendChild(Ka);la.appendChild(Da);R.appendChild(la);O.appendChild(R);R=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));R.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(C,"printdialog",p.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));R.appendChild(C);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";R.appendChild(sa);O.appendChild(R);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){p.hideDialog()});R.className="geBtn";p.editor.cancelFirst&&
-C.appendChild(R);p.isOffline()||(la=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),la.className="geBtn",C.appendChild(la));PrintDialog.previewEnabled&&(la=mxUtils.button(mxResources.get("preview"),function(){p.hideDialog();T(!1)}),la.className="geBtn",C.appendChild(la));la=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){p.hideDialog();T(!0)});la.className="geBtn gePrimaryBtn";C.appendChild(la);p.editor.cancelFirst||
-C.appendChild(R);O.appendChild(C);this.container=O};var W=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 W.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 V=document.createElement("canvas"),X=new Image;X.onload=function(){try{V.getContext("2d").drawImage(X,0,0);var p=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=p&&6<p.length}catch(C){}};X.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){}})();
+Fa.appendChild(Ia);Fa.appendChild(Ea);Ka.appendChild(Ca);Ka.appendChild(Ma);Ka.appendChild(za);Da.appendChild(Fa);Da.appendChild(Ka);la.appendChild(Da);S.appendChild(la);O.appendChild(S);S=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));S.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(C,"printdialog",n.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));S.appendChild(C);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";S.appendChild(sa);O.appendChild(S);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});S.className="geBtn";n.editor.cancelFirst&&
+C.appendChild(S);n.isOffline()||(la=mxUtils.button(mxResources.get("help"),function(){Q.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),la.className="geBtn",C.appendChild(la));PrintDialog.previewEnabled&&(la=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();T(!1)}),la.className="geBtn",C.appendChild(la));la=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){n.hideDialog();T(!0)});la.className="geBtn gePrimaryBtn";C.appendChild(la);n.editor.cancelFirst||
+C.appendChild(S);O.appendChild(C);this.container=O};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else V.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 U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var n=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(C){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,k,m,q,v){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var y=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=y+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
-encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(q,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+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(c,e,g,k,m,p,v){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
+encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(z){}try{v||null==window.console||console.error(p,c,e,g,k,m)}catch(z){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(m){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var m=
-e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.length}catch(q){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{e=document.createElement("canvas");e.width=e.height=1;var k=e.toDataURL("image/jpeg");
+e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.length}catch(p){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{e=document.createElement("canvas");e.width=e.height=1;var k=e.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==k.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=m.spin;m.spin=function(y,A){var z=!1;this.active||(q.call(this,y),this.active=!0,null!=A&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),z=document.createElement("div"),
-z.style.position="absolute",z.style.whiteSpace="nowrap",z.style.background="#4B4243",z.style.color="white",z.style.fontFamily=Editor.defaultHtmlFont,z.style.fontSize="9pt",z.style.padding="6px",z.style.paddingLeft="10px",z.style.paddingRight="10px",z.style.zIndex=2E9,z.style.left=Math.max(0,c)+"px",z.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(z.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(z.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),z.innerHTML=A,y.appendChild(z),m.status=z),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(y,A)}));this.stop();return L}),z=!0);return z};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=m.spin;m.spin=function(x,z){var y=!1;this.active||(p.call(this,x),this.active=!0,null!=z&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
+y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),y.innerHTML=z,x.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,z)}));this.stop();return L}),y=!0);return y};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
return m};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(k){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,k=this.editor.graph,m=this;e.getFunction=function(q){if(k.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var v=m.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<v&&m.movePage(v,v-1)};if(38==q.keyCode)return function(){0<v&&m.movePage(v,0)};if(39==q.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,
-v+1)};if(40==q.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,m.pages.length-1)}}else if(mxEvent.isControlDown(q)||mxClient.IS_MAC&&mxEvent.isMetaDown(q)){if(37==q.keyCode)return function(){0<v&&m.selectNextPage(!1)};if(38==q.keyCode)return function(){0<v&&m.selectPage(m.pages[0])};if(39==q.keyCode)return function(){v<m.pages.length-1&&m.selectNextPage(!0)};if(40==q.keyCode)return function(){v<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return g.apply(this,arguments)}}return e};
-var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var k=c.lastIndexOf("&lt;/mxfile&gt;");k>g&&(e=c.substring(g,k+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var m=mxUtils.parseXml(c),q=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=
-q?mxUtils.getXml(q):""}}catch(v){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;
-e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,k=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<k.length||1==k.length&&k[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=k.length-1;0<=m;m--){var q=this.updatePageRoot(new DiagramPage(k[m]));null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[m+1]));e.model.execute(new ChangePage(this,q,0==m?q:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,k=this.editor.graph,m=this;e.getFunction=function(p){if(k.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var v=m.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<v&&m.movePage(v,v-1)};if(38==p.keyCode)return function(){0<v&&m.movePage(v,0)};if(39==p.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,
+v+1)};if(40==p.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,m.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<v&&m.selectNextPage(!1)};if(38==p.keyCode)return function(){0<v&&m.selectPage(m.pages[0])};if(39==p.keyCode)return function(){v<m.pages.length-1&&m.selectNextPage(!0)};if(40==p.keyCode)return function(){v<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return g.apply(this,arguments)}}return e};
+var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var k=c.lastIndexOf("&lt;/mxfile&gt;");k>g&&(e=c.substring(g,k+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var m=mxUtils.parseXml(c),p=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=
+p?mxUtils.getXml(p):""}}catch(v){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;
+e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,k=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<k.length||1==k.length&&k[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=k.length-1;0<=m;m--){var p=this.updatePageRoot(new DiagramPage(k[m]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[m+1]));e.model.execute(new ChangePage(this,p,0==m?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(m=0;m<g.length;m++)e.model.execute(new ChangePage(this,g[m],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(c,e,g,k,m,q,v,y,A,z,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;A=null!=A?A:!0;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var n="_blank";else M=n=k;if(null==c)return"";var x=c;if("mxfile"!=x.nodeName.toLowerCase()){if(L){var K=c.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());K.appendChild(c)}else{K=Graph.zapGremlins(mxUtils.getXml(c));x=Graph.compress(K);if(Graph.decompress(x)!=K)return K;K=c.ownerDocument.createElement("diagram");
-K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,x)}x=c.ownerDocument.createElement("mxfile");x.appendChild(K)}z?(x=x.cloneNode(!0),x.removeAttribute("modified"),x.removeAttribute("host"),x.removeAttribute("agent"),x.removeAttribute("etag"),x.removeAttribute("userAgent"),x.removeAttribute("version"),x.removeAttribute("editor"),x.removeAttribute("type")):(x.removeAttribute("userAgent"),x.removeAttribute("version"),x.removeAttribute("editor"),x.removeAttribute("pages"),x.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?x.setAttribute("host","Chrome"):EditorUi.isElectronApp?x.setAttribute("host","Electron"):x.setAttribute("host",window.location.hostname),x.setAttribute("modified",(new Date).toISOString()),x.setAttribute("agent",navigator.appVersion),x.setAttribute("version",EditorUi.VERSION),x.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&x.setAttribute("type",c),1<x.getElementsByTagName("diagram").length&&null!=this.pages&&x.setAttribute("pages",this.pages.length));
-L=L?mxUtils.getPrettyXml(x):mxUtils.getXml(x);if(!q&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(x),e,null!=g?g.getTitle():null,n,M);else if(q||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,y,A,M);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
-if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(A){var z=A.getElementsByTagName("mxGraphModel");z=0<z.length?z[0]:null;null==z&&g?(z=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<z.length&&(z=Graph.decompress(z),null!=z&&0<z.length&&A.appendChild(mxUtils.parseXml(z).documentElement))):null==z||g?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(z)));m.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
-Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var q=this.pages[e],v=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,k);EditorUi.removeChildNodes(v);mxUtils.setTextContent(v,Graph.compressNode(y));delete q.needsUpdate}else k&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?
-q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,k),v=v.cloneNode(!1),mxUtils.setTextContent(v,
-Graph.compressNode(y))));c(v)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],k=0;k<c.length;k++){var m=c.charAt(k);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
-function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(q){c[EditorUi.DIFF_INSERT][e].data=q.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var k in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][k];null!=m.name&&
-(m.name=this.anonymizeString(m.name));null!=m.cells&&(e=mxUtils.bind(this,function(q){var v=m.cells[q];if(null!=v){for(var y in v)null!=v[y].value&&(v[y].value="["+v[y].value.length+"]"),null!=v[y].xmlValue&&(v[y].xmlValue="["+v[y].xmlValue.length+"]"),null!=v[y].style&&(v[y].style="["+v[y].style.length+"]"),mxUtils.isEmptyObject(v[y])&&delete v[y];mxUtils.isEmptyObject(v)&&delete m.cells[q]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&
+function(c,e,g,k,m,p,v,x,z,y,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;z=null!=z?z:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var K="_blank";else N=K=k;if(null==c)return"";var q=c;if("mxfile"!=q.nodeName.toLowerCase()){if(L){var E=c.ownerDocument.createElement("diagram");E.setAttribute("id",Editor.guid());E.appendChild(c)}else{E=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(E);if(Graph.decompress(q)!=E)return E;E=c.ownerDocument.createElement("diagram");
+E.setAttribute("id",Editor.guid());mxUtils.setTextContent(E,q)}q=c.ownerDocument.createElement("mxfile");q.appendChild(E)}y?(q=q.cloneNode(!0),q.removeAttribute("modified"),q.removeAttribute("host"),q.removeAttribute("agent"),q.removeAttribute("etag"),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("pages"),q.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?q.setAttribute("host","Chrome"):EditorUi.isElectronApp?q.setAttribute("host","Electron"):q.setAttribute("host",window.location.hostname),q.setAttribute("modified",(new Date).toISOString()),q.setAttribute("agent",navigator.appVersion),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&q.setAttribute("type",c),1<q.getElementsByTagName("diagram").length&&null!=this.pages&&q.setAttribute("pages",this.pages.length));
+L=L?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!p&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(q),e,null!=g?g.getTitle():null,K,N);else if(p||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,z,N);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
+if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(z){var y=z.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&z.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(y)));m.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var p=this.pages[e],v=p.node;if(p!=this.currentPage)if(p.needsUpdate){var x=new mxCodec(mxUtils.createXmlDocument());x=x.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,x,null,k);EditorUi.removeChildNodes(v);mxUtils.setTextContent(v,Graph.compressNode(x));delete p.needsUpdate}else k&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?
+p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(x=new mxCodec(mxUtils.createXmlDocument()),x=x.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,x,null,k),v=v.cloneNode(!1),mxUtils.setTextContent(v,
+Graph.compressNode(x))));c(v)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],k=0;k<c.length;k++){var m=c.charAt(k);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
+function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(p){c[EditorUi.DIFF_INSERT][e].data=p.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var k in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][k];null!=m.name&&
+(m.name=this.anonymizeString(m.name));null!=m.cells&&(e=mxUtils.bind(this,function(p){var v=m.cells[p];if(null!=v){for(var x in v)null!=v[x].value&&(v[x].value="["+v[x].value.length+"]"),null!=v[x].xmlValue&&(v[x].xmlValue="["+v[x].xmlValue.length+"]"),null!=v[x].style&&(v[x].style="["+v[x].style.length+"]"),mxUtils.isEmptyObject(v[x])&&delete v[x];mxUtils.isEmptyObject(v)&&delete m.cells[p]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&
delete c[EditorUi.DIFF_UPDATE][k]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");
for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],
e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,
-function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,q,v,y,A,z,L){m=null!=m?m:!0;q=null!=q?q:!1;var M=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var n=null!=M.themes&&"darkTheme"==M.defaultThemeName;z=!1;if(n||null!=this.pages&&this.currentPage!=this.pages[0]){var x=M.getGlobalVariable;M=this.createTemporaryGraph(n?M.getDefaultStylesheet():M.getStylesheet());
-M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var K=this.pages[0];this.currentPage==K?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&M.setBackgroundImage(K.viewState.backgroundImage);M.getGlobalVariable=function(B){return"page"==B?K.getName():"pagenumber"==B?1:x.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(K.root)}}v=null!=v?v:this.getXmlFileData(m,q,z,L);A=null!=A?
-A:this.getCurrentFile();c=this.createFileData(v,M,A,window.location.href,c,e,g,k,m,y,z);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,q){q=null!=q?q:!0;var v=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=q?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var A=e.view.scale;q=Math.floor(v.x/A-e.view.translate.x);A=Math.floor(v.y/A-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
-0<e.length&&(y=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",q);c.setAttribute("y0",A)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,p,v,x,z,y,L){m=null!=m?m:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var K=null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(K||null!=this.pages&&this.currentPage!=this.pages[0]){var q=N.getGlobalVariable;N=this.createTemporaryGraph(K?N.getDefaultStylesheet():N.getStylesheet());
+N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var E=this.pages[0];this.currentPage==E?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=E.viewState&&null!=E.viewState&&N.setBackgroundImage(E.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A?E.getName():"pagenumber"==A?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(E.root)}}v=null!=v?v:this.getXmlFileData(m,p,y,L);z=null!=z?
+z:this.getCurrentFile();c=this.createFileData(v,N,z,window.location.href,c,e,g,k,m,x,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,p){p=null!=p?p:!0;var v=null,x=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var z=e.view.scale;p=Math.floor(v.x/z-e.view.translate.x);z=Math.floor(v.y/z-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
+0<e.length&&(x=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",z)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=v&&v!=mxConstants.NONE?' style="background-color:'+v+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+k+"</div>\n</div>\n"+
-(null==m?'<script type="text/javascript" src="'+y+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,k,m){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
+(null==m?'<script type="text/javascript" src="'+x+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,k,m){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+
m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),
"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var k=0;k<c.length;k++)null==c[k].getAttribute("id")&&c[k].setAttribute("id",k),e=new DiagramPage(c[k]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[k+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=
-urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");e={};for(k=0;k<m.length;k++)e[m[k]]=!0;var q=this.editor.graph.getModel(),
-v=q.getChildren(q.root);for(k=0;k<v.length;k++){var y=v[k];q.setVisible(y,e[y.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,q,v,y,A,z,L,M){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var n=this.getBaseFilename("remoteSvg"==c?!1:!m),x=n+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var K=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(x,c,K,"text/xml")}else if("html"==c)K=this.getHtml2(this.getFileData(!0),this.editor.graph,
-n),this.saveData(x,c,K,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)x=n+".png";else if("jpeg"==c)x=n+".jpg";else if("remoteSvg"==c){x=n+".svg";c="svg";var B=parseInt(A);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var F=this.editor.graph,G=F.getGraphBounds();var N=Math.ceil(G.width*y/F.view.scale+2*B);var J=Math.ceil(G.height*y/F.view.scale+2*B)}}this.saveRequest(x,c,mxUtils.bind(this,function(Q,W){try{var V=
-this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(Q,c,k,W,v,m,y,A,z,L,M,N,J);this.editor.graph.pageVisible=V;return X}catch(p){this.handleError(p)}}))}else{var E=null,H=mxUtils.bind(this,function(Q){Q.length<=MAX_REQUEST_SIZE?this.saveData(x,"svg",Q,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(E)}))});if("svg"==c){var S=this.editor.graph.background;
-if(v||S==mxConstants.NONE)S=null;var U=this.editor.graph.getSvg(S,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(Q){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(Q))})))}else x=n+".svg",E=this.getFileData(!1,!0,null,mxUtils.bind(this,function(Q){this.spinner.stop();H(Q)}),k)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,q,v,y,A,
-z,L,M,n){var x=this.editor.graph,K=x.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==q?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var B="",F="";if(K.width*K.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==e&&(null!=L?F="&from="+L.from+"&to="+L.to:0==q&&(F="&allPages=1"));"xmlpng"==e&&(z="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
-"&from="+q;break}q=x.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;m={globalVars:x.getExportVariables()};A&&(m.grid={size:x.gridSize,steps:x.view.gridSteps,color:x.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+B+F+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+k+"&embedXml="+z+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
-"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=y?"&border="+y:"")+(M&&isFinite(M)?"&w="+M:"")+(n&&isFinite(n)?"&h="+n:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(q){var v=null!=c.data?c.data:"";null!=q&&0<q.length&&(0<v.length&&(v+="\n"),v+=q);q=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);q.getHash=function(){return k};this.fileLoaded(q);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var y=null!=c.interval?parseInt(c.interval):6E4,A=null,z=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(n){M===this.currentPage&&(200<=
-n.getStatus()&&300>=n.getStatus()?(this.updateDiagram(n.getText()),L()):this.handleError({message:mxResources.get("error")+" "+n.getStatus()}))}),mxUtils.bind(this,function(n){this.handleError(n)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(z,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();z()}));L();z()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(q){m(q)}),mxUtils.bind(this,function(q){null!=
-g&&g(q)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(J){var E=new mxCellOverlay(J.image||m.warningImage,J.tooltip,J.align,J.valign,J.offset);E.addListener(mxEvent.CLICK,function(H,S){k.alert(J.tooltip)});return E}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,q=m.getModel();q.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var y=q.getCell(c.getAttribute("id"));
-if(null!=y){try{var A=c.getAttribute("value");if(null!=A){var z=mxUtils.parseXml(A).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))q.setValue(y,z);else for(var L=z.attributes,M=0;M<L.length;M++)m.setAttributeForCell(y,L[M].nodeName,0<L[M].nodeValue.length?L[M].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+y.id+": "+J)}try{var n=c.getAttribute("style");null!=n&&m.model.setStyle(y,n)}catch(J){null!=window.console&&console.log("Error in style for "+
-y.id+": "+J)}try{var x=c.getAttribute("icon");if(null!=x){var K=0<x.length?JSON.parse(x):null;null!=K&&K.append||m.removeCellOverlays(y);null!=K&&m.addCellOverlay(y,e(K))}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}try{var B=c.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var F=m.getCellGeometry(y);if(null!=F){F=F.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?F.x+=G:"dy"==key?F.y+=G:"dw"==key?F.width+=G:"dh"==key?F.height+=G:F[key]=parseFloat(B[key])}m.model.setGeometry(y,
-F)}}}catch(J){null!=window.console&&console.log("Error in icon for "+y.id+": "+J)}}}else if("model"==c.nodeName){for(var N=c.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(c.firstChild)).decode(N,q)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==
-c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var q=m.getDate(),v=m.getHours(),y=m.getMinutes();m=m.getSeconds();
-g=e+(" "+(g+"-"+k+"-"+q+"-"+v+"-"+y+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!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 m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
+urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");e={};for(k=0;k<m.length;k++)e[m[k]]=!0;var p=this.editor.graph.getModel(),
+v=p.getChildren(p.root);for(k=0;k<v.length;k++){var x=v[k];p.setVisible(x,e[x.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,p,v,x,z,y,L,N){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var K=this.getBaseFilename("remoteSvg"==c?!1:!m),q=K+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var E=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,E,"text/xml")}else if("html"==c)E=this.getHtml2(this.getFileData(!0),this.editor.graph,
+K),this.saveData(q,c,E,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)q=K+".png";else if("jpeg"==c)q=K+".jpg";else if("remoteSvg"==c){q=K+".svg";c="svg";var A=parseInt(z);"string"===typeof x&&0<x.indexOf("%")&&(x=parseInt(x)/100);if(0<A){var B=this.editor.graph,G=B.getGraphBounds();var M=Math.ceil(G.width*x/B.view.scale+2*A);var H=Math.ceil(G.height*x/B.view.scale+2*A)}}this.saveRequest(q,c,mxUtils.bind(this,function(P,V){try{var U=
+this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var X=this.createDownloadRequest(P,c,k,V,v,m,x,z,y,L,N,M,H);this.editor.graph.pageVisible=U;return X}catch(n){this.handleError(n)}}))}else{var F=null,I=mxUtils.bind(this,function(P){P.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==c){var R=this.editor.graph.background;
+if(v||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(P){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(P))})))}else q=K+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(P){this.spinner.stop();I(P)}),k)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,z,
+y,L,N,K){var q=this.editor.graph,E=q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var A="",B="";if(E.width*E.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==e&&(null!=L?B="&from="+L.from+"&to="+L.to:0==p&&(B="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){A=
+"&from="+p;break}p=q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;m={globalVars:q.getExportVariables()};z&&(m.grid={size:q.gridSize,steps:q.view.gridSteps,color:q.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+A+B+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+k+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(N&&isFinite(N)?"&w="+N:"")+(K&&isFinite(K)?"&h="+K:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(p){var v=null!=c.data?c.data:"";null!=p&&0<p.length&&(0<v.length&&(v+="\n"),v+=p);p=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);p.getHash=function(){return k};this.fileLoaded(p);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(N){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,z=null,y=mxUtils.bind(this,function(){var N=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(K){N===this.currentPage&&(200<=
+K.getStatus()&&300>=K.getStatus()?(this.updateDiagram(K.getText()),L()):this.handleError({message:mxResources.get("error")+" "+K.getStatus()}))}),mxUtils.bind(this,function(K){this.handleError(K)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(y,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();y()}));L();y()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(p){m(p)}),mxUtils.bind(this,function(p){null!=
+g&&g(p)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(H){var F=new mxCellOverlay(H.image||m.warningImage,H.tooltip,H.align,H.valign,H.offset);F.addListener(mxEvent.CLICK,function(I,R){k.alert(H.tooltip)});return F}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,p=m.getModel();p.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=p.getCell(c.getAttribute("id"));
+if(null!=x){try{var z=c.getAttribute("value");if(null!=z){var y=mxUtils.parseXml(z).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(x,y);else for(var L=y.attributes,N=0;N<L.length;N++)m.setAttributeForCell(x,L[N].nodeName,0<L[N].nodeValue.length?L[N].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+x.id+": "+H)}try{var K=c.getAttribute("style");null!=K&&m.model.setStyle(x,K)}catch(H){null!=window.console&&console.log("Error in style for "+
+x.id+": "+H)}try{var q=c.getAttribute("icon");if(null!=q){var E=0<q.length?JSON.parse(q):null;null!=E&&E.append||m.removeCellOverlays(x);null!=E&&m.addCellOverlay(x,e(E))}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}try{var A=c.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var B=m.getCellGeometry(x);if(null!=B){B=B.clone();for(key in A){var G=parseFloat(A[key]);"dx"==key?B.x+=G:"dy"==key?B.y+=G:"dw"==key?B.width+=G:"dh"==key?B.height+=G:B[key]=parseFloat(A[key])}m.model.setGeometry(x,
+B)}}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}}}else if("model"==c.nodeName){for(var M=c.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(c.firstChild)).decode(M,p)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==
+c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{p.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var p=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds();
+g=e+(" "+(g+"-"+k+"-"+p+"-"+v+"-"+x+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!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 m=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);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
"");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):
-this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));k=!0;if(!this.isOffline()&&null!=c.getMode()){var q=
-"1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=
-c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(y){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var q=0;q<c.length;q++){this.updatePageRoot(c[q]);var v=c[q].node.cloneNode(!1);v.removeAttribute("name");k.root=c[q].root;
-var y=m.encode(k);this.editor.graph.saveViewState(c[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");v.appendChild(y);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(A,z,L,M){return!M||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=z&&"y"!=z&&"width"!=z&&"height"!=z?M&&"mxCell"==A.nodeName&&"previous"==z?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
-function(c,e,g){var k=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(k^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var q=c.attributes[m].name,v=null!=e?e(c,q,c.attributes[m].value,!0):c.attributes[m].value;null!=v&&(k^=this.hashValue(q,e,g)+this.hashValue(v,e,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)k=
-(k<<5)-k+this.hashValue(c.childNodes[m],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)e=(e<<5)-e+c.charCodeAt(m)<<0;k^=e}return k};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,k,m,q,v){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
+this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));k=!0;if(!this.isOffline()&&null!=c.getMode()){var p=
+"1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=
+c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(x){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(x){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
+mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var p=0;p<c.length;p++){this.updatePageRoot(c[p]);var v=c[p].node.cloneNode(!1);v.removeAttribute("name");k.root=c[p].root;
+var x=m.encode(k);this.editor.graph.saveViewState(c[p].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(z,y,L,N){return!N||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==z.nodeName&&"previous"==y?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
+function(c,e,g){var k=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(k^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var p=c.attributes[m].name,v=null!=e?e(c,p,c.attributes[m].value,!0):c.attributes[m].value;null!=v&&(k^=this.hashValue(p,e,g)+this.hashValue(v,e,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)k=
+(k<<5)-k+this.hashValue(c.childNodes[m],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)e=(e<<5)-e+c.charCodeAt(m)<<0;k^=e}return k};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,k,m,p,v){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-
1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var k=g.previousSibling;e.insertBefore(g,c);e.insertBefore(k,g)};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var k=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,k,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};
-EditorUi.prototype.libraryLoaded=function(c,e,g,k){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var q=null,v=mxUtils.bind(this,function(N,J){0==N.length&&c.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
-J.appendChild(q)):this.addLibraryEntries(N,J)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var y=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(N){v(e,N)}));this.repositionLibrary(m);var A=y.parentNode.previousSibling;k=A.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&A.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var z=document.createElement("div");
-z.style.position="absolute";z.style.right="0px";z.style.top="0px";z.style.padding="8px";z.style.backgroundColor="inherit";A.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
-var M=null;if(".scratchpad"!=c.title||this.closableScratchpad)z.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var J=mxUtils.bind(this,function(){this.closeLibrary(c)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(N)}}));if(c.isEditable()){var n=this.editor.graph,x=null,K=mxUtils.bind(this,function(N){this.showLibraryDialog(c.getTitle(),y,e,c,c.getMode());
-mxEvent.consume(N)}),B=mxUtils.bind(this,function(N){c.setModified(!0);c.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=L.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",z.insertBefore(x,z.firstChild),A.style.paddingRight=18*z.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=x&&null!=x.parentNode&&(x.parentNode.removeChild(x),
-A.style.paddingRight=18*z.childNodes.length+"px")})):null==M&&(M=L.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",mxResources.get("save")),z.insertBefore(M,z.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(J){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==M||c.isModified()||(A.style.paddingRight=18*z.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(J)})),A.style.paddingRight=
-18*z.childNodes.length+"px")}),F=mxUtils.bind(this,function(N,J,E,H){N=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(N)));for(var S=0;S<N.length;S++){var U=n.getCellGeometry(N[S]);null!=U&&U.translate(-J.x,-J.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,J.width,J.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:J.width,h:J.height};null!=H&&(N.title=H);e.push(N);B(E);null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),
-q=null)}),G=mxUtils.bind(this,function(N){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(N),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=n.getSelectionCells(),E=n.view.getBounds(J),H=n.view.scale;E.x/=H;E.y/=H;E.width/=H;E.height/=H;E.x-=n.view.translate.x;E.y-=n.view.translate.y;F(J,E)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){n.isMouseDown&&
-null!=n.panningManager&&null!=n.graphHandler.first&&(n.graphHandler.suspend(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=
-!1,n.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){n.isMouseDown&&null!=n.graphHandler.first&&(n.graphHandler.resume(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",n.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(N){y.style.backgroundColor="#f1f3f4";N.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
-N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,E,H,S,U,Q,W,V,X){if(null!=J&&"image/"==E.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,U,Q),J)],J[0].vertex=!0,
-F(J,new mxRectangle(0,0,U,Q),N,mxEvent.isAltDown(N)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),q=null);else{var p=!1,C=mxUtils.bind(this,function(I,T){null!=I&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(I),null!=T&&0<T.length&&(I=T));if(null!=I)if(I=mxUtils.parseXml(I),"mxlibrary"==I.documentElement.nodeName)try{var P=JSON.parse(mxUtils.getTextContent(I.documentElement));v(P,y);e=e.concat(P);B(N);this.spinner.stop();
-p=!0}catch(da){}else if("mxfile"==I.documentElement.nodeName)try{var O=I.documentElement.getElementsByTagName("diagram");for(P=0;P<O.length;P++){var R=this.stringToCells(Editor.getDiagramNodeXml(O[P])),Y=this.editor.graph.getBoundingBoxFromGeometry(R);F(R,new mxRectangle(0,0,Y.width,Y.height),N)}p=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<e.length&&
-(q.parentNode.removeChild(q),q=null)});null!=X&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(I){C(I,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,W)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(I){4==I.readyState&&(this.spinner.stop(),200<=I.status&&299>=I.status?C(I.responseText,"text/xml"):this.handleError({message:mxResources.get(413==I.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):C(J,E)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));z.insertBefore(L,z.firstChild);mxEvent.addListener(L,"click",K);mxEvent.addListener(y,
-"dblclick",function(N){mxEvent.getSource(N)==y&&K(N)});k=L.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));z.insertBefore(k,z.firstChild);mxEvent.addListener(k,"click",G);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=document.createElement("span"),k.setAttribute("title",mxResources.get("help")),k.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(k,"?"),mxEvent.addGestureListeners(k,
-mxUtils.bind(this,function(N){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(N)})),z.insertBefore(k,z.firstChild))}A.appendChild(z);A.style.paddingRight=18*z.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(q+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(q+
+EditorUi.prototype.libraryLoaded=function(c,e,g,k){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var p=null,v=mxUtils.bind(this,function(M,H){0==M.length&&c.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),
+H.appendChild(p)):this.addLibraryEntries(M,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var x=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(M){v(e,M)}));this.repositionLibrary(m);var z=x.parentNode.previousSibling;k=z.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&z.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var y=document.createElement("div");
+y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";z.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
+var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(M){if(!mxEvent.isConsumed(M)){var H=mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(M)}}));if(c.isEditable()){var K=this.editor.graph,q=null,E=mxUtils.bind(this,function(M){this.showLibraryDialog(c.getTitle(),x,e,c,c.getMode());
+mxEvent.consume(M)}),A=mxUtils.bind(this,function(M){c.setModified(!0);c.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=L.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",y.insertBefore(q,y.firstChild),z.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),
+z.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=L.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(z.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(H)})),z.style.paddingRight=
+18*y.childNodes.length+"px")}),B=mxUtils.bind(this,function(M,H,F,I){M=K.cloneCells(mxUtils.sortCells(K.model.getTopmostCells(M)));for(var R=0;R<M.length;R++){var W=K.getCellGeometry(M[R]);null!=W&&W.translate(-H.x,-H.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(M,H.width,H.height,I||"",!0,null,!1));M={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(M))),w:H.width,h:H.height};null!=I&&(M.title=I);e.push(M);A(F);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),
+p=null)}),G=mxUtils.bind(this,function(M){if(K.isSelectionEmpty())K.getRubberband().isActive()?(K.getRubberband().execute(M),K.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=K.getSelectionCells(),F=K.view.getBounds(H),I=K.view.scale;F.x/=I;F.y/=I;F.width/=I;F.height/=I;F.x-=K.view.translate.x;F.y-=K.view.translate.y;B(H,F)}mxEvent.consume(M)});mxEvent.addGestureListeners(x,function(){},mxUtils.bind(this,function(M){K.isMouseDown&&
+null!=K.panningManager&&null!=K.graphHandler.first&&(K.graphHandler.suspend(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="hidden"),x.style.backgroundColor="#f1f3f4",x.style.cursor="copy",K.panningManager.stop(),K.autoScroll=!1,mxEvent.consume(M))}),mxUtils.bind(this,function(M){K.isMouseDown&&null!=K.panningManager&&null!=K.graphHandler&&(x.style.backgroundColor="",x.style.cursor="default",this.sidebar.showTooltips=!0,K.panningManager.stop(),K.graphHandler.reset(),K.isMouseDown=
+!1,K.autoScroll=!0,G(M),mxEvent.consume(M))}));mxEvent.addListener(x,"mouseleave",mxUtils.bind(this,function(M){K.isMouseDown&&null!=K.graphHandler.first&&(K.graphHandler.resume(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="visible"),x.style.backgroundColor="",x.style.cursor="",K.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(M){x.style.backgroundColor="#f1f3f4";M.dataTransfer.dropEffect="copy";x.style.cursor="copy";this.sidebar.hideTooltip();
+M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"drop",mxUtils.bind(this,function(M){x.style.cursor="";x.style.backgroundColor="";0<M.dataTransfer.files.length&&this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,F,I,R,W,P,V,U,X){if(null!=H&&"image/"==F.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,W,P),H)],H[0].vertex=!0,
+B(H,new mxRectangle(0,0,W,P),M,mxEvent.isAltDown(M)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var n=!1,C=mxUtils.bind(this,function(J,T){null!=J&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(J),null!=T&&0<T.length&&(J=T));if(null!=J)if(J=mxUtils.parseXml(J),"mxlibrary"==J.documentElement.nodeName)try{var Q=JSON.parse(mxUtils.getTextContent(J.documentElement));v(Q,x);e=e.concat(Q);A(M);this.spinner.stop();
+n=!0}catch(da){}else if("mxfile"==J.documentElement.nodeName)try{var O=J.documentElement.getElementsByTagName("diagram");for(Q=0;Q<O.length;Q++){var S=this.stringToCells(Editor.getDiagramNodeXml(O[Q])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);B(S,new mxRectangle(0,0,Y.width,Y.height),M)}n=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&
+(p.parentNode.removeChild(p),p=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(J){C(J,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),200<=J.status&&299>=J.status?C(J.responseText,"text/xml"):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):C(H,F)}}));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"dragleave",function(M){x.style.cursor="";x.style.backgroundColor="";M.stopPropagation();M.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));y.insertBefore(L,y.firstChild);mxEvent.addListener(L,"click",E);mxEvent.addListener(x,
+"dblclick",function(M){mxEvent.getSource(M)==x&&E(M)});k=L.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));y.insertBefore(k,y.firstChild);mxEvent.addListener(k,"click",G);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=document.createElement("span"),k.setAttribute("title",mxResources.get("help")),k.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(k,"?"),mxEvent.addGestureListeners(k,
+mxUtils.bind(this,function(M){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(M)})),y.insertBefore(k,y.firstChild))}z.appendChild(y);z.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+
"image="+m,k.w,k.h,"",k.title||"",!1,null,!0))}else null!=k.xml&&(m=this.stringToCells(Graph.decompress(k.xml)),0<m.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(m,k.w,k.h,k.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",
STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName=
"darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource=
"https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",
-startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,k,m,q,v){c=new ImageDialog(this,c,e,g,k,m,q,v);this.showDialog(c.container,
+startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,k,m,p,v){c=new ImageDialog(this,c,e,g,k,m,p,v);this.showDialog(c.container,
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,k){k||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,k,m){c=new LibraryDialog(this,c,e,g,k,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,
-function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow=
+function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow=
"hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,
-function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,q,v){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
-c.columnNumber,c,"INFO")}catch(x){}if(null!=A||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var z=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=A){null!=A.retry&&(z=mxResources.get("cancel"),L=function(){y();A.retry()});if(404==A.code||404==A.status||403==A.code){v=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=m?null:null!=q?q:window.location.hash;if(null!=M&&("#G"==M.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==M.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==A.code||404==A.status)){M="#U"==M.substring(0,
-2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(e,v,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(c,e,g,k,m)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function x(){G.innerHTML="";for(var N=0;N<K.length;N++){var J=document.createElement("option");mxUtils.write(J,K[N].displayName);J.value=N;G.appendChild(J);J=document.createElement("option");J.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(J,"<"+K[N].email+">");J.setAttribute("disabled","disabled");G.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=K.length;G.appendChild(J)}var K=this.drive.getUsersList(),B=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");B.appendChild(F);var G=document.createElement("select");G.style.width="200px";x();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var N=G.value,J=K.length!=N;J&&this.drive.setUser(K[N]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(K=this.drive.getUsersList(),x())}),mxUtils.bind(this,function(E){this.handleError(E)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=A.message?
-v=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?v=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(v=mxUtils.htmlEntities(A)))}var n=q=null;null!=A&&null!=A.helpLink?(q=mxResources.get("help"),n=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,v,z,g,L,null,null,q,n,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
-c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,q){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,y);this.showDialog(c.container,340,46+y,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=
-mxSettings.settings["close"+c])){var q=document.createElement("div");q.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";
-m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(m);m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(k?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-q.appendChild(m);mxUtils.write(q,e);document.body.appendChild(q);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("id","geDoNotShowAgainCheckbox");v.style.marginRight="6px";if(!k){e.appendChild(v);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));e.appendChild(y);
-q.style.paddingBottom="30px";q.appendChild(e)}var A=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);A()}));var z=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(L){var M=mxEvent.getSource(L);M!=v&&M!=y?(null!=g&&g(),A(),mxEvent.consume(L)):z()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(z,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,k){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<k&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",k));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,k,m){var q="jpeg"==g?"jpg":g;k=this.getBaseFilename(k)+(null!=e?".drawio":"")+"."+q;c=this.createImageDataUri(c,
-e,g,m);this.saveData(k,q,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
-!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,q){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
-g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):
-!1)?!1:q}if(q||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),q=0;q<k;++q){for(var v=1024*q,y=Math.min(v+1024,g),A=Array(y-v),z=0;v<y;++z,++v)A[z]=c[v].charCodeAt(0);m[q]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,q,v,y){q=null!=q?q:!1;v=null!=v?v:"vsdx"!=
-m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(q);isLocalStorage&&m++;var A=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(z,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var M=new EmbedDialog(this,c);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var n=window.open("about:blank");null==n?mxUtils.popup(c,!0):(n.document.write("<pre>"+mxUtils.htmlEntities(c,
-!1)+"</pre>"),n.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,z,g,k,null,y):null!=z&&0<z.length&&this.pickFolder(L,mxUtils.bind(this,function(x){try{this.exportFile(c,z,g,k,L,x)}catch(K){this.handleError(K)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,v,null,1<m,A,c,g,k);q=this.isServices(m)?m>A?390:280:160;this.showDialog(e.container,420,q,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
+function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,p,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
+c.columnNumber,c,"INFO")}catch(q){}if(null!=z||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=z){null!=z.retry&&(y=mxResources.get("cancel"),L=function(){x();z.retry()});if(404==z.code||404==z.status||403==z.code){v=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==z.code||404==z.status)){N="#U"==N.substring(0,
+2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,v,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,k,m)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function q(){G.innerHTML="";for(var M=0;M<E.length;M++){var H=document.createElement("option");mxUtils.write(H,E[M].displayName);H.value=M;G.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(H,"<"+E[M].email+">");H.setAttribute("disabled","disabled");G.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=E.length;G.appendChild(H)}var E=this.drive.getUsersList(),A=document.createElement("div"),B=document.createElement("span");B.style.marginTop="6px";mxUtils.write(B,mxResources.get("changeUser")+": ");A.appendChild(B);var G=document.createElement("select");G.style.width="200px";q();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var M=G.value,H=E.length!=M;H&&this.drive.setUser(E[M]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(E=this.drive.getUsersList(),q())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));A.appendChild(G);A=new CustomDialog(this,A,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(A.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=z.message?
+v=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?v=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(v=mxUtils.htmlEntities(z)))}var K=p=null;null!=z&&null!=z.helpLink?(p=mxResources.get("help"),K=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(p=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+p+": "+z.ownerEmail+")"),K=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(e,v,y,g,L,null,null,p,K,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
+c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,p){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,p);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=
+mxSettings.settings["close"+c])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";
+m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(m);m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(k?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+p.appendChild(m);mxUtils.write(p,e);document.body.appendChild(p);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("id","geDoNotShowAgainCheckbox");v.style.marginRight="6px";if(!k){e.appendChild(v);var x=document.createElement("label");x.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(x,mxResources.get("doNotShowAgain"));e.appendChild(x);
+p.style.paddingBottom="30px";p.appendChild(e)}var z=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);z()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){z()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(L){var N=mxEvent.getSource(L);N!=v&&N!=x?(null!=g&&g(),z(),mxEvent.consume(L)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,k){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<k&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",k));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,k,m){var p="jpeg"==g?"jpg":g;k=this.getBaseFilename(k)+(null!=e?".drawio":"")+"."+p;c=this.createImageDataUri(c,
+e,g,m);this.saveData(k,p,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,p){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
+g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var x=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(x?parseInt(x[2],10):
+!1)?!1:p}if(p||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(z){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),p=0;p<k;++p){for(var v=1024*p,x=Math.min(v+1024,g),z=Array(x-v),y=0;v<x;++y,++v)z[y]=c[v].charCodeAt(0);m[p]=new Uint8Array(z)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,p,v,x){p=null!=p?p:!1;v=null!=v?v:"vsdx"!=
+m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(p);isLocalStorage&&m++;var z=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var K=window.open("about:blank");null==K?mxUtils.popup(c,!0):(K.document.write("<pre>"+mxUtils.htmlEntities(c,
+!1)+"</pre>"),K.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,y,g,k,null,x):null!=y&&0<y.length&&this.pickFolder(L,mxUtils.bind(this,function(q){try{this.exportFile(c,y,g,k,L,q)}catch(E){this.handleError(E)}}))}catch(q){this.handleError(q)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,v,null,1<m,z,c,g,k);p=this.isServices(m)?m>z?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
function(c,e,g){var k=window.open("about:blank");null==k||null==k.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"==e?k.document.write("<html>"+c+"</html>"):(c=g?c:btoa(unescape(encodeURIComponent(c))),k.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):k.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),k.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(k){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -11826,158 +11827,158 @@ function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.l
Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var k=this.editor.graph.getAllTags();e.style.display=0<k.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",m);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)m.apply(this);
-else{this.exportDialog=document.createElement("div");var q=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
-"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=q.zIndex;var v=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});v.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(y){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",A);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
-this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(q,v){return this.createEchoRequest(g,q,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,q,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var A=4>=y?2:6<y?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(z,L){if("_blank"==L||null!=z&&0<z.length){var M=g("_blank"==L?null:z,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");
-null!=M&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?M.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(n){q=null!=q?q:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,z,q,!0,L,n)}catch(x){this.handleError(x)}else this.spinner.spin(document.body,mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),z,q,!0,L,n)}catch(x){this.handleError(x)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(x){this.spinner.stop();this.handleError(x)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<y,A,k,q,m);y=this.isServices(y)?4<y?390:280:160;this.showDialog(c.container,420,y,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,q){};EditorUi.prototype.pickFolder=function(c,
-e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,q,v,y,A,z,L,M,n,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var K=this.editor.graph.isSelectionEmpty();g=null!=g?g:K;var B=e?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==e&&(B=L?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(B,c,v,y,null,g,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!n,L,M);k&&this.editor.graph.addSvgShadow(F);var G=
-this.getBaseFilename()+(m?".drawio":"")+".svg";x=null!=x?x:mxUtils.bind(this,function(E){this.isLocalFileSave()||E.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",E,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(E)}))});var N=mxUtils.bind(this,function(E){this.spinner.stop();m&&E.setAttribute("content",this.getFileData(!0,null,null,null,g,A,null,null,null,!1));x(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(E))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var J=mxUtils.bind(this,function(E){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(E,N,this.thumbImageCache)):N(E)});n?this.embedFonts(F,J):(this.editor.addFontCss(F),J(F))}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(c,e,g,k,m,q,v){return this.addCheckbox(c,g,k,m,q,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,q,v,
-y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=y&&A.setAttribute("name",y);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,
-e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";k=document.createElement("option");k.setAttribute("value","blank");mxUtils.write(k,mxResources.get("makeCopy"));q.appendChild(k);
-k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom")+"...");q.appendChild(k);c.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var v=new FilenameDialog(this,m,mxResources.get("ok"),function(y){null!=y?m=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(v.container,300,80,!0,!1);v.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",
-y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerHTML="";v.appendChild(y)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));
+else{this.exportDialog=document.createElement("div");var p=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=p.zIndex;var v=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});v.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(x){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(x,null,"png");x=document.createElement("img");x.style.maxWidth="140px";x.style.maxHeight="140px";x.style.cursor="pointer";x.style.backgroundColor="white";x.setAttribute("title",mxResources.get("openInNewWindow"));x.setAttribute("border","0");x.setAttribute("src",z);this.exportDialog.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
+this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,v){return this.createEchoRequest(g,p,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,p,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var z=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,L){if("_blank"==L||null!=y&&0<y.length){var N=g("_blank"==L?null:y,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");
+null!=N&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?N.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(K){p=null!=p?p:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,y,p,!0,L,K)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,p,!0,L,K)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(q){this.spinner.stop();this.handleError(q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,z,k,p,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,p){};EditorUi.prototype.pickFolder=function(c,
+e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,K,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var E=this.editor.graph.isSelectionEmpty();g=null!=g?g:E;var A=e?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==e&&(A=L?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var B=this.editor.graph.getSvg(A,c,v,x,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!K,L,N);k&&this.editor.graph.addSvgShadow(B);var G=
+this.getBaseFilename()+(m?".drawio":"")+".svg";q=null!=q?q:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var M=mxUtils.bind(this,function(F){this.spinner.stop();m&&F.setAttribute("content",this.getFileData(!0,null,null,null,g,z,null,null,null,!1));q(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(B);var H=mxUtils.bind(this,function(F){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,M,this.thumbImageCache)):M(F)});K?this.embedFonts(B,H):(this.editor.addFontCss(B),H(B))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(c,e,g,k,m,p,v){return this.addCheckbox(c,g,k,m,p,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,p,v,
+x){p=null!=p?p:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();z.id=v;null!=x&&z.setAttribute("name",x);g&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);k&&z.setAttribute("disabled","disabled");p&&(c.appendChild(z),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return z};EditorUi.prototype.addEditButton=function(c,
+e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var p=document.createElement("select");p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";k=document.createElement("option");k.setAttribute("value","blank");mxUtils.write(k,mxResources.get("makeCopy"));p.appendChild(k);
+k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom")+"...");p.appendChild(k);c.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var v=new FilenameDialog(this,m,mxResources.get("ok"),function(x){null!=x?m=x:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(v.container,300,80,!0,!1);v.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
+function(){g.checked&&(null==e||e.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===p.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return p}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(x.style.border="1px solid black",
+x.style.backgroundColor=p):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerHTML="";v.appendChild(x)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));
k.appendChild(m);m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("openInNewWindow"));k.appendChild(m);m=document.createElement("option");m.setAttribute("value","self");mxUtils.write(m,mxResources.get("openInThisWindow"));k.appendChild(m);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),k.appendChild(e));c.appendChild(k);mxUtils.write(c,mxResources.get("borderColor")+
-":");var q="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(A){q=A;g()});mxEvent.consume(y)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return q},getTarget:function(){return k.value},
-focus:function(){k.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,k,m,q,v){v=null!=v?v:[];k&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=e&&e!=mxConstants.NONE&&v.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),q&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,q,v,y,A,z){A=this.createUrlParameters(c,e,g,k,m,q,A);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),y||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
-null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));z&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,q,v,y,A,z,L,M){this.getBasenames();var n={};""!=
-m&&m!=mxConstants.NONE&&(n.highlight=m);"auto"!==k&&(n.target=k);z||(n.lightbox=!1);n.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(n.zoom=g/100);g=[];v&&(g.push("pages"),n.resize=!0,null!=this.pages&&null!=this.currentPage&&(n.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),n.resize=!0);y&&g.push("layers");A&&g.push("tags");0<g.length&&(z&&g.push("lightbox"),n.toolbar=g.join(" "));null!=L&&0<L.length&&(n.edit=L);null!=c?n.url=c:n.xml=this.getFileData(!0,
-null,null,null,null,!v);e='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(n))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";M(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
-EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(q);var v=document.createElement("div");v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");
-y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");v.appendChild(q);var A=document.createElement("span");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(A);mxUtils.br(v);v.appendChild(y);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));v.appendChild(A);var z=this.getCurrentFile();
-null==g&&null!=z&&z.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),v.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(z.getId())})));q.setAttribute("checked","checked");null==g&&y.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),M=this.addCheckbox(m,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(m,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";m.appendChild(n);var x=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(m,mxResources.get("allPages"),v,!v),B=this.addCheckbox(m,mxResources.get("layers"),!0),F=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,
-mxResources.get("lightbox"),!0),N=null;v=380;if(EditorUi.enableHtmlEditOption){N=this.addEditButton(m,G);var J=N.getEditInput();J.style.marginBottom="16px";v+=50;mxEvent.addListener(G,"change",function(){G.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&G.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){k(y.checked?g:null,M.checked,n.value,L.getTarget(),
-L.getColor(),x.checked,K.checked,B.checked,F.checked,G.checked,null!=N?N.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,q,v,y){var A=document.createElement("div");A.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,c||mxResources.get("link"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(z);var L=this.getCurrentFile();c=0;if(null==
-L||L.constructor!=window.DriveFile||e)v=null!=v?v:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;v=null!=v?v:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var M=document.createElement("div");M.style.whiteSpace="normal";mxUtils.write(M,mxResources.get("linkAccountRequired"));z.appendChild(M);M=
-mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));M.style.marginTop="12px";M.className="geBtn";z.appendChild(M);A.appendChild(z);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));z.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var n=null,x=null;if(null!=g||null!=k)c+=30,mxUtils.write(A,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",
-n.value="100%",A.appendChild(n),mxUtils.write(A,mxResources.get("height")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom="10px",x.value=k+"px",A.appendChild(x),mxUtils.br(A);var K=this.addLinkSection(A,q);g=null!=this.pages&&1<this.pages.length;var B=null;if(null==L||L.constructor!=window.DriveFile||e)B=this.addCheckbox(A,mxResources.get("allPages"),g,!g);var F=this.addCheckbox(A,mxResources.get("lightbox"),!0,
-null,null,!q),G=this.addEditButton(A,F),N=G.getEditInput();q&&(N.style.marginLeft=F.style.marginLeft,F.style.display="none",c-=20);var J=this.addCheckbox(A,mxResources.get("layers"),!0);J.style.marginLeft=N.style.marginLeft;J.style.marginTop="8px";var E=this.addCheckbox(A,mxResources.get("tags"),!0);E.style.marginLeft=N.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(J.removeAttribute("disabled"),N.removeAttribute("disabled")):
-(J.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&F.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,A,mxUtils.bind(this,function(){m(K.getTarget(),K.getColor(),null==B?!0:B.checked,F.checked,G.getLink(),J.checked,null!=n?n.value:null,null!=x?x.value:null,E.checked)}),null,mxResources.get("create"),v,y);this.showDialog(e.container,340,300+c,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";q.appendChild(v);if(m){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var z=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var M=k?null:this.addCheckbox(q,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var n=parseInt(y.value)/100||1,x=parseInt(A.value)||0;g(!z.checked,null!=L?L.checked:!1,null!=M?M.checked:!1,n,x)}),null,c,e);
-this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,q,v,y,A){v=null!=v?v:Editor.defaultIncludeDiagram;var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=this.editor.graph,M="jpeg"==y?220:300,n=document.createElement("h3");mxUtils.write(n,c);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";z.appendChild(n);mxUtils.write(z,mxResources.get("zoom")+":");var x=document.createElement("input");
-x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";z.appendChild(x);mxUtils.write(z,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";z.appendChild(K);mxUtils.br(z);var B=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,
-L.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var N={};for(n=0;n<c.length;n++)if(!L.isSelectionEmpty()||"selectionOnly"!=c[n]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(c[n]));J.setAttribute("value",
-c[n]);G.appendChild(J);N[c[n]]=J}A?(mxUtils.write(z,mxResources.get("size")+":"),z.appendChild(G),mxUtils.br(z),M+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(z.appendChild(F),mxUtils.write(z,mxResources.get("crop")),mxUtils.br(z),M+=30,mxEvent.addListener(B,"change",function(){B.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?A&&(B.style.display="none",B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display=
-"none",M-=30):(G.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var E=this.addCheckbox(z,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(z,mxResources.get("dark"),!0),M+=26);var S=this.addCheckbox(z,mxResources.get("shadow"),L.shadowVisible),U=null;if("png"==y||"jpeg"==y)U=this.addCheckbox(z,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),M+=30;var Q=this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=y);Q.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 V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginRight="10px";V.style.marginBottom="16px";
-V.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));V.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));V.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||V.appendChild(q);mxEvent.addListener(V,"change",mxUtils.bind(this,
-function(){"lblToSvg"==V.value?(W.checked=!0,W.setAttribute("disabled","disabled"),N.page.style.display="none","page"==G.value&&(G.value="diagram"),S.checked=!1,S.setAttribute("disabled","disabled"),p.style.display="inline-block",X.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),S.removeAttribute("disabled"),N.page.style.display="",p.style.display="none",X.style.display="")}));e&&(z.appendChild(W),mxUtils.write(z,mxResources.get("embedImages")),
-mxUtils.br(z),mxUtils.write(z,mxResources.get("txtSettings")+":"),z.appendChild(V),mxUtils.br(z),M+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));X.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));X.appendChild(e);
-e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));X.appendChild(e);var p=document.createElement("div");mxUtils.write(p,mxResources.get("LinksLost"));p.style.margin="7px";p.style.display="none";"svg"==y&&(mxUtils.write(z,mxResources.get("links")+":"),z.appendChild(X),z.appendChild(p),mxUtils.br(z),mxUtils.br(z),M+=50);g=new CustomDialog(this,z,mxUtils.bind(this,function(){this.lastExportBorder=K.value;this.lastExportZoom=x.value;
-m(x.value,E.checked,!B.checked,S.checked,Q.checked,W.checked,K.value,F.checked,!1,X.value,null!=U?U.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==V.value,"lblToSvg"==V.value)}),null,g,k);this.showDialog(g.container,340,M,!0,!0,null,null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,k,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";
-var v=this.editor.graph;if(null!=e){var y=document.createElement("h3");mxUtils.write(y,e);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var A=this.addCheckbox(q,mxResources.get("fit"),!0),z=this.addCheckbox(q,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(q,g),M=this.addCheckbox(q,mxResources.get("lightbox"),!0),n=this.addEditButton(q,M),x=n.getEditInput(),K=1<v.model.getChildCount(v.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),
-K,!K);B.style.marginLeft=x.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(K&&B.removeAttribute("disabled"),x.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"));x.checked&&M.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,q,mxUtils.bind(this,function(){c(A.checked,z.checked,L.checked,
-M.checked,n.getLink(),B.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,q,v,y){function A(x){var K=" ",B="";k&&(K=" 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!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");c&&(B+="max-width:100%;");var F="";g&&(F=' width="'+Math.round(z.width)+'" height="'+Math.round(z.height)+'"');v('<img src="'+x+'"'+F+(""!=B?' style="'+B+'"':"")+K+"/>")}var z=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(x){var K=k?this.getFileData(!0):null;x=
-this.createImageDataUri(x,K,"png");A(x)}),null,null,null,mxUtils.bind(this,function(x){y({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),z.width*z.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var M="";g&&(M="&w="+Math.round(2*z.width)+"&h="+Math.round(2*z.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+M+"&xml="+encodeURIComponent(e));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&
-299>=n.getStatus()?A("data:image/png;base64,"+n.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,q,v){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),A=y.getElementsByTagName("a");if(null!=A)for(var z=0;z<A.length;z++){var L=A[z].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==A[z].getAttribute("target")&&A[z].removeAttribute("target")}k&&
-y.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(y);if(g){var M=" ",n="";k&&(M="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",n+="cursor:pointer;");c&&(n+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(x){v('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(x))+'"'+(""!=n?' style="'+n+'"':"")+M+"/>")}))}else n="",k&&(e=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),c&&(c=parseInt(y.getAttribute("width")),m=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),n+="max-width:100%;max-height:"+m+"px;",y.removeAttribute("height")),""!=n&&y.setAttribute("style",n),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),v(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(c){c=
+":");var p="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(p||"none",function(z){p=z;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return p},getTarget:function(){return k.value},
+focus:function(){k.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,k,m,p,v){v=null!=v?v:[];k&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=e&&e!=mxConstants.NONE&&v.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),p&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
+this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,p,v,x,z,y){z=this.createUrlParameters(c,e,g,k,m,p,z);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
+null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(z.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,p,v,x,z,y,L,N){this.getBasenames();var K={};""!=
+m&&m!=mxConstants.NONE&&(K.highlight=m);"auto"!==k&&(K.target=k);y||(K.lightbox=!1);K.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(K.zoom=g/100);g=[];v&&(g.push("pages"),K.resize=!0,null!=this.pages&&null!=this.currentPage&&(K.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),K.resize=!0);x&&g.push("layers");z&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),K.toolbar=g.join(" "));null!=L&&0<L.length&&(K.edit=L);null!=c?K.url=c:K.xml=this.getFileData(!0,
+null,null,null,null,!v);e='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(K))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(p);var v=document.createElement("div");v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");
+x.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","type-embedhtmldialog");p=x.cloneNode(!0);p.setAttribute("value","copy");v.appendChild(p);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(z);mxUtils.br(v);v.appendChild(x);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));v.appendChild(z);var y=this.getCurrentFile();
+null==g&&null!=y&&y.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),v.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==g&&x.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(m,":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value="100%";m.appendChild(K);var q=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var E=E=this.addCheckbox(m,mxResources.get("allPages"),v,!v),A=this.addCheckbox(m,mxResources.get("layers"),!0),B=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,
+mxResources.get("lightbox"),!0),M=null;v=380;if(EditorUi.enableHtmlEditOption){M=this.addEditButton(m,G);var H=M.getEditInput();H.style.marginBottom="16px";v+=50;mxEvent.addListener(G,"change",function(){G.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&G.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){k(x.checked?g:null,N.checked,K.value,L.getTarget(),
+L.getColor(),q.checked,E.checked,A.checked,B.checked,G.checked,null!=M?M.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,p,v,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(y);var L=this.getCurrentFile();c=0;if(null==
+L||L.constructor!=window.DriveFile||e)v=null!=v?v:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;v=null!=v?v:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var N=document.createElement("div");N.style.whiteSpace="normal";mxUtils.write(N,mxResources.get("linkAccountRequired"));y.appendChild(N);N=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);z.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
+mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var K=null,q=null;if(null!=g||null!=k)c+=30,mxUtils.write(z,mxResources.get("width")+":"),K=document.createElement("input"),K.setAttribute("type","text"),K.style.marginRight="16px",K.style.width="50px",K.style.marginLeft="6px",K.style.marginRight="16px",K.style.marginBottom="10px",
+K.value="100%",z.appendChild(K),mxUtils.write(z,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",z.appendChild(q),mxUtils.br(z);var E=this.addLinkSection(z,p);g=null!=this.pages&&1<this.pages.length;var A=null;if(null==L||L.constructor!=window.DriveFile||e)A=this.addCheckbox(z,mxResources.get("allPages"),g,!g);var B=this.addCheckbox(z,mxResources.get("lightbox"),!0,
+null,null,!p),G=this.addEditButton(z,B),M=G.getEditInput();p&&(M.style.marginLeft=B.style.marginLeft,B.style.display="none",c-=20);var H=this.addCheckbox(z,mxResources.get("layers"),!0);H.style.marginLeft=M.style.marginLeft;H.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=M.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?(H.removeAttribute("disabled"),M.removeAttribute("disabled")):
+(H.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));M.checked&&B.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,z,mxUtils.bind(this,function(){m(E.getTarget(),E.getColor(),null==A?!0:A.checked,B.checked,G.getLink(),H.checked,null!=K?K.value:null,null!=q?q.value:null,F.checked)}),null,mxResources.get("create"),v,x);this.showDialog(e.container,340,300+c,!0,!0);null!=K?(K.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)):E.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";p.appendChild(v);if(m){mxUtils.write(p,mxResources.get("zoom")+":");var x=document.createElement("input");
+x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";p.appendChild(x);mxUtils.write(p,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";p.appendChild(z);mxUtils.br(p)}var y=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var N=k?null:this.addCheckbox(p,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var K=parseInt(x.value)/100||1,q=parseInt(z.value)||0;g(!y.checked,null!=L?L.checked:!1,null!=N?N.checked:!1,K,q)}),null,c,e);
+this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,p,v,x,z){v=null!=v?v:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=this.editor.graph,N="jpeg"==x?220:300,K=document.createElement("h3");mxUtils.write(K,c);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(K);mxUtils.write(y,mxResources.get("zoom")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";y.appendChild(q);mxUtils.write(y,mxResources.get("borderWidth")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.value=this.lastExportBorder||"0";y.appendChild(E);mxUtils.br(y);var A=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,
+L.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var M={};for(K=0;K<c.length;K++)if(!L.isSelectionEmpty()||"selectionOnly"!=c[K]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[K]));H.setAttribute("value",
+c[K]);G.appendChild(H);M[c[K]]=H}z?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(G),mxUtils.br(y),N+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(A.checked=!0)})):p&&(y.appendChild(B),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(A,"change",function(){A.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?z&&(A.style.display="none",A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display=
+"none",N-=30):(G.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(A,"change",function(){G.value=A.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=x),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var R=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==x||"jpeg"==x)W=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),N+=30;var P=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=x);P.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
+U.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(p);mxEvent.addListener(U,"change",mxUtils.bind(this,
+function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),M.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),n.style.display="inline-block",X.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),M.page.style.display="",n.style.display="none",X.style.display="")}));e&&(y.appendChild(V),mxUtils.write(y,mxResources.get("embedImages")),
+mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),N+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));X.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));X.appendChild(e);
+e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));X.appendChild(e);var n=document.createElement("div");mxUtils.write(n,mxResources.get("LinksLost"));n.style.margin="7px";n.style.display="none";"svg"==x&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(X),y.appendChild(n),mxUtils.br(y),mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=E.value;this.lastExportZoom=q.value;
+m(q.value,F.checked,!A.checked,R.checked,P.checked,V.checked,E.value,B.checked,!1,X.value,null!=W?W.checked:null,null!=I?I.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,k);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";
+var v=this.editor.graph;if(null!=e){var x=document.createElement("h3");mxUtils.write(x,e);x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(x)}var z=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),!0),K=this.addEditButton(p,N),q=K.getEditInput(),E=1<v.model.getChildCount(v.model.getRoot()),A=this.addCheckbox(p,mxResources.get("layers"),
+E,!E);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(E&&A.removeAttribute("disabled"),q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&N.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(z.checked,y.checked,L.checked,
+N.checked,K.getLink(),A.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,p,v,x){function z(q){var E=" ",A="";k&&(E=" 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!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",A+="cursor:pointer;");c&&(A+="max-width:100%;");var B="";g&&(B=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');v('<img src="'+q+'"'+B+(""!=A?' style="'+A+'"':"")+E+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var E=k?this.getFileData(!0):null;q=
+this.createImageDataUri(q,E,"png");z(q)}),null,null,null,mxUtils.bind(this,function(q){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var K=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+N+"&xml="+encodeURIComponent(e));K.send(mxUtils.bind(this,function(){200<=K.getStatus()&&
+299>=K.getStatus()?z("data:image/png;base64,"+K.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,p,v){var x=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),z=x.getElementsByTagName("a");if(null!=z)for(var y=0;y<z.length;y++){var L=z[y].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==z[y].getAttribute("target")&&z[y].removeAttribute("target")}k&&
+x.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(x);if(g){var N=" ",K="";k&&(N="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"+(m?"&edit=_blank":"")+(p?"&layers=1":
+"")+"');}})(this);\"",K+="cursor:pointer;");c&&(K+="max-width:100%;");this.editor.convertImages(x,mxUtils.bind(this,function(q){v('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(q))+'"'+(""!=K?' style="'+K+'"':"")+N+"/>")}))}else K="",k&&(e=this.getSelectedPageIndex(),x.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),K+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),K+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=K&&x.setAttribute("style",K),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
-c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
-c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var q=this.editor.graph,v=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),q),y=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var z=this.pages[0];this.currentPage==z?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=z.viewState&&null!=z.viewState&&q.setBackgroundImage(z.viewState.backgroundImage);q.getGlobalVariable=function(L){return"page"==L?z.getName():"pagenumber"==L?1:A.apply(this,
-arguments)};document.body.appendChild(q.container);q.model.setRoot(z.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=L.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(y));c(M.substring(M.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(n){null!=e&&e(n)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
-e(L)}),null,null,k,null,q.shadowVisible,null,q,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,q,v,y,A,z,L,M,n){y=null!=y?y:!0;L=null!=L?L:0;v=null!=A?A:e.background;v==mxConstants.NONE&&(v=null);q=e.getSvg(v,z,L,null,null,q,null,null,null,e.shadowVisible||M,null,n,"diagram");(e.shadowVisible||M)&&e.addSvgShadow(q,null,null,0==L);null!=c&&q.setAttribute("content",c);null!=g&&q.setAttribute("resource",g);var x=mxUtils.bind(this,function(K){K=
-(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=m&&m(K);return K});e.mathEnabled&&this.editor.addMathCss(q);if(null!=m)this.embedFonts(q,mxUtils.bind(this,function(K){y?this.editor.convertImages(K,mxUtils.bind(this,function(B){x(B)})):x(K)}));else return x(q)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,q,v,y,A,z,L,M,n){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var x=this.editor.graph.isSelectionEmpty();g=null!=g?g:x;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K,
-m?this.getFileData(!0,null,null,null,g,y):null,A,null==this.pages||0==this.pages.length,L)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,g,c||1,e,k,null,null,q,v,z,M,n)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,q,v){e=null!=e?e:0;g=null!=g?g:0;var y=[];try{var A=
-this.editor.graph;if(null!=c&&0<c.length){A.model.beginUpdate();try{var z=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(z.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var M=L.getElementsByTagName("diagram");if(1==M.length&&!q){if(L=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(c[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var n=M[0].getAttribute("name");null!=n&&""!=n&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,n))}}else if(0<M.length){q=[];var x=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[M[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(M[0]),k=!1,x=1);for(;x<M.length;x++){var K=M[x].getAttribute("id");M[x].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(M[x]));c[K]=M[x].getAttribute("id");var F=this.pages.length;null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[F+1]));A.model.execute(new ChangePage(this,B,B,F,
-!0));q.push(B)}this.updatePageLinks(c,q)}}if(null!=L&&"mxGraphModel"===L.nodeName){y=A.importGraphModel(L,e,g,k);if(null!=y)for(x=0;x<y.length;x++)this.updatePageLinksForCell(c,y[x]);var G=A.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var N=new ChangePageSetup(this,null,G);N.ignoreColor=!0;A.model.execute(N)}}v&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(J){if(m)throw J;
-this.handleError(J)}return y};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var g=document.createElement("div"),k=this.editor.graph,m=k.getLinkForCell(e);null!=m&&k.setLinkForCell(e,this.updatePageLink(c,m));if(k.isHtmlLabel(e)){g.innerHTML=k.sanitizeHtml(k.getLabel(e));for(var q=g.getElementsByTagName("a"),v=!1,y=0;y<q.length;y++)m=q[y].getAttribute("href"),null!=m&&(q[y].setAttribute("href",this.updatePageLink(c,m)),v=!0);v&&k.labelChanged(e,g.innerHTML)}for(y=0;y<k.model.getChildCount(e);y++)this.updatePageLinksForCell(c,k.model.getChildAt(e,y))};EditorUi.prototype.updatePageLink=
-function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var k=JSON.parse(e.substring(17));if(null!=k.actions){for(var m=0;m<k.actions.length;m++){var q=k.actions[m];if(null!=q.open&&Graph.isPageLink(q.open)){var v=q.open.substring(q.open.indexOf(",")+1);g=c[v];null!=g?q.open="data:page/id,"+g:null==this.getPageById(v)&&delete q.open}}e="data:action/json,"+JSON.stringify(k)}}catch(y){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var y="UNKNOWN-VISIO",A=k.lastIndexOf(".");if(0<=A&&A<k.length)y=k.substring(A+1).toUpperCase();else{var z=k.lastIndexOf("/");0<=
-z&&z<k.length&&(k=k.substring(z+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+k,label:v?"remote":"local"})}catch(M){}if(v)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{v=new FormData;v.append("file1",c,k);var L=new XMLHttpRequest;L.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(k)?"?stencil=1":""));L.responseType="blob";this.addRemoteServiceSecurityCheck(L);
-null!=m&&L.setRequestHeader("x-convert-custom",m);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var M=L.response;if("text/xml"==M.type){var n=new FileReader;n.onload=mxUtils.bind(this,function(x){try{e(x.target.result)}catch(K){g({message:mxResources.get("errorLoadingFile")})}});n.readAsText(M)}else this.doImportVisio(M,e,g,k)}catch(x){g(x)}else try{""==L.responseType||"text"==L.responseType?g({message:L.responseText}):(n=new FileReader,n.onload=
-function(){g({message:JSON.parse(n.result).Message})},n.readAsText(L.response))}catch(x){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
+c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(p){return"page"==p?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(p){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
+c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var p=this.editor.graph,v=null!=p.themes&&"darkTheme"==p.defaultThemeName,x=null;if(null!=g&&0<g.length)p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),p),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());var z=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(L){return"page"==L?y.getName():"pagenumber"==L?1:z.apply(this,
+arguments)};document.body.appendChild(p.container);p.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==x&&(x=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=L.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(x));c(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(K){null!=e&&e(K)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
+e(L)}),null,null,k,null,p.shadowVisible,null,p,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,K){x=null!=x?x:!0;L=null!=L?L:0;v=null!=z?z:e.background;v==mxConstants.NONE&&(v=null);p=e.getSvg(v,y,L,null,null,p,null,null,null,e.shadowVisible||N,null,K,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==L);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var q=mxUtils.bind(this,function(E){E=
+(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(E);null!=m&&m(E);return E});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(E){x?this.editor.convertImages(E,mxUtils.bind(this,function(A){q(A)})):q(E)}));else return q(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,p,v,x,z,y,L,N,K){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var q=this.editor.graph.isSelectionEmpty();g=null!=g?g:q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(E){this.spinner.stop();try{this.saveCanvas(E,
+m?this.getFileData(!0,null,null,null,g,x):null,z,null==this.pages||0==this.pages.length,L)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,g,c||1,e,k,null,null,p,v,y,N,K)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,p,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var z=
+this.editor.graph;if(null!=c&&0<c.length){z.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var N=L.getElementsByTagName("diagram");if(1==N.length&&!p){if(L=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var K=N[0].getAttribute("name");null!=K&&""!=K&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,K))}}else if(0<N.length){p=[];var q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(N[0]),k=!1,q=1);for(;q<N.length;q++){var E=N[q].getAttribute("id");N[q].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(N[q]));c[E]=N[q].getAttribute("id");var B=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[B+1]));z.model.execute(new ChangePage(this,A,A,B,
+!0));p.push(A)}this.updatePageLinks(c,p)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=z.importGraphModel(L,e,g,k);if(null!=x)for(q=0;q<x.length;q++)this.updatePageLinksForCell(c,x[q]);var G=z.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var M=new ChangePageSetup(this,null,G);M.ignoreColor=!0;z.model.execute(M)}}v&&this.insertHandler(x,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(H){if(m)throw H;
+this.handleError(H)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,e){var g=document.createElement("div"),k=this.editor.graph,m=k.getLinkForCell(e);null!=m&&k.setLinkForCell(e,this.updatePageLink(c,m));if(k.isHtmlLabel(e)){g.innerHTML=k.sanitizeHtml(k.getLabel(e));for(var p=g.getElementsByTagName("a"),v=!1,x=0;x<p.length;x++)m=p[x].getAttribute("href"),null!=m&&(p[x].setAttribute("href",this.updatePageLink(c,m)),v=!0);v&&k.labelChanged(e,g.innerHTML)}for(x=0;x<k.model.getChildCount(e);x++)this.updatePageLinksForCell(c,k.model.getChildAt(e,x))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var k=JSON.parse(e.substring(17));if(null!=k.actions){for(var m=0;m<k.actions.length;m++){var p=k.actions[m];if(null!=p.open&&Graph.isPageLink(p.open)){var v=p.open.substring(p.open.indexOf(",")+1);g=c[v];null!=g?p.open="data:page/id,"+g:null==this.getPageById(v)&&delete p.open}}e="data:action/json,"+JSON.stringify(k)}}catch(x){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",z=k.lastIndexOf(".");if(0<=z&&z<k.length)x=k.substring(z+1).toUpperCase();else{var y=k.lastIndexOf("/");0<=
+y&&y<k.length&&(k=k.substring(y+1))}EditorUi.logEvent({category:x+"-MS-IMPORT-FILE",action:"filename_"+k,label:v?"remote":"local"})}catch(N){}if(v)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{v=new FormData;v.append("file1",c,k);var L=new XMLHttpRequest;L.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(k)?"?stencil=1":""));L.responseType="blob";this.addRemoteServiceSecurityCheck(L);
+null!=m&&L.setRequestHeader("x-convert-custom",m);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=L.response;if("text/xml"==N.type){var K=new FileReader;K.onload=mxUtils.bind(this,function(q){try{e(q.target.result)}catch(E){g({message:mxResources.get("errorLoadingFile")})}});K.readAsText(N)}else this.doImportVisio(N,e,g,k)}catch(q){g(q)}else try{""==L.responseType||"text"==L.responseType?g({message:L.responseText}):(K=new FileReader,K.onload=
+function(){g({message:JSON.parse(K.result).Message})},K.readAsText(L.response))}catch(q){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
var k=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(m){g(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?k():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",k))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
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)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var k=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var m=
-JSON.parse(c);e(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&q.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var v=0;v<m.svgThumbs.length;v++)q.push(Editor.createSvgDataUri(m.svgThumbs[v]));null!=m.thumb&&q.push(m.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),g(y)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(c);e(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&p.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var v=0;v<m.svgThumbs.length;v++)p.push(Editor.createSvgDataUri(m.svgThumbs[v]));null!=m.thumb&&p.push(m.thumb);console.log.apply(console,p)}}catch(x){}}catch(x){null!=window.console&&console.error(x),g(x)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(k,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k)})})})}):mxscript("js/extensions.min.js",k))};EditorUi.prototype.generateMermaidImage=function(c,
-e,g,k){var m=this,q=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(v){try{if(mxClient.IS_IE||mxClient.IS_IE11)v=v.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(v).getElementsByTagName("svg");
-if(0<y.length){var A=parseFloat(y[0].getAttribute("width")),z=parseFloat(y[0].getAttribute("height"));if(isNaN(A)||isNaN(z))try{var L=y[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(L[2]);z=parseFloat(L[3])}catch(M){A=A||100,z=z||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),A,z)}else k({message:mxResources.get("invalidInput")})}catch(M){k(M)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(y,A,z){c1=y>>2;c2=(y&3)<<4|A>>4;c3=(A&15)<<2|z>>6;c4=z&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+m(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+m(y.charCodeAt(i),0,0):r+m(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(z){var L=new Image;L.onload=
-function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var x=A.result,K=x.indexOf(","),B=decodeURIComponent(escape(atob(x.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(y)};v.onerror=function(y){k(y)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
-try{m=k.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),k.updateCellSize(m,!0)}finally{k.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,k,m,q,v,y){q=null!=q?q:!0;v=null!=v?v:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(n){4==
-n.readyState&&200<=n.status&&299>=n.status&&this.editor.graph.setSelectionCells(this.insertTextAt(n.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var A=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var z=Editor.extractGraphModelFromPdf(c);if(null!=z&&0<z.length)return this.importXml(z,e,g,q,!0,y)}if(Editor.isPngDataUrl(c)&&(z=Editor.extractGraphModelFromPng(c),null!=z&&0<z.length))return this.importXml(z,
-e,g,q,!0,y);if("data:image/svg+xml;"==c.substring(0,19))try{z=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(z=c.substring(c.indexOf(",")+1),z=window.atob&&!mxClient.IS_SF?atob(z):Base64.decode(z,!0)):z=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(z,e,g,q,!0,y);if(0<L.length)return L}catch(n){}this.loadImage(c,mxUtils.bind(this,function(n){if("data:"==c.substring(0,5))this.resizeImage(n,c,mxUtils.bind(this,function(B,F,G){A.setSelectionCell(A.insertVertex(null,null,
-"",A.snap(e),A.snap(g),F,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(B)+";"))}),v,this.maxImageSize);else{var x=Math.min(1,Math.min(this.maxImageSize/n.width,this.maxImageSize/n.height)),K=Math.round(n.width*x);n=Math.round(n.height*x);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(e),A.snap(g),K,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var n=null;A.getModel().beginUpdate();try{n=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(k?"html=1;":"")),A.updateCellSize(n),A.fireEvent(new mxEventObject("textInserted","cells",[n]))}finally{A.getModel().endUpdate()}A.setSelectionCell(n)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,q,null,y);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(n){this.editor.graph.setSelectionCells(this.importXml(n,e,g,q,null,y))}),mxUtils.bind(this,function(n){this.handleError(n)}));else{A=this.editor.graph;m=null;A.getModel().beginUpdate();try{m=A.insertVertex(A.getDefaultParent(),null,"",A.snap(e),A.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
-"...");m.value=c;A.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var M=A.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=M.width;m.geometry.height=M.height}Graph.isLink(m.value)&&A.setLinkForCell(m,m.value);m.geometry.width+=A.gridSize;m.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
+e,g,k){var m=this,p=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(v){try{if(mxClient.IS_IE||mxClient.IS_IE11)v=v.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var x=mxUtils.parseXml(v).getElementsByTagName("svg");
+if(0<x.length){var z=parseFloat(x[0].getAttribute("width")),y=parseFloat(x[0].getAttribute("height"));if(isNaN(z)||isNaN(y))try{var L=x[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(L[2]);y=parseFloat(L[3])}catch(N){z=z||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),z,y)}else k({message:mxResources.get("invalidInput")})}catch(N){k(N)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,z,y){c1=x>>2;c2=(x&3)<<4|z>>4;c3=(z&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(y){var L=new Image;L.onload=
+function(){try{var N=L.width,K=L.height;if(0==N&&0==K){var q=z.result,E=q.indexOf(","),A=decodeURIComponent(escape(atob(q.substring(E+1)))),B=mxUtils.parseXml(A).getElementsByTagName("svg");0<B.length&&(N=parseFloat(B[0].getAttribute("width")),K=parseFloat(B[0].getAttribute("height")))}g(z.result,N,K)}catch(G){k(G)}};L.src=z.result};z.onerror=function(y){k(y)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
+try{m=k.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),k.updateCellSize(m,!0)}finally{k.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;v=null!=v?v:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(K){4==
+K.readyState&&200<=K.status&&299>=K.status&&this.editor.graph.setSelectionCells(this.insertTextAt(K.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var z=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,x)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
+e,g,p,!0,x);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(y,e,g,p,!0,x);if(0<L.length)return L}catch(K){}this.loadImage(c,mxUtils.bind(this,function(K){if("data:"==c.substring(0,5))this.resizeImage(K,c,mxUtils.bind(this,function(A,B,G){z.setSelectionCell(z.insertVertex(null,null,
+"",z.snap(e),z.snap(g),B,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(A)+";"))}),v,this.maxImageSize);else{var q=Math.min(1,Math.min(this.maxImageSize/K.width,this.maxImageSize/K.height)),E=Math.round(K.width*q);K=Math.round(K.height*q);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(e),z.snap(g),E,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var K=null;z.getModel().beginUpdate();try{K=z.insertVertex(z.getDefaultParent(),null,c,z.snap(e),z.snap(g),1,1,"text;"+(k?"html=1;":"")),z.updateCellSize(K),z.fireEvent(new mxEventObject("textInserted","cells",[K]))}finally{z.getModel().endUpdate()}z.setSelectionCell(K)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(K){this.editor.graph.setSelectionCells(this.importXml(K,e,g,p,null,x))}),mxUtils.bind(this,function(K){this.handleError(K)}));else{z=this.editor.graph;m=null;z.getModel().beginUpdate();try{m=z.insertVertex(z.getDefaultParent(),null,"",z.snap(e),z.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+"...");m.value=c;z.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=z.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&z.setLinkForCell(m,m.value);m.geometry.width+=z.gridSize;m.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(v,y){StorageFile.listFiles(this,
-"F",v,y)});window.openBrowserFile=mxUtils.bind(this,function(v,y,A){StorageFile.getFileContent(this,v,y,A)});window.deleteBrowserFile=mxUtils.bind(this,function(v,y,A){StorageFile.deleteFile(this,v,y,A)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(v=new Blob([v],{type:"application/octet-stream"}),
-this.importVisio(v,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,q=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;q.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(q){if(mxUtils.isEmptyObject(q.files))g();else{var v=0,y,A=!1;q.forEach(function(z,L){z=L.name.toLowerCase();"diagram/diagram.xml"==z?(A=!0,L.async("string").then(function(M){0==M.indexOf("<mxfile ")?e(M):g()})):0==z.indexOf("versions/")&&(z=parseInt(z.substr(9)),z>v&&(v=z,y=L))});0<v?y.async("string").then(function(z){(new XMLHttpRequest).upload&&
-k.isRemoteFileFormat(z,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(z,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,q,v,y,A,z,L,M){z=null!=
-z?z:!0;var n=!1,x=null,K=mxUtils.bind(this,function(B){var F=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,v)):F=this.importXml(B,g,k,z,null,null!=M?mxEvent.isControlDown(M):null);null!=y&&y(F)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(x=this.importXml(e,g,k,z,null,null!=M?mxEvent.isControlDown(M):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
-A)+c.substring(c.indexOf(",",A+1))),z&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),x=[e.insertVertex(null,null,"",g,k,m,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(n=!0,this.importGraphML(c,K)):null!=A&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(n=!0,this.importVisio(A,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(n=!0,m=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?K(B.responseText):null!=y&&y(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(A,m,v)):0==c.indexOf("PK")&&null!=A?(n=!0,this.importZipFile(A,K,mxUtils.bind(this,function(){x=this.insertTextAt(this.validateFileData(c),g,k,!0,null,z);y(x)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(x=this.insertTextAt(this.validateFileData(c),
-g,k,!0,null,z,null,null!=M?mxEvent.isControlDown(M):null));n||null==y||y(x);return x};EditorUi.prototype.importFiles=function(c,e,g,k,m,q,v,y,A,z,L,M,n){k=null!=k?k:this.maxImageSize;z=null!=z?z:this.maxImageBytes;var x=null!=e&&null!=g,K=!0;e=null!=e?e:0;g=null!=g?g:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var F=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>F){B=!0;break}var N=mxUtils.bind(this,function(){var J=
-this.editor.graph,E=J.gridSize;m=null!=m?m:mxUtils.bind(this,function(V,X,p,C,I,T,P,O,R){try{return null!=V&&"<mxlibrary"==V.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,V,P)),null):this.importFile(V,X,p,C,I,T,P,O,R,x,M,n)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(V){J.setSelectionCells(V)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=c.length,S=H,U=[],Q=mxUtils.bind(this,function(V,X){U[V]=X;if(0==
---S){this.spinner.stop();if(null!=y)y(U);else{var p=[];J.getModel().beginUpdate();try{for(V=0;V<U.length;V++){var C=U[V]();null!=C&&(p=p.concat(C))}}finally{J.getModel().endUpdate()}}q(p)}}),W=0;W<H;W++)mxUtils.bind(this,function(V){var X=c[V];if(null!=X){var p=new FileReader;p.onload=mxUtils.bind(this,function(C){if(null==v||v(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var I=Graph.clipSvgDataUri(C.target.result),T=I.indexOf(",");T=decodeURIComponent(escape(atob(I.substring(T+
-1))));var P=mxUtils.parseXml(T);T=P.getElementsByTagName("svg");if(0<T.length){T=T[0];var O=M?null:T.getAttribute("content");null!=O&&"<"!=O.charAt(0)&&"%"!=O.charAt(0)&&(O=unescape(window.atob?atob(O):Base64.decode(O,!0)));null!=O&&"%"==O.charAt(0)&&(O=decodeURIComponent(O));null==O||"<mxfile "!==O.substring(0,8)&&"<mxGraphModel "!==O.substring(0,14)?Q(V,mxUtils.bind(this,function(){try{if(null!=P){var da=P.getElementsByTagName("svg");if(0<da.length){var ha=da[0],Z=ha.getAttribute("width"),ea=ha.getAttribute("height");
-Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ea=null!=ea&&"%"!=ea.charAt(ea.length-1)?parseFloat(ea):NaN;var aa=ha.getAttribute("viewBox");if(null==aa||0==aa.length)ha.setAttribute("viewBox","0 0 "+Z+" "+ea);else if(isNaN(Z)||isNaN(ea)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),ea=parseFloat(va[3]))}I=Editor.createSvgDataUri(mxUtils.getXml(ha));var la=Math.min(1,Math.min(k/Math.max(1,Z)),k/Math.max(1,ea)),Aa=m(I,X.type,e+V*E,g+V*E,Math.max(1,Math.round(Z*la)),Math.max(1,Math.round(ea*
-la)),X.name);if(isNaN(Z)||isNaN(ea)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){Z=Math.max(1,Ba.width);ea=Math.max(1,Ba.height);Aa[0].geometry.width=Z;Aa[0].geometry.height=ea;ha.setAttribute("viewBox","0 0 "+Z+" "+ea);I=Editor.createSvgDataUri(mxUtils.getXml(ha));var ua=I.indexOf(";");0<ua&&(I=I.substring(0,ua)+I.substring(I.indexOf(",",ua+1)));J.setCellStyles("image",I,[Aa[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return Aa}}}catch(ua){}return null})):Q(V,mxUtils.bind(this,
-function(){return m(O,"text/xml",e+V*E,g+V*E,0,0,X.name)}))}else Q(V,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var R=M?null:this.extractGraphModelFromPng(C.target.result);if(null!=R&&0<R.length){var Y=new Image;Y.src=C.target.result;Q(V,mxUtils.bind(this,function(){return m(R,"text/xml",e+V*E,g+V*E,Y.width,Y.height,X.name)}));T=!0}}T||(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(C.target.result,mxUtils.bind(this,function(da){this.resizeImage(da,C.target.result,mxUtils.bind(this,function(ha,Z,ea){Q(V,mxUtils.bind(this,function(){if(null!=ha&&ha.length<z){var aa=K&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(k/Z,k/ea)):1;return m(ha,X.type,e+V*E,g+V*E,Math.round(Z*aa),Math.round(ea*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),K,k,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else I=C.target.result,m(I,X.type,e+V*E,g+V*E,240,160,X.name,function(da){Q(V,function(){return da})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?m(null,X.type,e+V*E,g+V*E,240,160,X.name,function(C){Q(V,function(){return C})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?p.readAsDataURL(X):p.readAsText(X)}})(W)});if(B){B=
-[];for(G=0;G<c.length;G++)B.push(c[G]);c=B;this.confirmImageResize(function(J){K=J;N()},A)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
-null,m=function(q,v){if(q||e)mxSettings.setResizeImages(q?v:null),mxSettings.save();g();c(v)};null==k||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){m(q,!0)},function(q){m(q,!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,
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,
+"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.getFileContent(this,v,x,z)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.deleteFile(this,v,x,z)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){null!=x&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(x)?(v=new Blob([v],{type:"application/octet-stream"}),
+this.importVisio(v,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,x)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,p=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;p.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var v=0,x,z=!1;p.forEach(function(y,L){y=L.name.toLowerCase();"diagram/diagram.xml"==y?(z=!0,L.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>v&&(v=y,x=L))});0<v?x.async("string").then(function(y){(new XMLHttpRequest).upload&&
+k.isRemoteFileFormat(y,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(y,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):z||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,p,v,x,z,y,L,N){y=null!=
+y?y:!0;var K=!1,q=null,E=mxUtils.bind(this,function(A){var B=null;null!=A&&"<mxlibrary"==A.substring(0,10)?this.loadLibrary(new LocalLibrary(this,A,v)):B=this.importXml(A,g,k,y,null,null!=N?mxEvent.isControlDown(N):null);null!=x&&x(B)});"image"==e.substring(0,5)?(z=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(q=this.importXml(e,g,k,y,null,null!=N?mxEvent.isControlDown(N):null),z=!0)),z||(e=this.editor.graph,z=c.indexOf(";"),0<z&&(c=c.substring(0,
+z)+c.substring(c.indexOf(",",z+1))),y&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),q=[e.insertVertex(null,null,"",g,k,m,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(K=!0,this.importGraphML(c,E)):null!=z&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(K=!0,this.importVisio(z,E)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(K=!0,m=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?E(A.responseText):null!=x&&x(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(z,m,v)):0==c.indexOf("PK")&&null!=z?(K=!0,this.importZipFile(z,E,mxUtils.bind(this,function(){q=this.insertTextAt(this.validateFileData(c),g,k,!0,null,y);x(q)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(q=this.insertTextAt(this.validateFileData(c),
+g,k,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));K||null==x||x(q);return q};EditorUi.prototype.importFiles=function(c,e,g,k,m,p,v,x,z,y,L,N,K){k=null!=k?k:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var q=null!=e&&null!=g,E=!0;e=null!=e?e:0;g=null!=g?g:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var B=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>B){A=!0;break}var M=mxUtils.bind(this,function(){var H=
+this.editor.graph,F=H.gridSize;m=null!=m?m:mxUtils.bind(this,function(U,X,n,C,J,T,Q,O,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,Q)),null):this.importFile(U,X,n,C,J,T,Q,O,S,q,N,K)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(U){H.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=c.length,R=I,W=[],P=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
+--R){this.spinner.stop();if(null!=x)x(W);else{var n=[];H.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var C=W[U]();null!=C&&(n=n.concat(C))}}finally{H.getModel().endUpdate()}}p(n)}}),V=0;V<I;V++)mxUtils.bind(this,function(U){var X=c[U];if(null!=X){var n=new FileReader;n.onload=mxUtils.bind(this,function(C){if(null==v||v(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var J=Graph.clipSvgDataUri(C.target.result),T=J.indexOf(",");T=decodeURIComponent(escape(atob(J.substring(T+
+1))));var Q=mxUtils.parseXml(T);T=Q.getElementsByTagName("svg");if(0<T.length){T=T[0];var O=N?null:T.getAttribute("content");null!=O&&"<"!=O.charAt(0)&&"%"!=O.charAt(0)&&(O=unescape(window.atob?atob(O):Base64.decode(O,!0)));null!=O&&"%"==O.charAt(0)&&(O=decodeURIComponent(O));null==O||"<mxfile "!==O.substring(0,8)&&"<mxGraphModel "!==O.substring(0,14)?P(U,mxUtils.bind(this,function(){try{if(null!=Q){var da=Q.getElementsByTagName("svg");if(0<da.length){var ha=da[0],Z=ha.getAttribute("width"),ea=ha.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ea=null!=ea&&"%"!=ea.charAt(ea.length-1)?parseFloat(ea):NaN;var aa=ha.getAttribute("viewBox");if(null==aa||0==aa.length)ha.setAttribute("viewBox","0 0 "+Z+" "+ea);else if(isNaN(Z)||isNaN(ea)){var va=aa.split(" ");3<va.length&&(Z=parseFloat(va[2]),ea=parseFloat(va[3]))}J=Editor.createSvgDataUri(mxUtils.getXml(ha));var la=Math.min(1,Math.min(k/Math.max(1,Z)),k/Math.max(1,ea)),Aa=m(J,X.type,e+U*F,g+U*F,Math.max(1,Math.round(Z*la)),Math.max(1,Math.round(ea*
+la)),X.name);if(isNaN(Z)||isNaN(ea)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){Z=Math.max(1,Ba.width);ea=Math.max(1,Ba.height);Aa[0].geometry.width=Z;Aa[0].geometry.height=ea;ha.setAttribute("viewBox","0 0 "+Z+" "+ea);J=Editor.createSvgDataUri(mxUtils.getXml(ha));var ua=J.indexOf(";");0<ua&&(J=J.substring(0,ua)+J.substring(J.indexOf(",",ua+1)));H.setCellStyles("image",J,[Aa[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return Aa}}}catch(ua){}return null})):P(U,mxUtils.bind(this,
+function(){return m(O,"text/xml",e+U*F,g+U*F,0,0,X.name)}))}else P(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var S=N?null:this.extractGraphModelFromPng(C.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=C.target.result;P(U,mxUtils.bind(this,function(){return m(S,"text/xml",e+U*F,g+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(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(C.target.result,mxUtils.bind(this,function(da){this.resizeImage(da,C.target.result,mxUtils.bind(this,function(ha,Z,ea){P(U,mxUtils.bind(this,function(){if(null!=ha&&ha.length<y){var aa=E&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(k/Z,k/ea)):1;return m(ha,X.type,e+U*F,g+U*F,Math.round(Z*aa),Math.round(ea*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),E,k,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else J=C.target.result,m(J,X.type,e+U*F,g+U*F,240,160,X.name,function(da){P(U,function(){return da})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?m(null,X.type,e+U*F,g+U*F,240,160,X.name,function(C){P(U,function(){return C})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?n.readAsDataURL(X):n.readAsText(X)}})(V)});if(A){A=
+[];for(G=0;G<c.length;G++)A.push(c[G]);c=A;this.confirmImageResize(function(H){E=H;M()},z)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+null,m=function(p,v){if(p||e)mxSettings.setResizeImages(p?v:null),mxSettings.save();g();c(v)};null==k||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){m(p,!0)},function(p){m(p,!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):m(!1,k)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var k=new FileReader;k.onload=mxUtils.bind(this,function(){this.parseFileData(k.result,e,g)});k.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var k=new XMLHttpRequest;k.open("POST",OPEN_URL);k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.onreadystatechange=function(){e(k)};k.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,q,v){m=null!=m?m:this.maxImageSize;var y=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,q))try{var z=Math.max(y/m,A/m);if(1<z){var L=Math.round(y/z),M=Math.round(A/z),n=document.createElement("canvas");n.width=L;n.height=M;n.getContext("2d").drawImage(c,0,0,L,M);var x=
-n.toDataURL();if(x.length<e.length){var K=document.createElement("canvas");K.width=L;K.height=M;var B=K.toDataURL();x!==B&&(e=x,y=L,A=M)}}}catch(F){}g(e,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,p,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),z=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,p))try{var y=Math.max(x/m,z/m);if(1<y){var L=Math.round(x/y),N=Math.round(z/y),K=document.createElement("canvas");K.width=L;K.height=N;K.getContext("2d").drawImage(c,0,0,L,N);var q=
+K.toDataURL();if(q.length<e.length){var E=document.createElement("canvas");E.width=L;E.height=N;var A=E.toDataURL();q!==A&&(e=q,x=L,z=N)}}}catch(B){}g(e,x,z)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=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 c=this,e=this.editor.graph;Editor.isDarkMode()&&(e.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(F){var G=F.getEvent();return null==F.getState()&&!mxEvent.isMouseEvent(G)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==F.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});e.cellEditor.editPlantUmlData=function(F,
-G,N){var J=JSON.parse(N);G=new TextareaDialog(c,mxResources.get("plantUml")+":",J.data,function(E){null!=E&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(E,J.format,function(H,S,U){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==J.format)e.labelChanged(F,"<pre>"+H+"</pre>"),e.updateCellSize(F,!0);else{e.setCellStyles("image",c.convertDataUri(H),[F]);var Q=e.model.getGeometry(F);null!=Q&&(Q=Q.clone(),Q.width=S,Q.height=U,e.cellsResized([F],[Q],!1))}e.setAttributeForCell(F,
-"plantUmlData",JSON.stringify({data:E,format:J.format}))}finally{e.getModel().endUpdate()}},function(H){c.handleError(H)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};e.cellEditor.editMermaidData=function(F,G,N){var J=JSON.parse(N);G=new TextareaDialog(c,mxResources.get("mermaid")+":",J.data,function(E){null!=E&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(E,J.config,function(H,S,U){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",
-H,[F]);var Q=e.model.getGeometry(F);null!=Q&&(Q=Q.clone(),Q.width=Math.max(Q.width,S),Q.height=Math.max(Q.height,U),e.cellsResized([F],[Q],!1));e.setAttributeForCell(F,"mermaidData",JSON.stringify({data:E,config:J.config},null,2))}finally{e.getModel().endUpdate()}},function(H){c.handleError(H)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(F,G){try{var N=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=
-N)this.editPlantUmlData(F,G,N);else if(N=this.graph.getAttributeForCell(F,"mermaidData"),null!=N)this.editMermaidData(F,G,N);else{var J=e.getCellStyle(F);"1"==mxUtils.getValue(J,"metaEdit","0")?c.showDataDialog(F):g.apply(this,arguments)}}catch(E){c.handleError(E)}};e.getLinkTitle=function(F){return c.getLinkTitle(F)};e.customLinkClicked=function(F){var G=!1;try{c.handleCustomLink(F),G=!0}catch(N){c.handleError(N)}return G};var k=e.parseBackgroundImage;e.parseBackgroundImage=function(F){var G=k.apply(this,
-arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var m=e.setBackgroundImage;e.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=c.createImageForPageLink(F.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
-mxUtils.bind(this,function(F,G){F=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=F){var N=F.indexOf(",");if(0<N)for(F=F.substring(N+1),G=G.getProperty("patches"),N=0;N<G.length;N++)if(null!=G[N][EditorUi.DIFF_UPDATE]&&null!=G[N][EditorUi.DIFF_UPDATE][F]||null!=G[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[N][EditorUi.DIFF_REMOVE],F)){e.refreshBackgroundImage();break}}}));var q=e.getBackgroundImageObject;e.getBackgroundImageObject=function(F,G){var N=q.apply(this,arguments);
-if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,E=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=c.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=E;this.stylesheet=J}return N};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.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 y=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
-var A=e.addClickHandler;e.addClickHandler=function(F,G,N){var J=G;G=function(E,H){if(null==H){var S=mxEvent.getSource(E);"a"==S.nodeName.toLowerCase()&&(H=S.getAttribute("href"))}null!=H&&e.isCustomLink(H)&&(mxEvent.isTouchEvent(E)||!mxEvent.isPopupTrigger(E))&&e.customLinkClicked(H)&&mxEvent.consume(E);null!=J&&J(E,H)};A.call(this,F,G,N)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var z=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(F,G,N){c.editor.graph.isSelectionEmpty()?z.apply(this,arguments):c.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,N)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=e.getExportVariables;e.getExportVariables=function(){var F=L.apply(this,arguments),G=c.getCurrentFile();null!=
-G&&(F.filename=G.getTitle());F.pagecount=null!=c.pages?c.pages.length:1;F.page=null!=c.currentPage?c.currentPage.getName():"";F.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return F};var M=e.getGlobalVariable;e.getGlobalVariable=function(F){var G=c.getCurrentFile();return"filename"==F&&null!=G?G.getTitle():"page"==F&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==F?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:
-"pagecount"==F?null!=c.pages?c.pages.length:1:M.apply(this,arguments)};var n=e.labelLinkClicked;e.labelLinkClicked=function(F,G,N){var J=G.getAttribute("href");if(null==J||!e.isCustomLink(J)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))n.apply(this,arguments);else{if(!e.isEnabled()||null!=F&&e.isCellLocked(F.cell))e.customLinkClicked(J),e.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var F=c.defaultFilename,G=c.getCurrentFile();null!=G&&(F=null!=G.getTitle()?
-G.getTitle():F);return F};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.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,"insertRectangle"),this.keyHandler.bindAction(75,
-!0,"insertEllipse",!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&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var G=e.cellEditor.text2,N=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(J){null!=N&&(N.parentNode.removeChild(N),N=null);J.stopPropagation();
-J.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(G));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<J.dataTransfer.files.length)this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,function(H,S,U,Q,W,V){e.insertImage(H,W,V)},function(){},function(H){return"image/"==H.type.substring(0,
-6)},function(H){for(var S=0;S<H.length;S++)H[S]()},mxEvent.isControlDown(J));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var E=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(E)?this.loadImage(decodeURIComponent(E),mxUtils.bind(this,function(H){var S=Math.max(1,H.width);H=Math.max(1,H.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,S)),U/Math.max(1,H));e.insertImage(decodeURIComponent(E),S*U,H*U)})):document.execCommand("insertHTML",
-!1,J.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"));J.stopPropagation();J.preventDefault()})))}));this.isSettingsEnabled()&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(F,G){mxSettings.setUnit(G.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,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(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)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,G){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),
-F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:K.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(e.container,"dragleave",function(F){e.isEnabled()&&
-(null!=B&&(B.parentNode.removeChild(B),B=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(F){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(F){null!=B&&(B.parentNode.removeChild(B),B=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
-mxEvent.getClientX(F),mxEvent.getClientY(F)),N=F.dataTransfer.files,J=e.view.translate,E=e.view.scale,H=G.x/E-J.x,S=G.y/E-J.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(F)||G)?(!mxEvent.isShiftDown(F)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(F)&&(S=H=null),this.importFiles(N,
-H,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(S=H=0);var U=0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;N=this.extractGraphModelFromEvent(F,null!=this.pages);if(null!=N)e.setSelectionCells(this.importXml(N,H,S,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var Q=F.dataTransfer.getData("text/html");N=document.createElement("div");N.innerHTML=
-e.sanitizeHtml(Q);var W=null;G=N.getElementsByTagName("img");null!=G&&1==G.length?(Q=G[0].getAttribute("src"),null==Q&&(Q=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)||(W=!0)):(G=N.getElementsByTagName("a"),null!=G&&1==G.length?Q=G[0].getAttribute("href"):(N=N.getElementsByTagName("pre"),null!=N&&1==N.length&&(Q=mxUtils.getTextContent(N[0]))));var V=!0,X=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(Q,H,S,!0,W,null,V,mxEvent.isControlDown(F)))});W&&null!=
-Q&&Q.length>this.resampleThreshold?this.confirmImageResize(function(p){V=p;X()},mxEvent.isControlDown(F)):X()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(p){var C=Math.max(1,p.width);p=Math.max(1,p.height);var I=this.maxImageSize;I=Math.min(1,Math.min(I/Math.max(1,C)),I/Math.max(1,p));e.setSelectionCell(e.insertVertex(null,null,"",H,S,C*I,p*I,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-U+";"))}),mxUtils.bind(this,function(p){e.setSelectionCells(this.insertTextAt(U,H,S,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),H,S,!0))}}F.stopPropagation();F.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
-mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var q=g.items;for(index in q){var v=q[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(A,z,L,M,n,x){c.insertImage(A,n,x)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var z=0;z<A.length;z++)A[z]()});else{var y=
-this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
+mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Editor.isDarkMode()&&(e.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(B){var G=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(G)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==B.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});e.cellEditor.editPlantUmlData=function(B,
+G,M){var H=JSON.parse(M);G=new TextareaDialog(c,mxResources.get("plantUml")+":",H.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(F,H.format,function(I,R,W){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==H.format)e.labelChanged(B,"<pre>"+I+"</pre>"),e.updateCellSize(B,!0);else{e.setCellStyles("image",c.convertDataUri(I),[B]);var P=e.model.getGeometry(B);null!=P&&(P=P.clone(),P.width=R,P.height=W,e.cellsResized([B],[P],!1))}e.setAttributeForCell(B,
+"plantUmlData",JSON.stringify({data:F,format:H.format}))}finally{e.getModel().endUpdate()}},function(I){c.handleError(I)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};e.cellEditor.editMermaidData=function(B,G,M){var H=JSON.parse(M);G=new TextareaDialog(c,mxResources.get("mermaid")+":",H.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(F,H.config,function(I,R,W){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",
+I,[B]);var P=e.model.getGeometry(B);null!=P&&(P=P.clone(),P.width=Math.max(P.width,R),P.height=Math.max(P.height,W),e.cellsResized([B],[P],!1));e.setAttributeForCell(B,"mermaidData",JSON.stringify({data:F,config:H.config},null,2))}finally{e.getModel().endUpdate()}},function(I){c.handleError(I)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(B,G){try{var M=this.graph.getAttributeForCell(B,"plantUmlData");if(null!=
+M)this.editPlantUmlData(B,G,M);else if(M=this.graph.getAttributeForCell(B,"mermaidData"),null!=M)this.editMermaidData(B,G,M);else{var H=e.getCellStyle(B);"1"==mxUtils.getValue(H,"metaEdit","0")?c.showDataDialog(B):g.apply(this,arguments)}}catch(F){c.handleError(F)}};e.getLinkTitle=function(B){return c.getLinkTitle(B)};e.customLinkClicked=function(B){var G=!1;try{c.handleCustomLink(B),G=!0}catch(M){c.handleError(M)}return G};var k=e.parseBackgroundImage;e.parseBackgroundImage=function(B){var G=k.apply(this,
+arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var m=e.setBackgroundImage;e.setBackgroundImage=function(B){null!=B&&null!=B.originalSrc&&(B=c.createImageForPageLink(B.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
+mxUtils.bind(this,function(B,G){B=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=B){var M=B.indexOf(",");if(0<M)for(B=B.substring(M+1),G=G.getProperty("patches"),M=0;M<G.length;M++)if(null!=G[M][EditorUi.DIFF_UPDATE]&&null!=G[M][EditorUi.DIFF_UPDATE][B]||null!=G[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[M][EditorUi.DIFF_REMOVE],B)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(B,G){var M=p.apply(this,arguments);
+if(null!=M&&null!=M.originalSrc)if(!G)M={src:M.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,F=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";M=c.createImageForPageLink(M.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=F;this.stylesheet=H}return M};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.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 x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(B){B=null!=B?B:"";"1"==urlParams.dev&&(B+=(0<B.length?"&":"?")+"dev=1");return x.apply(this,arguments)};
+var z=e.addClickHandler;e.addClickHandler=function(B,G,M){var H=G;G=function(F,I){if(null==I){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(I=R.getAttribute("href"))}null!=I&&e.isCustomLink(I)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(I)&&mxEvent.consume(F);null!=H&&H(F,I)};z.call(this,B,G,M)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;
+this.menus.addPopupMenuEditItems=function(B,G,M){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(B,"delete - cut copy copyAsImage - duplicate".split(" "),null,M)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=e.getExportVariables;e.getExportVariables=function(){var B=L.apply(this,arguments),G=c.getCurrentFile();null!=
+G&&(B.filename=G.getTitle());B.pagecount=null!=c.pages?c.pages.length:1;B.page=null!=c.currentPage?c.currentPage.getName():"";B.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return B};var N=e.getGlobalVariable;e.getGlobalVariable=function(B){var G=c.getCurrentFile();return"filename"==B&&null!=G?G.getTitle():"page"==B&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==B?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:
+"pagecount"==B?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var K=e.labelLinkClicked;e.labelLinkClicked=function(B,G,M){var H=G.getAttribute("href");if(null==H||!e.isCustomLink(H)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))K.apply(this,arguments);else{if(!e.isEnabled()||null!=B&&e.isCellLocked(B.cell))e.customLinkClicked(H),e.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var B=c.defaultFilename,G=c.getCurrentFile();null!=G&&(B=null!=G.getTitle()?
+G.getTitle():B);return B};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.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,"insertRectangle"),this.keyHandler.bindAction(75,
+!0,"insertEllipse",!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&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(B){var G=e.cellEditor.text2,M=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(H){null!=M&&(M.parentNode.removeChild(M),M=null);H.stopPropagation();
+H.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(H){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=this.highlightElement(G));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(H){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(I,R,W,P,V,U){e.insertImage(I,V,U)},function(){},function(I){return"image/"==I.type.substring(0,
+6)},function(I){for(var R=0;R<I.length;R++)I[R]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var F=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(I){var R=Math.max(1,I.width);I=Math.max(1,I.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,R)),W/Math.max(1,I));e.insertImage(decodeURIComponent(F),R*W,I*W)})):document.execCommand("insertHTML",
+!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(q=this.editor.graph.view,q.setUnit(mxSettings.getUnit()),q.addListener("unitChanged",function(B,G){mxSettings.setUnit(G.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,q.unit),this.refresh());if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(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)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,G){0<this.editor.graph.getSelectionCount()?(B=this.editor.graph.getSelectionCell(),
+B=this.editor.graph.getModel().getStyle(B),this.styleInput.value=B||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==this.styleInput?!0:E.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(e.container,"dragleave",function(B){e.isEnabled()&&
+(null!=A&&(A.parentNode.removeChild(A),A=null),B.stopPropagation(),B.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(B){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(B){null!=A&&(A.parentNode.removeChild(A),A=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
+mxEvent.getClientX(B),mxEvent.getClientY(B)),M=B.dataTransfer.files,H=e.view.translate,F=e.view.scale,I=G.x/F-H.x,R=G.y/F-H.y;if(0<M.length)G=1==M.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===M[0].type.substring(0,9)||"image/"!==M[0].type.substring(0,6)||/(\.drawio.png)$/i.test(M[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(B)||G)?(!mxEvent.isShiftDown(B)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(B)&&(R=I=null),this.importFiles(M,
+I,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(B),null,null,mxEvent.isShiftDown(B),B));else{mxEvent.isAltDown(B)&&(R=I=0);var W=0<=mxUtils.indexOf(B.dataTransfer.types,"text/uri-list")?B.dataTransfer.getData("text/uri-list"):null;M=this.extractGraphModelFromEvent(B,null!=this.pages);if(null!=M)e.setSelectionCells(this.importXml(M,I,R,!0));else if(0<=mxUtils.indexOf(B.dataTransfer.types,"text/html")){var P=B.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=
+e.sanitizeHtml(P);var V=null;G=M.getElementsByTagName("img");null!=G&&1==G.length?(P=G[0].getAttribute("src"),null==P&&(P=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)||(V=!0)):(G=M.getElementsByTagName("a"),null!=G&&1==G.length?P=G[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(P=mxUtils.getTextContent(M[0]))));var U=!0,X=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(P,I,R,!0,V,null,U,mxEvent.isControlDown(B)))});V&&null!=
+P&&P.length>this.resampleThreshold?this.confirmImageResize(function(n){U=n;X()},mxEvent.isControlDown(B)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(n){var C=Math.max(1,n.width);n=Math.max(1,n.height);var J=this.maxImageSize;J=Math.min(1,Math.min(J/Math.max(1,C)),J/Math.max(1,n));e.setSelectionCell(e.insertVertex(null,null,"",I,R,C*J,n*J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+W+";"))}),mxUtils.bind(this,function(n){e.setSelectionCells(this.insertTextAt(W,I,R,!0))})):0<=mxUtils.indexOf(B.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(B.dataTransfer.getData("text/plain"),I,R,!0))}}B.stopPropagation();B.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
+mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var p=g.items;for(index in p){var v=p[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(z,y,L,N,K,q){c.insertImage(z,K,q)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var y=0;y<z.length;y++)z[y]()});else{var x=
+this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var k=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var v=mxEvent.getSource(q);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==v.nodeName||"TEXTAREA"==v.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||k||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",
-e.container.appendChild(g),k=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(q){var v=q.keyCode;window.setTimeout(mxUtils.bind(this,function(){!k||224!=v&&17!=v&&91!=v&&93!=v||(k=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),
-this.copyCells(g),c()}catch(v){this.handleError(v)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(v){this.handleError(v)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(q){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=q.clipboardData&&this.pasteCells(q,g,!0,!0),mxEvent.isConsumed(q)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(q,g,!1,
-!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(q){return mxEvent.getSource(q)==g?!0:m.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var v=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==v.nodeName||"TEXTAREA"==v.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||k||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",
+e.container.appendChild(g),k=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var v=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!k||224!=v&&17!=v&&91!=v&&93!=v||(k=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),
+this.copyCells(g),c()}catch(v){this.handleError(v)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(v){this.handleError(v)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(p){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=p.clipboardData&&this.pasteCells(p,g,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,g,!1,
+!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==g?!0:m.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=
-c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var e=function(k,m,q){null==k[m]&&(k[m]=q)},g=this.editor.graph;
+c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var e=function(k,m,p){null==k[m]&&(k[m]=p)},g=this.editor.graph;
Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,"jettySize","auto");e(g.defaultEdgeStyle,"orthogonalLoop",
"1");e(g.defaultEdgeStyle,"endArrow","open");e(g.defaultEdgeStyle,"endSize","14");e(g.defaultEdgeStyle,"startSize","14");c&&(e(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),e(g.defaultVertexStyle,"hachureGap","4"),e(g.defaultVertexStyle,"sketch","1"),e(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),e(g.defaultEdgeStyle,"sketch","1"),e(g.defaultEdgeStyle,"hachureGap",
"4"),e(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),e(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==
@@ -11987,88 +11988,88 @@ mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var q=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),y=parseInt(m.getAttribute("height"));this.writeImageToClipboard(q,v,y,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k=
mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(k));mxUtils.setTextContent(c,encodeURIComponent(m));e?(g.removeCells(k,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
-e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,k){var m=this.editor.graph,q=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var v=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))q=this.importXml(c,v,v),m.setSelectionCells(q);else if(e&&1==m.getSelectionCount()){v=m.getStartEditingCell(m.getSelectionCell(),k);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(v)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,
-c,[v]);else{m.model.beginUpdate();try{m.labelChanged(v,c),Graph.isLink(c)&&m.setLinkForCell(v,c)}finally{m.model.endUpdate()}}m.setSelectionCell(v)}else q=m.getInsertPoint(),m.isMouseInsertPoint()&&(v=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),q=this.insertTextAt(c,q.x+v,q.y+v,!0),m.setSelectionCells(q);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return q};EditorUi.prototype.pasteCells=
-function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,q=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),y=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var A=decodeURIComponent(v);this.isCompatibleString(A)&&(y=!0,v=A)}catch(M){}y=y?null:c.clipboardData.getData("text/html");null!=y&&0<y.length?(m=this.parseHtmlData(y),q="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
-y))}v=m.getElementsByTagName("span");if(null!=v&&0<v.length&&"application/vnd.lucid.chart.objects"===v[0].getAttribute("data-lucid-type"))g=v[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(M){var n=this.editor.graph;n.lastPasteXml==M?n.pasteCounter++:(n.lastPasteXml=M,n.pasteCounter=0);var x=n.pasteCounter*n.gridSize;n.setSelectionCells(this.importXml(M,x,x));n.scrollCellToVisible(n.getSelectionCell())}),mxUtils.bind(this,function(M){this.handleError(M)})),
-mxEvent.consume(c));else{q=q?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);y=!1;try{var z=q.lastIndexOf("%3E");0<=z&&z<q.length-3&&(q=q.substring(0,z+3))}catch(M){}try{v=m.getElementsByTagName("span"),(A=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=A)}catch(M){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(M){console.log("Miro import error:",M)}this.pasteXml(q,k,y,c);try{mxEvent.consume(c)}catch(M){}}else if(!g){var L=this.editor.graph;L.lastPasteXml=null;L.pasteCounter=0}}catch(M){this.handleError(M)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",
+e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,k){var m=this.editor.graph,p=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var v=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))p=this.importXml(c,v,v),m.setSelectionCells(p);else if(e&&1==m.getSelectionCount()){v=m.getStartEditingCell(m.getSelectionCell(),k);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(v)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,
+c,[v]);else{m.model.beginUpdate();try{m.labelChanged(v,c),Graph.isLink(c)&&m.setLinkForCell(v,c)}finally{m.model.endUpdate()}}m.setSelectionCell(v)}else p=m.getInsertPoint(),m.isMouseInsertPoint()&&(v=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),p=this.insertTextAt(c,p.x+v,p.y+v,!0),m.setSelectionCells(p);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return p};EditorUi.prototype.pasteCells=
+function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),x=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var z=decodeURIComponent(v);this.isCompatibleString(z)&&(x=!0,v=z)}catch(N){}x=x?null:c.clipboardData.getData("text/html");null!=x&&0<x.length?(m=this.parseHtmlData(x),p="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
+x))}v=m.getElementsByTagName("span");if(null!=v&&0<v.length&&"application/vnd.lucid.chart.objects"===v[0].getAttribute("data-lucid-type"))g=v[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(N){var K=this.editor.graph;K.lastPasteXml==N?K.pasteCounter++:(K.lastPasteXml=N,K.pasteCounter=0);var q=K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(N,q,q));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(N){this.handleError(N)})),
+mxEvent.consume(c));else{p=p?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);x=!1;try{var y=p.lastIndexOf("%3E");0<=y&&y<p.length-3&&(p=p.substring(0,y+3))}catch(N){}try{v=m.getElementsByTagName("span"),(z=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(p))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(x=!0,p=z)}catch(N){}try{if(null!=p&&0<p.length){if(0==p.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(p=(new MiroImporter).importMiroJson(JSON.parse(p)))}catch(N){console.log("Miro import error:",N)}this.pasteXml(p,k,x,c);try{mxEvent.consume(c)}catch(N){}}else if(!g){var L=this.editor.graph;L.lastPasteXml=null;L.pasteCounter=0}}catch(N){this.handleError(N)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",
function(k){null!=e&&(e.parentNode.removeChild(e),e=null);k.stopPropagation();k.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(k){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());k.stopPropagation();k.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(k){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)if(0<k.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(k.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(k)&&!mxEvent.isShiftDown(k)):this.openFiles(k.dataTransfer.files,!0);else{var m=this.extractGraphModelFromEvent(k);if(null==m){var q=null!=k.dataTransfer?k.dataTransfer:k.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?m=q.getData("Text"):(m=null,m=0<=mxUtils.indexOf(q.types,
-"text/uri-list")?k.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=m&&0<m.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(m),q=q.getElementsByTagName("img"),0<q.length&&(m=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(m=q.getData("text/plain"))),null!=m&&(Editor.isPngDataUrl(m)?(m=Editor.extractGraphModelFromPng(m),null!=m&&0<m.length&&this.openLocalFile(m,null,!0)):this.isRemoteFileFormat(m)?
+"1"!=urlParams.embed)if(0<k.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(k.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(k)&&!mxEvent.isShiftDown(k)):this.openFiles(k.dataTransfer.files,!0);else{var m=this.extractGraphModelFromEvent(k);if(null==m){var p=null!=k.dataTransfer?k.dataTransfer:k.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?m=p.getData("Text"):(m=null,m=0<=mxUtils.indexOf(p.types,
+"text/uri-list")?k.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=m&&0<m.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(m),p=p.getElementsByTagName("img"),0<p.length&&(m=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(m=p.getData("text/plain"))),null!=m&&(Editor.isPngDataUrl(m)?(m=Editor.extractGraphModelFromPng(m),null!=m&&0<m.length&&this.openLocalFile(m,null,!0)):this.isRemoteFileFormat(m)?
this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(m))).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()&&this.openLocalFile(v.getText(),null,!0)})):/^https?:\/\//.test(m)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(m):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(m)))))}else this.openLocalFile(m,
-null,!0)}k.stopPropagation();k.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var k=document.body;var m=document.documentElement;var q=(k.clientWidth||m.clientWidth)-3;k=Math.max(k.clientHeight||0,m.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,q=c.clientWidth,k=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";
-m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,q-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
-g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(y){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==y.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-k);try{this.loadLibrary(new LocalLibrary(this,y,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(y){4==y.readyState&&(this.spinner.stop(),200<=y.status&&299>=y.status?q(y.responseText):this.handleError({message:mxResources.get(413==y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,
-function(y){this.spinner.stop();this.openLocalFile(y,e,k)}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,k);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(y){this.spinner.stop();
-q(y)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
-new FileReader;m.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var q=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile=
-null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var y=mxUtils.parseXml(c);null!=y&&(this.editor.setGraphXml(y.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,k,m))});if(null!=c&&0<c.length)null==q||!q.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)?v():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)&&null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,
-mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=
-0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var y=v.lastIndexOf(".");0<y&&(v=v.substring(y+1,v.length));null==e[v]&&(e[v]=!0)}}var k=this.editor.graph,m=k.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));k.model.isEdge(c)&&
-(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var q=0;q<m;q++)this.addBasenamesForCell(k.model.getChildAt(c,q),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=
+null,!0)}k.stopPropagation();k.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var k=document.body;var m=document.documentElement;var p=(k.clientWidth||m.clientWidth)-3;k=Math.max(k.clientHeight||0,m.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,p=c.clientWidth,k=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";
+m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,p-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
+g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var p=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
+k);try{this.loadLibrary(new LocalLibrary(this,x,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(x,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
+(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(x){4==x.readyState&&(this.spinner.stop(),200<=x.status&&299>=x.status?p(x.responseText):this.handleError({message:mxResources.get(413==x.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,
+function(x){this.spinner.stop();this.openLocalFile(x,e,k)}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,k);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(x){this.spinner.stop();
+p(x)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
+new FileReader;m.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var p=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile=
+null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var x=mxUtils.parseXml(c);null!=x&&(this.editor.setGraphXml(x.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,k,m))});if(null!=c&&0<c.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)?v():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,
+mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=
+0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var x=v.lastIndexOf(".");0<x&&(v=v.substring(x+1,v.length));null==e[v]&&(e[v]=!0)}}var k=this.editor.graph,m=k.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));k.model.isEdge(c)&&
+(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var p=0;p<m;p++)this.addBasenamesForCell(k.model.getChildAt(c,p),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=
c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,k,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var v=q.model.cells,y;for(y in v){var A=v[y];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(z){console.log(z)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=k?k:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var v=p.model.cells,x;for(x in v){var z=v[x];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=k?k:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;
e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var k=e.background;if(null==k||k==mxConstants.NONE)k=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,k,1,this.embedExportBorder)}else c||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,q=mxUtils.bind(this,function(A,z){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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var z=A.data,L=null,M=mxUtils.bind(this,function(O){if(null!=O&&"function"===typeof O.charAt&&"<"!=O.charAt(0))try{Editor.isPngDataUrl(O)?O=Editor.extractGraphModelFromPng(O):"data:image/svg+xml;base64,"==O.substring(0,26)?O=atob(O.substring(26)):
-"data:image/svg+xml;utf8,"==O.substring(0,24)&&(O=O.substring(24)),null!=O&&("%"==O.charAt(0)?O=decodeURIComponent(O):"<"!=O.charAt(0)&&(O=Graph.decompress(O)))}catch(R){}return O});if("json"==urlParams.proto){var n=!1;try{z=JSON.parse(z),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[z])}catch(O){z=null}try{if(null==z)return;if("dialog"==z.action){this.showError(null!=z.titleKey?mxResources.get(z.titleKey):z.title,null!=z.messageKey?mxResources.get(z.messageKey):z.message,
-null!=z.buttonKey?mxResources.get(z.buttonKey):z.button);null!=z.modified&&(this.editor.modified=z.modified);return}if("layout"==z.action){this.executeLayoutList(z.layouts);return}if("prompt"==z.action){this.spinner.stop();var x=new FilenameDialog(this,z.defaultValue||"",null!=z.okKey?mxResources.get(z.okKey):z.ok,function(O){null!=O?v.postMessage(JSON.stringify({event:"prompt",value:O,message:z}),"*"):v.postMessage(JSON.stringify({event:"prompt-cancel",message:z}),"*")},null!=z.titleKey?mxResources.get(z.titleKey):
-z.title);this.showDialog(x.container,300,80,!0,!1);x.init();return}if("draft"==z.action){var K=M(z.xml);this.spinner.stop();x=new DraftDialog(this,mxResources.get("draftFound",[z.name||this.defaultFilename]),K,mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"edit",message:z}),"*")}),mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"discard",message:z}),"*")}),z.editKey?mxResources.get(z.editKey):null,
-z.discardKey?mxResources.get(z.discardKey):null,z.ignore?mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"ignore",message:z}),"*")}):null);this.showDialog(x.container,640,480,!0,!1,mxUtils.bind(this,function(O){O&&this.actions.get("exit").funct()}));try{x.init()}catch(O){v.postMessage(JSON.stringify({event:"draft",error:O.toString(),message:z}),"*")}return}if("template"==z.action){this.spinner.stop();var B=1==z.enableRecent,F=1==z.enableSearch,G=1==
-z.enableCustomTemp;if("1"==urlParams.newTempDlg&&!z.templatesOnly&&null!=z.callback){var N=this.getCurrentUser(),J=new TemplatesDialog(this,function(O,R,Y){O=O||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:O,blank:O==this.emptyDiagramXml,name:R,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:z}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=N?N.id:null,B?mxUtils.bind(this,function(O,R,Y){this.remoteInvoke("getRecentDiagrams",
-[Y],null,O,R)}):null,F?mxUtils.bind(this,function(O,R,Y,da){this.remoteInvoke("searchDiagrams",[O,da],null,R,Y)}):null,mxUtils.bind(this,function(O,R,Y){this.remoteInvoke("getFileContent",[O.url],null,R,Y)}),null,G?mxUtils.bind(this,function(O){this.remoteInvoke("getCustomTemplates",null,null,O,function(){O({},0)})}):null,!1,!1,!0,!0);this.showDialog(J.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}x=new NewDialog(this,!1,z.templatesOnly?!1:null!=z.callback,mxUtils.bind(this,
-function(O,R,Y,da){O=O||this.emptyDiagramXml;null!=z.callback?v.postMessage(JSON.stringify({event:"template",xml:O,blank:O==this.emptyDiagramXml,name:R,tempUrl:Y,libs:da,builtIn:!0,message:z}),"*"):(c(O,A,O!=this.emptyDiagramXml,z.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(O){this.remoteInvoke("getRecentDiagrams",[null],null,O,function(){O(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(O,R){this.remoteInvoke("searchDiagrams",
-[O,null],null,R,function(){R(null,"Network Error!")})}):null,mxUtils.bind(this,function(O,R,Y){v.postMessage(JSON.stringify({event:"template",docUrl:O,info:R,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(O){this.remoteInvoke("getCustomTemplates",null,null,O,function(){O({},0)})}):null,1==z.withoutType);this.showDialog(x.container,620,460,!0,!1,mxUtils.bind(this,function(O){this.sidebar.hideTooltip();O&&this.actions.get("exit").funct()}));x.init();return}if("textContent"==z.action){var E=
-this.getDiagramTextContent();v.postMessage(JSON.stringify({event:"textContent",data:E,message:z}),"*");return}if("status"==z.action){null!=z.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(z.messageKey))):null!=z.message&&this.editor.setStatus(mxUtils.htmlEntities(z.message));null!=z.modified&&(this.editor.modified=z.modified);return}if("spinner"==z.action){var H=null!=z.messageKey?mxResources.get(z.messageKey):z.message;null==z.show||z.show?this.spinner.spin(document.body,H):
-this.spinner.stop();return}if("exit"==z.action){this.actions.get("exit").funct();return}if("viewport"==z.action){null!=z.viewport&&(this.embedViewport=z.viewport);return}if("snapshot"==z.action){this.sendEmbeddedSvgExport(!0);return}if("export"==z.action){if("png"==z.format||"xmlpng"==z.format){if(null==z.spin&&null==z.spinKey||this.spinner.spin(document.body,null!=z.spinKey?mxResources.get(z.spinKey):z.spin)){var S=null!=z.xml?z.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,
-Q=mxUtils.bind(this,function(O){this.editor.graph.setEnabled(!0);this.spinner.stop();var R=this.createLoadMessage("export");R.format=z.format;R.message=z;R.data=O;R.xml=S;v.postMessage(JSON.stringify(R),"*")}),W=mxUtils.bind(this,function(O){null==O&&(O=Editor.blankImage);"xmlpng"==z.format&&(O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(S)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);Q(O)}),V=z.pageId||(null!=this.pages?z.currentPage?this.currentPage.getId():
-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var O=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var R,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==V){R=this.updatePageRoot(this.pages[Y]);break}null==R&&(R=this.currentPage);U.getGlobalVariable=function(ea){return"page"==ea?R.getName():"pagenumber"==ea?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(R.root)}if(null!=
-z.layerIds){var da=U.model,ha=da.getChildCells(da.getRoot()),Z={};for(Y=0;Y<z.layerIds.length;Y++)Z[z.layerIds[Y]]=!0;for(Y=0;Y<ha.length;Y++)da.setVisible(ha[Y],Z[ha[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ea){W(ea.toDataURL("image/png"))}),z.width,null,z.background,mxUtils.bind(this,function(){W(null)}),null,null,z.scale,z.transparent,z.shadow,null,U,z.border,null,z.grid,z.keepTheme)});null!=z.xml&&0<z.xml.length?(g=!0,this.setFileData(S),g=!1,this.editor.graph.mathEnabled?
-window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==z.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=z.layerIds&&0<z.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:z.layerIds})):"")+(null!=z.scale?"&scale="+z.scale:"")+"&base64=1&xml="+encodeURIComponent(S))).send(mxUtils.bind(this,function(O){200<=O.getStatus()&&299>=O.getStatus()?Q("data:image/png;base64,"+O.getText()):W(null)}),mxUtils.bind(this,
-function(){W(null)}))}}else X=mxUtils.bind(this,function(){var O=this.createLoadMessage("export");O.message=z;if("html2"==z.format||"html"==z.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var R=this.getXmlFileData();O.xml=mxUtils.getXml(R);O.data=this.getFileData(null,null,!0,null,null,null,R);O.format=z.format}else if("html"==z.format)R=this.editor.getGraphXml(),O.data=this.getHtml(R,this.editor.graph),O.xml=mxUtils.getXml(R),O.format=z.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;R=null!=z.background?z.background:this.editor.graph.background;R==mxConstants.NONE&&(R=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var Y=mxUtils.bind(this,function(da){this.editor.graph.setEnabled(!0);this.spinner.stop();O.data=Editor.createSvgDataUri(da);v.postMessage(JSON.stringify(O),"*")});if("xmlsvg"==z.format)(null==z.spin&&null==z.spinKey||this.spinner.spin(document.body,null!=z.spinKey?mxResources.get(z.spinKey):z.spin))&&this.getEmbeddedSvg(O.xml,
-this.editor.graph,null,!0,Y,null,null,z.embedImages,R,z.scale,z.border,z.shadow,z.keepTheme);else if(null==z.spin&&null==z.spinKey||this.spinner.spin(document.body,null!=z.spinKey?mxResources.get(z.spinKey):z.spin))this.editor.graph.setEnabled(!1),R=this.editor.graph.getSvg(R,z.scale,z.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||z.shadow,null,z.keepTheme),(this.editor.graph.shadowVisible||z.shadow)&&this.editor.graph.addSvgShadow(R),this.embedFonts(R,mxUtils.bind(this,function(da){z.embedImages||
-null==z.embedImages?this.editor.convertImages(da,mxUtils.bind(this,function(ha){Y(mxUtils.getXml(ha))})):Y(mxUtils.getXml(da))}));return}v.postMessage(JSON.stringify(O),"*")}),null!=z.xml&&0<z.xml.length?(g=!0,this.setFileData(z.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==z.action){n=z.toSketch;k=1==z.autosave;this.hideDialog();null!=z.modified&&null==urlParams.modified&&(urlParams.modified=z.modified);null!=z.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=z.saveAndExit);null!=z.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=z.noSaveBtn);if(null!=z.rough){var p=Editor.sketchMode;this.doSetSketchMode(z.rough);p!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=z.dark&&(p=Editor.darkMode,this.doSetDarkMode(z.dark),p!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=z.border&&(this.embedExportBorder=z.border);null!=z.background&&(this.embedExportBackground=
-z.background);null!=z.viewport&&(this.embedViewport=z.viewport);this.embedExitPoint=null;if(null!=z.rect){var C=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=z.rect.top+"px";this.diagramContainer.style.left=z.rect.left+"px";this.diagramContainer.style.height=z.rect.height+"px";this.diagramContainer.style.width=z.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var O=
-this.editor.graph,R=O.maxFitScale;O.maxFitScale=z.maxFitScale;O.fit(2*C);O.maxFitScale=R;O.container.scrollTop-=2*C;O.container.scrollLeft-=2*C;this.fireEvent(new mxEventObject("editInlineStart","data",[z]))})}null!=z.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=z.noExitBtn);null!=z.title&&null!=this.buttonContainer&&(K=document.createElement("span"),mxUtils.write(K,z.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(K),
-this.embedFilenameSpan=K);try{z.libs&&this.sidebar.showEntries(z.libs)}catch(O){}z=null!=z.xmlpng?this.extractGraphModelFromPng(z.xmlpng):null!=z.descriptor?z.descriptor:z.xml}else{if("merge"==z.action){var I=this.getCurrentFile();null!=I&&(K=M(z.xml),null!=K&&""!=K&&I.mergeFile(new LocalFile(this,K),function(){v.postMessage(JSON.stringify({event:"merge",message:z}),"*")},function(O){v.postMessage(JSON.stringify({event:"merge",message:z,error:O}),"*")}))}else"remoteInvokeReady"==z.action?this.handleRemoteInvokeReady(v):
-"remoteInvoke"==z.action?this.handleRemoteInvoke(z,A.origin):"remoteInvokeResponse"==z.action?this.handleRemoteInvokeResponse(z):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(z)}),"*");return}}catch(O){this.handleError(O)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),P=mxUtils.bind(this,function(O,R){g=!0;try{c(O,R,null,n)}catch(Y){this.handleError(Y)}g=
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,p=mxUtils.bind(this,function(z,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&
+this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var y=z.data,L=null,N=mxUtils.bind(this,function(O){if(null!=O&&"function"===typeof O.charAt&&"<"!=O.charAt(0))try{Editor.isPngDataUrl(O)?O=Editor.extractGraphModelFromPng(O):"data:image/svg+xml;base64,"==O.substring(0,26)?O=atob(O.substring(26)):
+"data:image/svg+xml;utf8,"==O.substring(0,24)&&(O=O.substring(24)),null!=O&&("%"==O.charAt(0)?O=decodeURIComponent(O):"<"!=O.charAt(0)&&(O=Graph.decompress(O)))}catch(S){}return O});if("json"==urlParams.proto){var K=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[y])}catch(O){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,
+null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayoutList(y.layouts);return}if("prompt"==y.action){this.spinner.stop();var q=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(O){null!=O?v.postMessage(JSON.stringify({event:"prompt",value:O,message:y}),"*"):v.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):
+y.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==y.action){var E=N(y.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),E,mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,
+y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(O){O&&this.actions.get("exit").funct()}));try{q.init()}catch(O){v.postMessage(JSON.stringify({event:"draft",error:O.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var A=1==y.enableRecent,B=1==y.enableSearch,G=1==
+y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var M=this.getCurrentUser(),H=new TemplatesDialog(this,function(O,S,Y){O=O||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:O,blank:O==this.emptyDiagramXml,name:S,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=M?M.id:null,A?mxUtils.bind(this,function(O,S,Y){this.remoteInvoke("getRecentDiagrams",
+[Y],null,O,S)}):null,B?mxUtils.bind(this,function(O,S,Y,da){this.remoteInvoke("searchDiagrams",[O,da],null,S,Y)}):null,mxUtils.bind(this,function(O,S,Y){this.remoteInvoke("getFileContent",[O.url],null,S,Y)}),null,G?mxUtils.bind(this,function(O){this.remoteInvoke("getCustomTemplates",null,null,O,function(){O({},0)})}):null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,
+function(O,S,Y,da){O=O||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:O,blank:O==this.emptyDiagramXml,name:S,tempUrl:Y,libs:da,builtIn:!0,message:y}),"*"):(c(O,z,O!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(O){this.remoteInvoke("getRecentDiagrams",[null],null,O,function(){O(null,"Network Error!")})}):null,B?mxUtils.bind(this,function(O,S){this.remoteInvoke("searchDiagrams",
+[O,null],null,S,function(){S(null,"Network Error!")})}):null,mxUtils.bind(this,function(O,S,Y){v.postMessage(JSON.stringify({event:"template",docUrl:O,info:S,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(O){this.remoteInvoke("getCustomTemplates",null,null,O,function(){O({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(O){this.sidebar.hideTooltip();O&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==y.action){var F=
+this.getDiagramTextContent();v.postMessage(JSON.stringify({event:"textContent",data:F,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var I=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,I):
+this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var R=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var W=this.editor.graph,
+P=mxUtils.bind(this,function(O){this.editor.graph.setEnabled(!0);this.spinner.stop();var S=this.createLoadMessage("export");S.format=y.format;S.message=y;S.data=O;S.xml=R;v.postMessage(JSON.stringify(S),"*")}),V=mxUtils.bind(this,function(O){null==O&&(O=Editor.blankImage);"xmlpng"==y.format&&(O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(R)));W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);P(O)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var O=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var S,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){S=this.updatePageRoot(this.pages[Y]);break}null==S&&(S=this.currentPage);W.getGlobalVariable=function(ea){return"page"==ea?S.getName():"pagenumber"==ea?1:O.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=
+y.layerIds){var da=W.model,ha=da.getChildCells(da.getRoot()),Z={};for(Y=0;Y<y.layerIds.length;Y++)Z[y.layerIds[Y]]=!0;for(Y=0;Y<ha.length;Y++)da.setVisible(ha[Y],Z[ha[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ea){V(ea.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){V(null)}),null,null,y.scale,y.transparent,y.shadow,null,W,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(R),g=!1,this.editor.graph.mathEnabled?
+window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(O){200<=O.getStatus()&&299>=O.getStatus()?P("data:image/png;base64,"+O.getText()):V(null)}),mxUtils.bind(this,
+function(){V(null)}))}}else X=mxUtils.bind(this,function(){var O=this.createLoadMessage("export");O.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var S=this.getXmlFileData();O.xml=mxUtils.getXml(S);O.data=this.getFileData(null,null,!0,null,null,null,S);O.format=y.format}else if("html"==y.format)S=this.editor.getGraphXml(),O.data=this.getHtml(S,this.editor.graph),O.xml=mxUtils.getXml(S),O.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=
+null;S=null!=y.background?y.background:this.editor.graph.background;S==mxConstants.NONE&&(S=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var Y=mxUtils.bind(this,function(da){this.editor.graph.setEnabled(!0);this.spinner.stop();O.data=Editor.createSvgDataUri(da);v.postMessage(JSON.stringify(O),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(O.xml,
+this.editor.graph,null,!0,Y,null,null,y.embedImages,S,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),S=this.editor.graph.getSvg(S,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(da){y.embedImages||
+null==y.embedImages?this.editor.convertImages(da,mxUtils.bind(this,function(ha){Y(mxUtils.getXml(ha))})):Y(mxUtils.getXml(da))}));return}v.postMessage(JSON.stringify(O),"*")}),null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(y.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==y.action){K=y.toSketch;k=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var n=Editor.sketchMode;this.doSetSketchMode(y.rough);n!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(n=Editor.darkMode,this.doSetDarkMode(y.dark),n!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=
+y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var C=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var O=
+this.editor.graph,S=O.maxFitScale;O.maxFitScale=y.maxFitScale;O.fit(2*C);O.maxFitScale=S;O.container.scrollTop-=2*C;O.container.scrollLeft-=2*C;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(E=document.createElement("span"),mxUtils.write(E,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(E),
+this.embedFilenameSpan=E);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(O){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var J=this.getCurrentFile();null!=J&&(E=N(y.xml),null!=E&&""!=E&&J.mergeFile(new LocalFile(this,E),function(){v.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(O){v.postMessage(JSON.stringify({event:"merge",message:y,error:O}),"*")}))}else"remoteInvokeReady"==y.action?this.handleRemoteInvokeReady(v):
+"remoteInvoke"==y.action?this.handleRemoteInvoke(y,z.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(O){this.handleError(O)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Q=mxUtils.bind(this,function(O,S){g=!0;try{c(O,S,null,K)}catch(Y){this.handleError(Y)}g=
!1;null!=urlParams.modified&&this.editor.setStatus("");m=T();k&&null==e&&(e=mxUtils.bind(this,function(Y,da){Y=T();Y==m||g||(da=this.createLoadMessage("autosave"),da.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));m=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",
-e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)R=this.createLoadMessage("load"),R.xml=O,v.postMessage(JSON.stringify(R),"*");null!=L&&L()});null!=z&&"function"===typeof z.substring&&"data:application/vnd.visio;base64,"==z.substring(0,34)?
-(M="0M8R4KGxGuE"==z.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(z.substring(z.indexOf(",")+1)),function(O){P(O,A)},mxUtils.bind(this,function(O){this.handleError(O)}),M)):null!=z&&"function"===typeof z.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(z,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(z,mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&"<mxGraphModel"==
-O.responseText.substring(0,13)&&P(O.responseText,A)}),""):null!=z&&"function"===typeof z.substring&&this.isLucidChartData(z)?this.convertLucidChart(z,mxUtils.bind(this,function(O){P(O)}),mxUtils.bind(this,function(O){this.handleError(O)})):null==z||"object"!==typeof z||null==z.format||null==z.data&&null==z.url?(z=M(z),P(z,A)):this.loadDescriptor(z,mxUtils.bind(this,function(O){P(T(),A)}),mxUtils.bind(this,function(O){this.handleError(O,mxResources.get("errorLoadingFile"))}))}}));var v=window.opener||
-window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(A,z,L){y.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:A,target:z,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position=
+e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)S=this.createLoadMessage("load"),S.xml=O,v.postMessage(JSON.stringify(S),"*");null!=L&&L()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?
+(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(O){Q(O,z)},mxUtils.bind(this,function(O){this.handleError(O)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&"<mxGraphModel"==
+O.responseText.substring(0,13)&&Q(O.responseText,z)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(O){Q(O)}),mxUtils.bind(this,function(O){this.handleError(O)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=N(y),Q(y,z)):this.loadDescriptor(y,mxUtils.bind(this,function(O){Q(T(),z)}),mxUtils.bind(this,function(O){this.handleError(O,mxResources.get("errorLoadingFile"))}))}}));var v=window.opener||
+window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(p,"*");if("json"==urlParams.proto){var x=this.editor.graph.openLink;this.editor.graph.openLink=function(z,y,L){x.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:z,target:y,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position=
"absolute";c.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";var e=document.createElement("button");e.className="geBigButton";var g=e;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,k);e.setAttribute("title",k);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e),g=e);"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e),g=e);g.style.marginRight="20px";this.toolbar.container.appendChild(c);
this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(c,e){for(var g=this.editor.graph,k=g.getSelectionCells(),m=0;m<c.length;m++){var q=new window[c[m].layout](g);if(null!=c[m].config)for(var v in c[m].config)q[v]=c[m].config[v];this.executeLayout(function(){q.execute(g.getDefaultParent(),0==k.length?null:k)},m==c.length-1,e)}};EditorUi.prototype.importCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],q=[],v={};if(0<g.length){var y={},
-A=this.editor.graph,z=null,L=null,M=null,n=null,x=null,K=null,B=null,F="whiteSpace=wrap;html=1;",G=null,N=null,J="",E="auto",H="auto",S=null,U=null,Q=40,W=40,V=100,X=0,p=function(){null!=e?e(ta):(A.setSelectionCells(ta),A.scrollCellToVisible(A.getSelectionCell()))},C=A.getFreeInsertPoint(),I=C.x,T=C.y;C=T;var P=null,O="auto";N=null;for(var R=[],Y=null,da=null,ha=0;ha<g.length&&"#"==g[ha].charAt(0);){c=g[ha].replace(/\r$/,"");for(ha++;ha<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ha].charAt(0);)c=
-c.substring(0,c.length-1)+mxUtils.trim(g[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var Z=c.indexOf(":");if(0<Z){var ea=mxUtils.trim(c.substring(1,Z)),aa=mxUtils.trim(c.substring(Z+1));"label"==ea?P=A.sanitizeHtml(aa):"labelname"==ea&&0<aa.length&&"-"!=aa?x=aa:"labels"==ea&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==ea?L=aa:"parentstyle"==ea?F=aa:"unknownStyle"==ea&&"-"!=aa?K=aa:"stylename"==ea&&0<aa.length&&"-"!=aa?n=aa:"styles"==ea&&0<aa.length&&"-"!=aa?M=JSON.parse(aa):"vars"==ea&&0<aa.length&&
-"-"!=aa?z=JSON.parse(aa):"identity"==ea&&0<aa.length&&"-"!=aa?G=aa:"parent"==ea&&0<aa.length&&"-"!=aa?N=aa:"namespace"==ea&&0<aa.length&&"-"!=aa?J=aa:"width"==ea?E=aa:"height"==ea?H=aa:"left"==ea&&0<aa.length?S=aa:"top"==ea&&0<aa.length?U=aa:"ignore"==ea?da=aa.split(","):"connect"==ea?R.push(JSON.parse(aa)):"link"==ea?Y=aa:"padding"==ea?X=parseFloat(aa):"edgespacing"==ea?Q=parseFloat(aa):"nodespacing"==ea?W=parseFloat(aa):"levelspacing"==ea?V=parseFloat(aa):"layout"==ea&&(O=aa)}}}if(null==g[ha])throw Error(mxResources.get("invalidOrMissingFile"));
-var va=this.editor.csvToArray(g[ha].replace(/\r$/,""));Z=c=null;ea=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(c=aa),N==va[aa]&&(Z=aa),ea.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==P&&(P="%"+ea[0]+"%");if(null!=R)for(var la=0;la<R.length;la++)null==y[R[la].to]&&(y[R[la].to]={});G=[];for(aa=ha+1;aa<g.length;aa++){var Aa=this.editor.csvToArray(g[aa].replace(/\r$/,""));if(null==Aa){var Ba=40<g[aa].length?g[aa].substring(0,40)+"...":g[aa];throw Error(Ba+
-" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Aa.length&&G.push(Aa)}A.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Aa=G[aa];var ua=null,Da=null!=c?J+Aa[c]:null;null!=Da&&(ua=A.model.getCell(Da));g=null!=ua;var Fa=new mxCell(P,new mxGeometry(I,C,0,0),L||"whiteSpace=wrap;html=1;");Fa.vertex=!0;Fa.id=Da;Ba=null!=ua?ua:Fa;for(var Ka=0;Ka<Aa.length;Ka++)A.setAttributeForCell(Ba,ea[Ka],Aa[Ka]);if(null!=x&&null!=B){var Oa=B[Ba.getAttribute(x)];null!=Oa&&A.labelChanged(Ba,Oa)}if(null!=
-n&&null!=M){var Ia=M[Ba.getAttribute(n)];null!=Ia&&(Ba.style=Ia)}A.setAttributeForCell(Ba,"placeholders","1");Ba.style=A.replacePlaceholders(Ba,Ba.style,z);g?(0>mxUtils.indexOf(q,ua)&&q.push(ua),A.fireEvent(new mxEventObject("cellsInserted","cells",[ua]))):A.fireEvent(new mxEventObject("cellsInserted","cells",[Fa]));ua=Fa;if(!g)for(la=0;la<R.length;la++)y[R[la].to][ua.getAttribute(R[la].to)]=ua;null!=Y&&"link"!=Y&&(A.setLinkForCell(ua,ua.getAttribute(Y)),A.setAttributeForCell(ua,Y,null));var Ea=this.editor.graph.getPreferredSizeForCell(ua);
-N=null!=Z?A.model.getCell(J+Aa[Z]):null;if(ua.vertex){Ba=null!=N?0:I;ha=null!=N?0:T;null!=S&&null!=ua.getAttribute(S)&&(ua.geometry.x=Ba+parseFloat(ua.getAttribute(S)));null!=U&&null!=ua.getAttribute(U)&&(ua.geometry.y=ha+parseFloat(ua.getAttribute(U)));var Ca="@"==E.charAt(0)?ua.getAttribute(E.substring(1)):null;ua.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ua.getAttribute(E.substring(1))):"auto"==E||"auto"==Ca?Ea.width+X:parseFloat(E);var Ma="@"==H.charAt(0)?ua.getAttribute(H.substring(1)):
-null;ua.geometry.height=null!=Ma&&"auto"!=Ma?parseFloat(Ma):"auto"==H||"auto"==Ma?Ea.height+X:parseFloat(H);C+=ua.geometry.height+W}g?(null==v[Da]&&(v[Da]=[]),v[Da].push(ua)):(k.push(ua),null!=N?(N.style=A.replacePlaceholders(N,F,z),A.addCell(ua,N),m.push(N)):q.push(A.addCell(ua)))}for(aa=0;aa<m.length;aa++)Ca="@"==E.charAt(0)?m[aa].getAttribute(E.substring(1)):null,Ma="@"==H.charAt(0)?m[aa].getAttribute(H.substring(1)):null,"auto"!=E&&"auto"!=Ca||"auto"!=H&&"auto"!=Ma||A.updateGroupBounds([m[aa]],
-X,!0);var za=q.slice(),ta=q.slice();for(la=0;la<R.length;la++){var ka=R[la];for(aa=0;aa<k.length;aa++){ua=k[aa];var pa=mxUtils.bind(this,function(ia,ma,qa){var oa=ma.getAttribute(qa.from);if(null!=oa&&""!=oa){oa=oa.split(",");for(var na=0;na<oa.length;na++){var Ja=y[qa.to][oa[na]];if(null==Ja&&null!=K){Ja=new mxCell(oa[na],new mxGeometry(I,T,0,0),K);Ja.style=A.replacePlaceholders(ma,Ja.style,z);var Ga=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Ga.width+X;Ja.geometry.height=Ga.height+
-X;y[qa.to][oa[na]]=Ja;Ja.vertex=!0;Ja.id=oa[na];q.push(A.addCell(Ja))}if(null!=Ja){Ga=qa.label;null!=qa.fromlabel&&(Ga=(ma.getAttribute(qa.fromlabel)||"")+(Ga||""));null!=qa.sourcelabel&&(Ga=A.replacePlaceholders(ma,qa.sourcelabel,z)+(Ga||""));null!=qa.tolabel&&(Ga=(Ga||"")+(Ja.getAttribute(qa.tolabel)||""));null!=qa.targetlabel&&(Ga=(Ga||"")+A.replacePlaceholders(Ja,qa.targetlabel,z));var Ra="target"==qa.placeholders==!qa.invert?Ja:ia;Ra=null!=qa.style?A.replacePlaceholders(Ra,qa.style,z):A.createCurrentEdgeStyle();
-Ga=A.insertEdge(null,null,Ga||"",qa.invert?Ja:ia,qa.invert?ia:Ja,Ra);if(null!=qa.labels)for(Ra=0;Ra<qa.labels.length;Ra++){var Sa=qa.labels[Ra],Ha=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ha.vertex=!0;Ha.connectable=!1;Ha.geometry.relative=!0;null!=Sa.placeholders&&(Ha.value=A.replacePlaceholders("target"==Sa.placeholders==!qa.invert?Ja:ia,Ha.value,z));if(null!=Sa.dx||null!=Sa.dy)Ha.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
-Sa.dy?Sa.dy:0);Ga.insert(Ha)}ta.push(Ga);mxUtils.remove(qa.invert?ia:Ja,za)}}}});pa(ua,ua,ka);if(null!=v[ua.id])for(Ka=0;Ka<v[ua.id].length;Ka++)pa(ua,v[ua.id][Ka],ka)}}if(null!=da)for(aa=0;aa<k.length;aa++)for(ua=k[aa],Ka=0;Ka<da.length;Ka++)A.setAttributeForCell(ua,mxUtils.trim(da[Ka]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(A);sa.spacing=Q;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(A.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=A.getCellGeometry(q[ia]);
-ma.x=Math.round(A.snap(ma.x));ma.y=Math.round(A.snap(ma.y));"auto"==E&&(ma.width=Math.round(A.snap(ma.width)));"auto"==H&&(ma.height=Math.round(A.snap(ma.height)))}};if("["==O.charAt(0)){var wa=p;A.view.validate();this.executeLayoutList(JSON.parse(O),function(){ya();wa()});p=null}else if("circle"==O){var ra=new mxCircleLayout(A);ra.disableEdgeStyle=!1;ra.resetEdges=!1;var xa=ra.isVertexIgnored;ra.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ra.execute(A.getDefaultParent());
-ya()},!0,p);p=null}else if("horizontaltree"==O||"verticaltree"==O||"auto"==O&&ta.length==2*q.length-1&&1==za.length){A.view.validate();var fa=new mxCompactTreeLayout(A,"horizontaltree"==O);fa.levelDistance=W;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(A.getDefaultParent(),0<za.length?za[0]:null)},!0,p);p=null}else if("horizontalflow"==O||"verticalflow"==O||"auto"==O&&1==za.length){A.view.validate();var ca=new mxHierarchicalLayout(A,"horizontalflow"==O?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=W;ca.parallelEdgeSpacing=Q;ca.interRankCellSpacing=V;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(A.getDefaultParent(),ta);A.moveCells(ta,I,T)},!0,p);p=null}else if("organic"==O||"auto"==O&&ta.length>q.length){A.view.validate();var ba=new mxFastOrganicLayout(A);ba.forceConstant=3*W;ba.disableEdgeStyle=!1;ba.resetEdges=!1;var ja=ba.isVertexIgnored;ba.isVertexIgnored=function(ia){return ja.apply(this,arguments)||0>mxUtils.indexOf(q,
-ia)};this.executeLayout(function(){ba.execute(A.getDefaultParent());ya()},!0,p);p=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=p&&p()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(c,e){for(var g=this.editor.graph,k=g.getSelectionCells(),m=0;m<c.length;m++){var p=new window[c[m].layout](g);if(null!=c[m].config)for(var v in c[m].config)p[v]=c[m].config[v];this.executeLayout(function(){p.execute(g.getDefaultParent(),0==k.length?null:k)},m==c.length-1,e)}};EditorUi.prototype.importCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],p=[],v={};if(0<g.length){var x={},
+z=this.editor.graph,y=null,L=null,N=null,K=null,q=null,E=null,A=null,B="whiteSpace=wrap;html=1;",G=null,M=null,H="",F="auto",I="auto",R=null,W=null,P=40,V=40,U=100,X=0,n=function(){null!=e?e(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()))},C=z.getFreeInsertPoint(),J=C.x,T=C.y;C=T;var Q=null,O="auto";M=null;for(var S=[],Y=null,da=null,ha=0;ha<g.length&&"#"==g[ha].charAt(0);){c=g[ha].replace(/\r$/,"");for(ha++;ha<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ha].charAt(0);)c=
+c.substring(0,c.length-1)+mxUtils.trim(g[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var Z=c.indexOf(":");if(0<Z){var ea=mxUtils.trim(c.substring(1,Z)),aa=mxUtils.trim(c.substring(Z+1));"label"==ea?Q=z.sanitizeHtml(aa):"labelname"==ea&&0<aa.length&&"-"!=aa?q=aa:"labels"==ea&&0<aa.length&&"-"!=aa?A=JSON.parse(aa):"style"==ea?L=aa:"parentstyle"==ea?B=aa:"unknownStyle"==ea&&"-"!=aa?E=aa:"stylename"==ea&&0<aa.length&&"-"!=aa?K=aa:"styles"==ea&&0<aa.length&&"-"!=aa?N=JSON.parse(aa):"vars"==ea&&0<aa.length&&
+"-"!=aa?y=JSON.parse(aa):"identity"==ea&&0<aa.length&&"-"!=aa?G=aa:"parent"==ea&&0<aa.length&&"-"!=aa?M=aa:"namespace"==ea&&0<aa.length&&"-"!=aa?H=aa:"width"==ea?F=aa:"height"==ea?I=aa:"left"==ea&&0<aa.length?R=aa:"top"==ea&&0<aa.length?W=aa:"ignore"==ea?da=aa.split(","):"connect"==ea?S.push(JSON.parse(aa)):"link"==ea?Y=aa:"padding"==ea?X=parseFloat(aa):"edgespacing"==ea?P=parseFloat(aa):"nodespacing"==ea?V=parseFloat(aa):"levelspacing"==ea?U=parseFloat(aa):"layout"==ea&&(O=aa)}}}if(null==g[ha])throw Error(mxResources.get("invalidOrMissingFile"));
+var va=this.editor.csvToArray(g[ha].replace(/\r$/,""));Z=c=null;ea=[];for(aa=0;aa<va.length;aa++)G==va[aa]&&(c=aa),M==va[aa]&&(Z=aa),ea.push(mxUtils.trim(va[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+ea[0]+"%");if(null!=S)for(var la=0;la<S.length;la++)null==x[S[la].to]&&(x[S[la].to]={});G=[];for(aa=ha+1;aa<g.length;aa++){var Aa=this.editor.csvToArray(g[aa].replace(/\r$/,""));if(null==Aa){var Ba=40<g[aa].length?g[aa].substring(0,40)+"...":g[aa];throw Error(Ba+
+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Aa.length&&G.push(Aa)}z.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Aa=G[aa];var ua=null,Da=null!=c?H+Aa[c]:null;null!=Da&&(ua=z.model.getCell(Da));g=null!=ua;var Fa=new mxCell(Q,new mxGeometry(J,C,0,0),L||"whiteSpace=wrap;html=1;");Fa.vertex=!0;Fa.id=Da;Ba=null!=ua?ua:Fa;for(var Ka=0;Ka<Aa.length;Ka++)z.setAttributeForCell(Ba,ea[Ka],Aa[Ka]);if(null!=q&&null!=A){var Oa=A[Ba.getAttribute(q)];null!=Oa&&z.labelChanged(Ba,Oa)}if(null!=
+K&&null!=N){var Ia=N[Ba.getAttribute(K)];null!=Ia&&(Ba.style=Ia)}z.setAttributeForCell(Ba,"placeholders","1");Ba.style=z.replacePlaceholders(Ba,Ba.style,y);g?(0>mxUtils.indexOf(p,ua)&&p.push(ua),z.fireEvent(new mxEventObject("cellsInserted","cells",[ua]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Fa]));ua=Fa;if(!g)for(la=0;la<S.length;la++)x[S[la].to][ua.getAttribute(S[la].to)]=ua;null!=Y&&"link"!=Y&&(z.setLinkForCell(ua,ua.getAttribute(Y)),z.setAttributeForCell(ua,Y,null));var Ea=this.editor.graph.getPreferredSizeForCell(ua);
+M=null!=Z?z.model.getCell(H+Aa[Z]):null;if(ua.vertex){Ba=null!=M?0:J;ha=null!=M?0:T;null!=R&&null!=ua.getAttribute(R)&&(ua.geometry.x=Ba+parseFloat(ua.getAttribute(R)));null!=W&&null!=ua.getAttribute(W)&&(ua.geometry.y=ha+parseFloat(ua.getAttribute(W)));var Ca="@"==F.charAt(0)?ua.getAttribute(F.substring(1)):null;ua.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ua.getAttribute(F.substring(1))):"auto"==F||"auto"==Ca?Ea.width+X:parseFloat(F);var Ma="@"==I.charAt(0)?ua.getAttribute(I.substring(1)):
+null;ua.geometry.height=null!=Ma&&"auto"!=Ma?parseFloat(Ma):"auto"==I||"auto"==Ma?Ea.height+X:parseFloat(I);C+=ua.geometry.height+V}g?(null==v[Da]&&(v[Da]=[]),v[Da].push(ua)):(k.push(ua),null!=M?(M.style=z.replacePlaceholders(M,B,y),z.addCell(ua,M),m.push(M)):p.push(z.addCell(ua)))}for(aa=0;aa<m.length;aa++)Ca="@"==F.charAt(0)?m[aa].getAttribute(F.substring(1)):null,Ma="@"==I.charAt(0)?m[aa].getAttribute(I.substring(1)):null,"auto"!=F&&"auto"!=Ca||"auto"!=I&&"auto"!=Ma||z.updateGroupBounds([m[aa]],
+X,!0);var za=p.slice(),ta=p.slice();for(la=0;la<S.length;la++){var ka=S[la];for(aa=0;aa<k.length;aa++){ua=k[aa];var pa=mxUtils.bind(this,function(ia,ma,qa){var oa=ma.getAttribute(qa.from);if(null!=oa&&""!=oa){oa=oa.split(",");for(var na=0;na<oa.length;na++){var Ja=x[qa.to][oa[na]];if(null==Ja&&null!=E){Ja=new mxCell(oa[na],new mxGeometry(J,T,0,0),E);Ja.style=z.replacePlaceholders(ma,Ja.style,y);var Ga=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Ga.width+X;Ja.geometry.height=Ga.height+
+X;x[qa.to][oa[na]]=Ja;Ja.vertex=!0;Ja.id=oa[na];p.push(z.addCell(Ja))}if(null!=Ja){Ga=qa.label;null!=qa.fromlabel&&(Ga=(ma.getAttribute(qa.fromlabel)||"")+(Ga||""));null!=qa.sourcelabel&&(Ga=z.replacePlaceholders(ma,qa.sourcelabel,y)+(Ga||""));null!=qa.tolabel&&(Ga=(Ga||"")+(Ja.getAttribute(qa.tolabel)||""));null!=qa.targetlabel&&(Ga=(Ga||"")+z.replacePlaceholders(Ja,qa.targetlabel,y));var Ra="target"==qa.placeholders==!qa.invert?Ja:ia;Ra=null!=qa.style?z.replacePlaceholders(Ra,qa.style,y):z.createCurrentEdgeStyle();
+Ga=z.insertEdge(null,null,Ga||"",qa.invert?Ja:ia,qa.invert?ia:Ja,Ra);if(null!=qa.labels)for(Ra=0;Ra<qa.labels.length;Ra++){var Sa=qa.labels[Ra],Ha=new mxCell(Sa.label||Ra,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Ha.vertex=!0;Ha.connectable=!1;Ha.geometry.relative=!0;null!=Sa.placeholders&&(Ha.value=z.replacePlaceholders("target"==Sa.placeholders==!qa.invert?Ja:ia,Ha.value,y));if(null!=Sa.dx||null!=Sa.dy)Ha.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=
+Sa.dy?Sa.dy:0);Ga.insert(Ha)}ta.push(Ga);mxUtils.remove(qa.invert?ia:Ja,za)}}}});pa(ua,ua,ka);if(null!=v[ua.id])for(Ka=0;Ka<v[ua.id].length;Ka++)pa(ua,v[ua.id][Ka],ka)}}if(null!=da)for(aa=0;aa<k.length;aa++)for(ua=k[aa],Ka=0;Ka<da.length;Ka++)z.setAttributeForCell(ua,mxUtils.trim(da[Ka]),null);if(0<p.length){var sa=new mxParallelEdgeLayout(z);sa.spacing=P;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(z.getDefaultParent());for(var ia=0;ia<p.length;ia++){var ma=z.getCellGeometry(p[ia]);
+ma.x=Math.round(z.snap(ma.x));ma.y=Math.round(z.snap(ma.y));"auto"==F&&(ma.width=Math.round(z.snap(ma.width)));"auto"==I&&(ma.height=Math.round(z.snap(ma.height)))}};if("["==O.charAt(0)){var wa=n;z.view.validate();this.executeLayoutList(JSON.parse(O),function(){ya();wa()});n=null}else if("circle"==O){var ra=new mxCircleLayout(z);ra.disableEdgeStyle=!1;ra.resetEdges=!1;var xa=ra.isVertexIgnored;ra.isVertexIgnored=function(ia){return xa.apply(this,arguments)||0>mxUtils.indexOf(p,ia)};this.executeLayout(function(){ra.execute(z.getDefaultParent());
+ya()},!0,n);n=null}else if("horizontaltree"==O||"verticaltree"==O||"auto"==O&&ta.length==2*p.length-1&&1==za.length){z.view.validate();var fa=new mxCompactTreeLayout(z,"horizontaltree"==O);fa.levelDistance=V;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(z.getDefaultParent(),0<za.length?za[0]:null)},!0,n);n=null}else if("horizontalflow"==O||"verticalflow"==O||"auto"==O&&1==za.length){z.view.validate();var ca=new mxHierarchicalLayout(z,"horizontalflow"==O?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=V;ca.parallelEdgeSpacing=P;ca.interRankCellSpacing=U;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(z.getDefaultParent(),ta);z.moveCells(ta,J,T)},!0,n);n=null}else if("organic"==O||"auto"==O&&ta.length>p.length){z.view.validate();var ba=new mxFastOrganicLayout(z);ba.forceConstant=3*V;ba.disableEdgeStyle=!1;ba.resetEdges=!1;var ja=ba.isVertexIgnored;ba.isVertexIgnored=function(ia){return ja.apply(this,arguments)||0>mxUtils.indexOf(p,
+ia)};this.executeLayout(function(){ba.execute(z.getDefaultParent());ya()},!0,n);n=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=n&&n()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=
null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),k;for(k in urlParams)0>mxUtils.indexOf(g,k)&&(c=0==e?c+"?":c+"&",null!=urlParams[k]&&(c+=k+"="+urlParams[k],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,k,m){c=new LinkDialog(this,c,e,g,!0,k,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=
function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),
@@ -12078,73 +12079,73 @@ return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnable
this.actions.get("shadowVisible").setEnabled(k);this.actions.get("connectionArrows").setEnabled(k);this.actions.get("connectionPoints").setEnabled(k);this.actions.get("copyStyle").setEnabled(k&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(k&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(k);this.actions.get("createRevision").setEnabled(k);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=
e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(k&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.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!=e&&e.isRenamable()||"1"==
urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(k&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
-function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,k,m,q,v,y){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(k,m,q)),"image/svg+xml");
-else{var z=c.getFileData(!0,null,null,null,null,!0),L=A.getGraphBounds(),M=Math.floor(L.width*m/A.view.scale),n=Math.floor(L.height*m/A.view.scale);if(z.length<=MAX_REQUEST_SIZE&&M*n<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var x={globalVars:A.getExportVariables()};y&&(x.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});c.saveRequest(e,g,function(K,B){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(B||"0")+(null!=K?"&filename="+
-encodeURIComponent(K):"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+M+"&h="+n+"&border="+q+"&xml="+encodeURIComponent(z))})}else"png"==g?c.exportImage(m,null==k||"none"==k,!0,!1,!1,q,!0,!1,null,y,v):c.exportImage(m,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=
+function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,k,m,p,v,x){var z=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(z.getSvg(k,m,p)),"image/svg+xml");
+else{var y=c.getFileData(!0,null,null,null,null,!0),L=z.getGraphBounds(),N=Math.floor(L.width*m/z.view.scale),K=Math.floor(L.height*m/z.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*K<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var q={globalVars:z.getExportVariables()};x&&(q.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});c.saveRequest(e,g,function(E,A){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(A||"0")+(null!=E?"&filename="+
+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+N+"&h="+K+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==k||"none"==k,!0,!1,!1,p,!0,!1,null,x,v):c.exportImage(m,!1,!0,!1,!1,p,!0,!1,"jpeg",x);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=
0;g<this.pages.length;g++){var k=c;this.currentPage!=this.pages[g]&&(k=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),k.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+k.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxUtils.htmlEntities(c));
-k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var y=v[c];if("R"==y.substring(0,1)){var A=JSON.parse(decodeURIComponent(y.substring(1)));q[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(z){}this.remoteInvoke("getCustomLibraries",
-null,null,function(z){m.innerHTML="";if(0==z.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<z.length;L++){var M=z[L];q[M.id]&&(e[M.id]=M);var n=this.addCheckbox(m,M.title,q[M.id]);(function(x,K){mxEvent.addListener(K,"change",function(){this.checked?e[x.id]=x:delete e[x.id]})})(M,n)}},mxUtils.bind(this,function(z){m.innerHTML="";var L=document.createElement("div");L.style.padding="8px";
-L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=z&&null!=z.message?z.message:mxResources.get("unknownError"));m.appendChild(L)}));g.appendChild(m);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var z=0,L;for(L in e)null==q[L]&&(z++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],null,mxUtils.bind(this,function(n){z--;0==z&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-n,M))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){z--;0==z&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[L]));for(L in q)e[L]||this.closeLibrary(new RemoteLibrary(this,null,q[L]));0==z&&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},
+k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var x=v[c];if("R"==x.substring(0,1)){var z=JSON.parse(decodeURIComponent(x.substring(1)));p[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",
+null,null,function(y){m.innerHTML="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<y.length;L++){var N=y[L];p[N.id]&&(e[N.id]=N);var K=this.addCheckbox(m,N.title,p[N.id]);(function(q,E){mxEvent.addListener(E,"change",function(){this.checked?e[q.id]=q:delete e[q.id]})})(N,K)}},mxUtils.bind(this,function(y){m.innerHTML="";var L=document.createElement("div");L.style.padding="8px";
+L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(L)}));g.appendChild(m);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,L;for(L in e)null==p[L]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(K){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+K,N))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[L]));for(L in p)e[L]||this.closeLibrary(new RemoteLibrary(this,null,p[L]));0==y&&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(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var q=!0,v=window.setTimeout(mxUtils.bind(this,function(){q=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(v);
-q&&k.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(v);q&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(z,L){var M={event:"remoteInvokeResponse",
-msgMarkers:c.msgMarkers};null!=L?M.error={errResp:L}:null!=z&&(M.resp=z);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var k=c.funtionName,m=this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var q=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){q=!0;break}if(!q){g(null,"Invalid Call: "+k+" is not allowed.");return}}var y=c.functionArgs;Array.isArray(y)||(y=[]);if(m.isAsync)y.push(function(){g(Array.prototype.slice.apply(arguments))}),
-y.push(function(z){g(null,z||"Unkown Error")}),this[k].apply(this,y);else{var A=this[k].apply(this,y);g([A])}}else g(null,"Invalid Call: "+k+" is not found.")}catch(z){g(null,"Invalid Call: An error occurred, "+z.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var q=k.result;1>m.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
-2>m.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=e&&e(v)}};k.onsuccess=mxUtils.bind(this,function(m){var q=k.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(v){if(!v||
-"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var A=!0,z=!1,L,M=0,n=mxUtils.bind(this,function(){z=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),x=mxUtils.bind(this,function(){M++;K()}),K=mxUtils.bind(this,function(){try{if(M>=
-L.length)n();else{var F=L[M];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(G){null==G||".scratchpad"==F&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):x()}),x)}}catch(G){console.log(G)}}),B=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title,size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],x,x,["filesInfo","files"])}catch(G){console.log(G)}});
-v=mxUtils.bind(this,function(F){try{if(F.source==y.contentWindow){var G={};try{G=JSON.parse(F.data)}catch(N){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||z||(A?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],A=!1,K()):n():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?B(G.resp[0]):x())}}catch(N){console.log(N)}});
-window.addEventListener("message",v)}})));c(q);q.onversionchange=function(){q.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=q.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(q=0;q<m.length;q++)v.objectStore(m[q]).put(null!=c&&null!=c[q]?{key:c[q],data:e[q]}:e[q])}catch(y){null!=
-k&&k(y)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var q=0;q<k.length;q++)m.objectStore(k[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var q=m.transaction([k],"readonly").objectStore(k).get(c);q.onsuccess=function(){e(q.result)};
-q.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),q=[];m.onsuccess=function(v){null==v.target.result?c(q):(q.push(v.target.result.value),v.target.result.continue())};m.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=
-g||"objects";var m=k.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=e}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():
+function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);
+p&&k.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(v);p&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:x,error:z});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",
+msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),
+x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var z=this[k].apply(this,x);g([z])}}else g(null,"Invalid Call: "+k+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var p=k.result;1>m.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});
+2>m.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=e&&e(v)}};k.onsuccess=mxUtils.bind(this,function(m){var p=k.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(v){if(!v||
+"1"==urlParams.forceMigration){var x=document.createElement("iframe");x.style.display="none";x.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(x);var z=!0,y=!1,L,N=0,K=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),q=mxUtils.bind(this,function(){N++;E()}),E=mxUtils.bind(this,function(){try{if(N>=
+L.length)K();else{var B=L[N];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(G){null==G||".scratchpad"==B&&G==this.emptyLibraryXml?x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):q()}),q)}}catch(G){console.log(G)}}),A=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],q,q,["filesInfo","files"])}catch(G){console.log(G)}});
+v=mxUtils.bind(this,function(B){try{if(B.source==x.contentWindow){var G={};try{G=JSON.parse(B.data)}catch(M){}"init"==G.event?(x.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||y||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],z=!1,E()):K():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?A(G.resp[0]):q())}}catch(M){console.log(M)}});
+window.addEventListener("message",v)}})));c(p);p.onversionchange=function(){p.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(p){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=p.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(p=0;p<m.length;p++)v.objectStore(m[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(x){null!=
+k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var p=0;p<k.length;p++)m.objectStore(k[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var p=m.transaction([k],"readonly").objectStore(k).get(c);p.onsuccess=function(){e(p.result)};
+p.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];m.onsuccess=function(v){null==v.target.result?c(p):(p.push(v.target.result.value),v.target.result.continue())};m.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=
+g||"objects";var m=k.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=e}catch(p){null!=e&&e(p)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():
!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var k=this.getCurrentFile();null!=k?k.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();
return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
-DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,q,v,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,q,v,y)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};
-EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,y,A,z,L,M,n,x,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(c,e,g,k,m,q,v,y,A,z,L,M,n,x,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,p,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,p,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};
+EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,p,v,x,z,y,L,N,K,q,E,A){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(c,e,g,k,m,p,v,x,z,y,L,N,K,q,E,A)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,k)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(c,e,g,k,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),k=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<k.length){var m="<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12);k="<mxlibrary>"===k.substring(0,11);(m||
k)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,l,d,u,t){function D(){for(var J=M.getElementsByTagName("div"),E=0,H=0;H<J.length;H++)"none"!=J[H].style.display&&J[H].parentNode==M&&E++;n.style.display=0==E?"block":"none"}function c(J,E,H,S){function U(){E.removeChild(V);E.removeChild(X);W.style.display="block";Q.style.display="block"}A={div:E,comment:J,saveCallback:H,deleteOnCancel:S};var Q=E.querySelector(".geCommentTxt"),W=E.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=Q.offsetHeight+"px";V.value=J.content;E.insertBefore(V,Q);var X=document.createElement("div");X.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){S?(E.parentNode.removeChild(E),D()):U();A=null});p.className="geCommentEditBtn";X.appendChild(p);var C=mxUtils.button(mxResources.get("save"),function(){Q.innerHTML="";J.content=V.value;mxUtils.write(Q,J.content);U();H(J);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(C.click(),mxEvent.consume(I)):27==I.keyCode&&(p.click(),mxEvent.consume(I)))}));C.focus();C.className="geCommentEditBtn gePrimaryBtn";X.appendChild(C);E.insertBefore(X,Q);W.style.display="none";Q.style.display="none";V.focus()}function e(J,E){E.innerHTML="";J=new Date(J.modifiedDate);var H=b.timeSince(J);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(E,mxResources.get("timeAgo",
-[H],"{1} ago"));E.setAttribute("title",J.toLocaleDateString()+" "+J.toLocaleTimeString())}function g(J){var E=document.createElement("img");E.className="geCommentBusyImg";E.src=IMAGE_PATH+"/spin.gif";J.appendChild(E);J.busyImg=E}function k(J){J.style.border="1px solid red";J.removeChild(J.busyImg)}function m(J){J.style.border="";J.removeChild(J.busyImg)}function q(J,E,H,S,U){function Q(P,O,R){var Y=document.createElement("li");Y.className="geCommentAction";var da=document.createElement("a");da.className=
-"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(va);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(va);R&&R()},function(la){Z();k(va);
-b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,va,function(la){ha()},!0)}var ea=W().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var va=q(aa,J.replies,ea,S+1);O?Z():ha()}if(U||!J.isResolved){n.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&
-(X.style.backgroundColor="ghostWhite");var p=document.createElement("div");p.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=J.user.pictureUrl||Editor.userImage;p.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";p.appendChild(C);var I=document.createElement("div");I.className="geCommentUsername";mxUtils.write(I,J.user.displayName||"");C.appendChild(I);I=document.createElement("div");I.className="geCommentDate";I.setAttribute("data-commentId",
-J.id);e(J,I);C.appendChild(I);X.appendChild(p);p=document.createElement("div");p.className="geCommentTxt";mxUtils.write(p,J.content||"");X.appendChild(p);J.isLocked&&(X.style.opacity="0.5");p=document.createElement("div");p.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";p.appendChild(T);v||J.isLocked||0!=S&&!y||Q(mxResources.get("reply"),function(){V("",!0)},J.isResolved);C=b.getCurrentUser();null==C||C.id!=J.user.id||v||J.isLocked||(Q(mxResources.get("edit"),
-function(){function P(){c(J,X,function(){g(X);J.editComment(J.content,function(){m(X)},function(O){k(X);P();b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}P()},J.isResolved),Q(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(X);J.deleteComment(function(P){if(!0===P){P=X.querySelector(".geCommentTxt");P.innerHTML="";mxUtils.write(P,mxResources.get("msgDeleted"));var O=X.querySelectorAll(".geCommentAction");for(P=
-0;P<O.length;P++)O[P].parentNode.removeChild(O[P]);m(X);X.style.opacity="0.5"}else{O=W(J).replies;for(P=0;P<O.length;P++)M.removeChild(O[P]);for(P=0;P<E.length;P++)if(E[P]==J){E.splice(P,1);break}n.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(P){k(X);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},J.isResolved));v||J.isLocked||0!=S||Q(J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function O(){var R=
-P.target;R.innerHTML="";J.isResolved=!J.isResolved;mxUtils.write(R,J.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=J.isResolved?"none":"",da=W(J).replies,ha=Editor.isDarkMode()?"transparent":J.isResolved?"ghostWhite":"white",Z=0;Z<da.length;Z++){da[Z].style.backgroundColor=ha;for(var ea=da[Z].querySelectorAll(".geCommentAction"),aa=0;aa<ea.length;aa++)ea[aa]!=R.parentNode&&(ea[aa].style.display=Y);B||(da[Z].style.display="none")}D()}J.isResolved?V(mxResources.get("reOpened")+
-": ",!0,O,!1,!0):V(mxResources.get("markedAsResolved"),!1,O,!0)});X.appendChild(p);null!=H?M.insertBefore(X,H.nextSibling):M.appendChild(X);for(H=0;null!=J.replies&&H<J.replies.length;H++)p=J.replies[H],p.isResolved=J.isResolved,q(p,J.replies,null,S+1,U);null!=A&&(A.comment.id==J.id?(U=J.content,J.content=A.comment.content,c(J,X,A.saveCallback,A.deleteOnCancel),J.content=U):null==A.comment.id&&A.comment.pCommentId==J.id&&(M.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return X}}
-var v=!b.canComment(),y=b.canReplyToReplies(),A=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";M.style.bottom=parseInt(L)+7+"px";z.appendChild(M);var n=document.createElement("span");n.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(n,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=L;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!v){var K=L.cloneNode();K.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';K.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(K,"click",function(J){function E(){c(H,S,function(U){g(S);b.addComment(U,function(Q){U.id=Q;F.push(U);m(S)},function(Q){k(S);E();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),S=q(H,F,null,0);E();J.preventDefault();mxEvent.consume(J)});x.appendChild(K)}K=L.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));
-var B=!1;Editor.isDarkMode()&&(K.style.filter="invert(100%)");mxEvent.addListener(K,"click",function(J){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();J.preventDefault();mxEvent.consume(J)});x.appendChild(K);b.commentsRefreshNeeded()&&(K=L.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',K.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(J){G();
-J.preventDefault();mxEvent.consume(J)}),x.appendChild(K));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(J){t();J.preventDefault();mxEvent.consume(J)}),x.appendChild(L));z.appendChild(x);var F=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
-var J=A.div.querySelector(".geCommentEditTxtArea"),E=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);E.parentNode.removeChild(E)}catch(H){b.handleError(H)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(U){if(null!=U){U.sort(function(W,V){return new Date(W.modifiedDate)-
-new Date(V.modifiedDate)});for(var Q=0;Q<U.length;Q++)S(U[Q].replies)}}H.sort(function(U,Q){return new Date(U.modifiedDate)-new Date(Q.modifiedDate)});M.innerHTML="";M.appendChild(n);n.style.display="block";F=H;for(H=0;H<F.length;H++)S(F[H].replies),q(F[H],F,null,0,B);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(M.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
-": "+H.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;x=mxUtils.bind(this,function(){function J(Q){var W=H[Q.id];if(null!=W)for(e(Q,W),W=0;null!=Q.replies&&W<Q.replies.length;W++)J(Q.replies[W])}if(this.window.isVisible()){for(var E=M.querySelectorAll(".geCommentDate"),H={},S=0;S<E.length;S++){var U=E[S];H[U.getAttribute("data-commentId")]=U}for(S=0;S<F.length;S++)J(F[S])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=
-new mxWindow(mxResources.get("comments"),z,f,l,d,u,!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()}));this.window.setLocation=function(J,E){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;J=Math.max(0,Math.min(J,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));E=Math.max(0,Math.min(E,H-this.table.clientHeight-48));this.getX()==J&&this.getY()==E||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var J=this.window.getX(),E=this.window.getY();this.window.setLocation(J,E)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,f,l,
-d,u,t,D,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=k+"px";q.style.lineHeight="1.2em";mxUtils.write(q,f);m.appendChild(q);null!=g&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),q.appendChild(f),m.appendChild(q));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});t.className="geBtn";null!=c&&(t.innerHTML=c+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var y=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(y);null!=D?(y.innerHTML=
-D+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);m.appendChild(g);e?(g.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(v),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),q.appendChild(u),m.appendChild(q),mxEvent.addListener(u,
-"click",function(A){v.checked=!v.checked;mxEvent.consume(A)})):g.style.marginTop="12px";this.init=function(){y.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+var CommentsWindow=function(b,f,l,d,u,t){function D(){for(var H=N.getElementsByTagName("div"),F=0,I=0;I<H.length;I++)"none"!=H[I].style.display&&H[I].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,I,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";P.style.display="block"}z={div:F,comment:H,saveCallback:I,deleteOnCancel:R};var P=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=P.offsetHeight+"px";U.value=H.content;F.insertBefore(U,P);var X=document.createElement("div");X.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),D()):W();z=null});n.className="geCommentEditBtn";X.appendChild(n);var C=mxUtils.button(mxResources.get("save"),function(){P.innerHTML="";H.content=U.value;mxUtils.write(P,H.content);W();I(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(J){mxEvent.isConsumed(J)||((mxEvent.isControlDown(J)||mxClient.IS_MAC&&mxEvent.isMetaDown(J))&&13==J.keyCode?(C.click(),mxEvent.consume(J)):27==J.keyCode&&(n.click(),mxEvent.consume(J)))}));C.focus();C.className="geCommentEditBtn gePrimaryBtn";X.appendChild(C);F.insertBefore(X,P);V.style.display="none";P.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var I=b.timeSince(H);null==I&&(I=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[I],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,F,I,R,W){function P(Q,O,S){var Y=document.createElement("li");Y.className="geCommentAction";var da=document.createElement("a");da.className=
+"geCommentActionLnk";mxUtils.write(da,Q);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,H);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function Q(Y){O.push(S);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)S=S.nextSibling,Q(Y.replies[da])}var O=[],S=X;Q(H);return{pdiv:S,replies:O}}function U(Q,O,S,Y,da){function ha(){g(va);H.addReply(aa,function(la){aa.id=la;H.replies.push(aa);m(va);S&&S()},function(la){Z();k(va);
+b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,va,function(la){ha()},!0)}var ea=V().pdiv,aa=b.newComment(Q,b.getCurrentUser());aa.pCommentId=H.id;null==H.replies&&(H.replies=[]);var va=p(aa,H.replies,ea,R+1);O?Z():ha()}if(W||!H.isResolved){K.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",H.id);X.style.marginLeft=20*R+5+"px";H.isResolved&&!Editor.isDarkMode()&&
+(X.style.backgroundColor="ghostWhite");var n=document.createElement("div");n.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=H.user.pictureUrl||Editor.userImage;n.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";n.appendChild(C);var J=document.createElement("div");J.className="geCommentUsername";mxUtils.write(J,H.user.displayName||"");C.appendChild(J);J=document.createElement("div");J.className="geCommentDate";J.setAttribute("data-commentId",
+H.id);e(H,J);C.appendChild(J);X.appendChild(n);n=document.createElement("div");n.className="geCommentTxt";mxUtils.write(n,H.content||"");X.appendChild(n);H.isLocked&&(X.style.opacity="0.5");n=document.createElement("div");n.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";n.appendChild(T);v||H.isLocked||0!=R&&!x||P(mxResources.get("reply"),function(){U("",!0)},H.isResolved);C=b.getCurrentUser();null==C||C.id!=H.user.id||v||H.isLocked||(P(mxResources.get("edit"),
+function(){function Q(){c(H,X,function(){g(X);H.editComment(H.content,function(){m(X)},function(O){k(X);Q();b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Q()},H.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(X);H.deleteComment(function(Q){if(!0===Q){Q=X.querySelector(".geCommentTxt");Q.innerHTML="";mxUtils.write(Q,mxResources.get("msgDeleted"));var O=X.querySelectorAll(".geCommentAction");for(Q=
+0;Q<O.length;Q++)O[Q].parentNode.removeChild(O[Q]);m(X);X.style.opacity="0.5"}else{O=V(H).replies;for(Q=0;Q<O.length;Q++)N.removeChild(O[Q]);for(Q=0;Q<F.length;Q++)if(F[Q]==H){F.splice(Q,1);break}K.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Q){k(X);b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=R||P(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function O(){var S=
+Q.target;S.innerHTML="";H.isResolved=!H.isResolved;mxUtils.write(S,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=H.isResolved?"none":"",da=V(H).replies,ha=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<da.length;Z++){da[Z].style.backgroundColor=ha;for(var ea=da[Z].querySelectorAll(".geCommentAction"),aa=0;aa<ea.length;aa++)ea[aa]!=S.parentNode&&(ea[aa].style.display=Y);A||(da[Z].style.display="none")}D()}H.isResolved?U(mxResources.get("reOpened")+
+": ",!0,O,!1,!0):U(mxResources.get("markedAsResolved"),!1,O,!0)});X.appendChild(n);null!=I?N.insertBefore(X,I.nextSibling):N.appendChild(X);for(I=0;null!=H.replies&&I<H.replies.length;I++)n=H.replies[I],n.isResolved=H.isResolved,p(n,H.replies,null,R+1,W);null!=z&&(z.comment.id==H.id?(W=H.content,H.content=z.comment.content,c(H,X,z.saveCallback,z.deleteOnCancel),H.content=W):null==z.comment.id&&z.comment.pCommentId==H.id&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
+var v=!b.canComment(),x=b.canReplyToReplies(),z=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";N.style.bottom=parseInt(L)+7+"px";y.appendChild(N);var K=document.createElement("span");K.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(K,mxResources.get("noCommentsFound"));var q=document.createElement("div");q.className="geToolbarContainer geCommentsToolbar";q.style.height=L;q.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";q.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!v){var E=L.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(E,"click",function(H){function F(){c(I,R,function(W){g(R);b.addComment(W,function(P){W.id=P;B.push(W);m(R)},function(P){k(R);F();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),R=p(I,B,null,0);F();H.preventDefault();mxEvent.consume(H)});q.appendChild(E)}E=L.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
+var A=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(H){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(E);b.commentsRefreshNeeded()&&(E=L.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(H){G();
+H.preventDefault();mxEvent.consume(H)}),q.appendChild(E));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(H){t();H.preventDefault();mxEvent.consume(H)}),q.appendChild(L));y.appendChild(q);var B=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
+var H=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=H.value;H.parentNode.removeChild(H);F.parentNode.removeChild(F)}catch(I){b.handleError(I)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
+new Date(U.modifiedDate)});for(var P=0;P<W.length;P++)R(W[P].replies)}}I.sort(function(W,P){return new Date(W.modifiedDate)-new Date(P.modifiedDate)});N.innerHTML="";N.appendChild(K);K.style.display="block";B=I;for(I=0;I<B.length;I++)R(B[I].replies),p(B[I],B,null,0,A);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(I){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?
+": "+I.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;q=mxUtils.bind(this,function(){function H(P){var V=I[P.id];if(null!=V)for(e(P,V),V=0;null!=P.replies&&V<P.replies.length;V++)H(P.replies[V])}if(this.window.isVisible()){for(var F=N.querySelectorAll(".geCommentDate"),I={},R=0;R<F.length;R++){var W=F[R];I[W.getAttribute("data-commentId")]=W}for(R=0;R<B.length;R++)H(B[R])}});setInterval(q,6E4);this.refreshCommentsTime=q;this.window=
+new mxWindow(mxResources.get("comments"),y,f,l,d,u,!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()}));this.window.setLocation=function(H,F){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;H=Math.max(0,Math.min(H,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,I-this.table.clientHeight-48));this.getX()==H&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var H=this.window.getX(),F=this.window.getY();this.window.setLocation(H,F)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,f,l,
+d,u,t,D,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=k+"px";p.style.lineHeight="1.2em";mxUtils.write(p,f);m.appendChild(p);null!=g&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),p.appendChild(f),m.appendChild(p));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
+"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});t.className="geBtn";null!=c&&(t.innerHTML=c+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var x=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(x);null!=D?(x.innerHTML=
+D+"<br>"+x.innerHTML+"<br>",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.className="geBtn",x.style.width="40%"):x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);m.appendChild(g);e?(g.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(v),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),p.appendChild(u),m.appendChild(p),mxEvent.addListener(u,
+"click",function(z){v.checked=!v.checked;mxEvent.consume(z)})):g.style.marginTop="12px";this.init=function(){x.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,l,d,u){if(null!=f)for(var t=0;t<f.length;t++)null!=f[t]&&(b=this.patchPages(b,f[t],l,d,u));return b};
EditorUi.prototype.patchPages=function(b,f,l,d,u){var t={},D=[],c={},e={},g={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])t[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)e[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)c[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(m in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var q="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[q]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[q]=v);q=v}}var y={},A=mxUtils.bind(this,function(L){var M=null!=L?L.getId():"";if(null!=L&&!y[M]){y[M]=!0;D.push(L);var n=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][M]:null;null!=n&&(this.updatePageRoot(L),null!=n.name&&L.setName(n.name),
-null!=n.view&&this.patchViewState(L,n.view),null!=n.cells&&this.patchPage(L,n.cells,t[L.getId()],u),!l||null==n.cells&&null==n.view||(L.needsUpdate=!0))}L=k[M];null!=L&&(delete k[M],A(g[L]));L=c[M];null!=L&&(delete c[M],z(L))}),z=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var M=g[L.getId()];null==M?A(L):(this.patchPage(M,this.diffPages([M],[L]),t[M.getId()],u),l&&(M.needsUpdate=!0))});A();for(m in k)A(g[k[m]]),delete k[m];for(m in c)z(c[m]),
+f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var p="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[p]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[p]=v);p=v}}var x={},z=mxUtils.bind(this,function(L){var N=null!=L?L.getId():"";if(null!=L&&!x[N]){x[N]=!0;D.push(L);var K=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][N]:null;null!=K&&(this.updatePageRoot(L),null!=K.name&&L.setName(K.name),
+null!=K.view&&this.patchViewState(L,K.view),null!=K.cells&&this.patchPage(L,K.cells,t[L.getId()],u),!l||null==K.cells&&null==K.view||(L.needsUpdate=!0))}L=k[N];null!=L&&(delete k[N],z(g[L]));L=c[N];null!=L&&(delete c[N],y(L))}),y=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var N=g[L.getId()];null==N?z(L):(this.patchPage(N,this.diffPages([N],[L]),t[N.getId()],u),l&&(N.needsUpdate=!0))});z();for(m in k)z(g[k[m]]),delete k[m];for(m in c)y(c[m]),
delete c[m];return D};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in f)try{this.patchViewStateProperty(b,f,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,l){b.viewState[l]=JSON.parse(f[l])};
EditorUi.prototype.createParentLookup=function(b,f){function l(g){var k=d[g];null==k&&(k={inserted:[],moved:{}},d[g]=k);return k}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var t=f[EditorUi.DIFF_INSERT][u],D=null!=t.parent?t.parent:"",c=null!=t.previous?t.previous:"";l(D).inserted[c]=t}if(null!=f[EditorUi.DIFF_UPDATE])for(var e in f[EditorUi.DIFF_UPDATE])t=f[EditorUi.DIFF_UPDATE][e],null!=t.previous&&(D=t.parent,null==D&&(u=b.getCell(e),null!=u&&(u=
b.getParent(u),null!=u&&(D=u.getId()))),null!=D&&(l(D).moved[t.previous]=e));return d};
-EditorUi.prototype.patchPage=function(b,f,l,d){var u=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),t=this.createParentLookup(u,f);u.beginUpdate();try{var D=u.updateEdgeParent,c=new mxDictionary,e=[];u.updateEdgeParent=function(z,L){!c.get(z)&&d&&(c.put(z,!0),e.push(z))};var g=t[""],k=null!=g&&null!=g.inserted?g.inserted[""]:null,m=null;null!=k&&(m=this.getCellForJson(k));if(null==m){var q=null!=g&&null!=g.moved?g.moved[""]:null;null!=q&&(m=u.getCell(q))}null!=m&&(u.setRoot(m),
-b.root=m);this.patchCellRecursive(b,u,u.root,t,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var y=u.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=y&&u.remove(y)}if(null!=f[EditorUi.DIFF_UPDATE]){var A=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(u,u.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=A?A[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
-y=u.getCell(k.id),null!=y&&(u.setTerminal(y,u.getCell(k.source),!0),u.setTerminal(y,u.getCell(k.target),!1));u.updateEdgeParent=D;if(d&&0<e.length)for(v=0;v<e.length;v++)u.contains(e[v])&&u.updateEdgeParent(e[v])}finally{u.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,l,d,u){if(null!=l){var t=d[l.getId()],D=null!=t&&null!=t.inserted?t.inserted:{};t=null!=t&&null!=t.moved?t.moved:{};for(var c=0,e=f.getChildCount(l),g="",k=0;k<e;k++){var m=f.getChildAt(l,k).getId();null==t[g]&&(null==u[EditorUi.DIFF_UPDATE]||null==u[EditorUi.DIFF_UPDATE][m]||null==u[EditorUi.DIFF_UPDATE][m].previous&&null==u[EditorUi.DIFF_UPDATE][m].parent)&&(t[g]=m);g=m}e=mxUtils.bind(this,function(q,v){var y=null!=q?q.getId():"";null!=q&&v&&(v=
-f.getCell(y),null!=v&&v!=q&&(q=null));null!=q&&(f.getChildAt(l,c)!=q&&f.add(l,q,c),this.patchCellRecursive(b,f,q,d,u),c++);return y});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=t[k],null!=m&&(delete t[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in t)g.push({child:f.getCell(t[k])}),delete t[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};
+EditorUi.prototype.patchPage=function(b,f,l,d){var u=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),t=this.createParentLookup(u,f);u.beginUpdate();try{var D=u.updateEdgeParent,c=new mxDictionary,e=[];u.updateEdgeParent=function(y,L){!c.get(y)&&d&&(c.put(y,!0),e.push(y))};var g=t[""],k=null!=g&&null!=g.inserted?g.inserted[""]:null,m=null;null!=k&&(m=this.getCellForJson(k));if(null==m){var p=null!=g&&null!=g.moved?g.moved[""]:null;null!=p&&(m=u.getCell(p))}null!=m&&(u.setRoot(m),
+b.root=m);this.patchCellRecursive(b,u,u.root,t,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var x=u.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=x&&u.remove(x)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(p in f[EditorUi.DIFF_UPDATE])this.patchCell(u,u.getCell(p),f[EditorUi.DIFF_UPDATE][p],null!=z?z[p]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
+x=u.getCell(k.id),null!=x&&(u.setTerminal(x,u.getCell(k.source),!0),u.setTerminal(x,u.getCell(k.target),!1));u.updateEdgeParent=D;if(d&&0<e.length)for(v=0;v<e.length;v++)u.contains(e[v])&&u.updateEdgeParent(e[v])}finally{u.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,l,d,u){if(null!=l){var t=d[l.getId()],D=null!=t&&null!=t.inserted?t.inserted:{};t=null!=t&&null!=t.moved?t.moved:{};for(var c=0,e=f.getChildCount(l),g="",k=0;k<e;k++){var m=f.getChildAt(l,k).getId();null==t[g]&&(null==u[EditorUi.DIFF_UPDATE]||null==u[EditorUi.DIFF_UPDATE][m]||null==u[EditorUi.DIFF_UPDATE][m].previous&&null==u[EditorUi.DIFF_UPDATE][m].parent)&&(t[g]=m);g=m}e=mxUtils.bind(this,function(p,v){var x=null!=p?p.getId():"";null!=p&&v&&(v=
+f.getCell(x),null!=v&&v!=p&&(p=null));null!=p&&(f.getChildAt(l,c)!=p&&f.add(l,p,c),this.patchCellRecursive(b,f,p,d,u),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=t[k],null!=m&&(delete t[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in t)g.push({child:f.getCell(t[k])}),delete t[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};
EditorUi.prototype.patchCell=function(b,f,l,d){if(null!=f&&null!=l){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in l?b.setValue(f,l.value):null!=l.xmlValue&&b.setValue(f,mxUtils.parseXml(l.xmlValue).documentElement);null!=d&&null!=d.style||null==l.style||b.setStyle(f,l.style);null!=l.visible&&b.setVisible(f,1==l.visible);null!=l.collapsed&&b.setCollapsed(f,1==l.collapsed);null!=l.vertex&&(f.vertex=1==l.vertex);null!=l.edge&&(f.edge=1==l.edge);null!=l.connectable&&(f.connectable=
1==l.connectable);null!=l.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(l.geometry).documentElement));null!=l.source&&b.setTerminal(f,b.getCell(l.source),!0);null!=l.target&&b.setTerminal(f,b.getCell(l.target),!1);for(var u in l)this.cellProperties[u]||(f[u]=l[u])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var l=0;l<b.length;l++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[l].root));this.editor.graph.saveViewState(b[l].viewState,d);var u=b[l].node.cloneNode(!1);u.appendChild(d);f.appendChild(u)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
@@ -12215,24 +12216,24 @@ DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime
b,l)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
DrawioFileSync.prototype.merge=function(b,f,l,d,u,t){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(D),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,D,"merge");
-"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(y){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=u&&u(y);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),y);else{var q=this.file.getCurrentUser(),v=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,y)}}catch(A){}}};
+"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(x){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=u&&u(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(z){}}};
DrawioFileSync.prototype.fileChanged=function(b,f,l,d){var u=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(t){null!=l&&l()||(this.isValidState()?this.catchup(t,b,f,l):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=u};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,f,l,d){if(null!=b&&(null==d||!d())){var u=this.file.getCurrentRevisionId(),t=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",u,"to",t,"valid",this.isValidState());if(u==t)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var D=this.file.getDescriptorSecret(b);if(null==D||"1"==urlParams.lockdown)this.reload(f,l,d);else{var c=0,e=!1,g=mxUtils.bind(this,function(){if(null==
-d||!d())if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,l,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(u)+"&to="+encodeURIComponent(t)+(null!=D?"&secret="+encodeURIComponent(D):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(m);if(k&&
-(null==d||!d()))if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var A=JSON.parse(q.getText());if(null!=A&&0<A.length)for(var z=0;z<A.length;z++){var L=this.stringToObject(A[z]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;y=[];break}else if(L.v===
-DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,y.push(L.d.patch);else{e=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",e,"temp",y,"checksum",v)}catch(M){y=[],null!=window.console&&"1"==urlParams.test&&console.log(M)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(f,l,d))}catch(M){null!=l&&l(M)}}else null!=l&&l()}))}else null!=l&&l()});window.setTimeout(g,this.cacheReadyDelay)}}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,f,l,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),l,d)};
+d||!d())if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,l,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(u)+"&to="+encodeURIComponent(t)+(null!=D?"&secret="+encodeURIComponent(D):""),mxUtils.bind(this,function(p){this.file.stats.bytesReceived+=p.getText().length;window.clearTimeout(m);if(k&&
+(null==d||!d()))if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[p],"status",p.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=p.getStatus()&&299>=p.getStatus()&&0<p.getText().length)try{var z=JSON.parse(p.getText());if(null!=z&&0<z.length)for(var y=0;y<z.length;y++){var L=this.stringToObject(z[y]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;x=[];break}else if(L.v===
+DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,x.push(L.d.patch);else{e=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",e,"temp",x,"checksum",v)}catch(N){x=[],null!=window.console&&"1"==urlParams.test&&console.log(N)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=p.getStatus()&&503!=p.getStatus()&&410!=p.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(f,l,d))}catch(N){null!=l&&l(N)}}else null!=l&&l()}))}else null!=l&&l()});window.setTimeout(g,this.cacheReadyDelay)}}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,f,l,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),l,d)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,f,l){var d=!0,u=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(t){window.clearTimeout(u);d&&(200<=t.getStatus()&&299>=t.getStatus()?f(t.getText()):l({code:t.getStatus(),message:"Token Error "+t.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
DrawioFileSync.prototype.fileSaved=function(b,f,l,d,u){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var t=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),D=this.file.getDescriptorSecret(this.file.getDescriptor()),c=this.file.getDescriptorRevisionId(f),e=this.file.getCurrentRevisionId();if(null==
D||null==u||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(t),function(){}),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",c,"to",e,"etag",this.file.getCurrentEtag());else{var g=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var k=this.ui.getHashValueForPages(b),m=this.objectToString(this.createMessage({patch:g,checksum:k}));this.file.stats.bytesSent+=m.length;
-this.file.stats.msgSent++;var q=!0,v=window.setTimeout(mxUtils.bind(this,function(){q=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(t)+(null!=D?"&secret="+encodeURIComponent(D):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(m.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(m):"")+(null!=u?"&token="+encodeURIComponent(u):
-""),mxUtils.bind(this,function(y){window.clearTimeout(v);q&&(200<=y.getStatus()&&299>=y.getStatus()?null!=l&&l():d({code:y.getStatus(),message:y.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",g,m.length,"bytes","from",c,"to",e,"etag",this.file.getCurrentEtag(),"checksum",k)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+this.file.stats.msgSent++;var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(t)+(null!=D?"&secret="+encodeURIComponent(D):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(m.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(m):"")+(null!=u?"&token="+encodeURIComponent(u):
+""),mxUtils.bind(this,function(x){window.clearTimeout(v);p&&(200<=x.getStatus()&&299>=x.getStatus()?null!=l&&l():d({code:x.getStatus(),message:x.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",g,m.length,"bytes","from",c,"to",e,"etag",this.file.getCurrentEtag(),"checksum",k)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,l){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,l):this.fileChanged(f,l)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@@ -12256,23 +12257,23 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var l=0;l<f.length;l++)f[l].unregister();null!=b&&b()}})};
-App.main=function(b,f){function l(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,STYLE_PATH+"/default.xml"],function(m){function q(){var n=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,f){function l(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,STYLE_PATH+"/default.xml"],function(m){function p(){var K=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(n);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[n,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(n){if(null!=n)for(var x=0;x<n.length;x++)if(!y[n[x]])throw Error(mxResources.get("invalidInput")+
-' "'+n[x])+'"';return!0},y={},A;for(A in App.pluginRegistry)y[App.pluginRegistry[A]]=!0;var z=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=z&&v(z.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(z));if(null!=z.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var M=JSON.parse(L);for(A in z.merge)M[A]=z.merge[A];z=M}catch(n){window.location.hash="",alert(n)}else z=z.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
-(localStorage.setItem(Editor.configurationKey,JSON.stringify(z)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(n){window.location.hash="",alert(n)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
-q))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
-parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(k=
-0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,q,v,y){EditorUi.logError("Global: "+(null!=k?k:""),m,q,v,y,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(K);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[K,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(K){if(null!=K)for(var q=0;q<K.length;q++)if(!x[K[q]])throw Error(mxResources.get("invalidInput")+
+' "'+K[q])+'"';return!0},x={},z;for(z in App.pluginRegistry)x[App.pluginRegistry[z]]=!0;var y=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=y&&v(y.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(y));if(null!=y.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var N=JSON.parse(L);for(z in y.merge)N[z]=y.merge[z];y=N}catch(K){window.location.hash="",alert(K)}else y=y.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+(localStorage.setItem(Editor.configurationKey,JSON.stringify(y)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(K){window.location.hash="",alert(K)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
+p))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
+parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(p){null!=window.console&&console.error(p)}if(null!=Menus.prototype.defaultFonts)for(k=
+0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,p,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,p,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&
!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var t=mxUtils.getTextContent(u[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(t).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(t).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=u&&1<u.length&&(t=mxUtils.getTextContent(u[u.length-1]),
"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(t).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(t).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(k){null!=
window.console&&console.error(k)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){u=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&
isLocalStorage&&"undefined"!==typeof JSON)try{var D=JSON.parse(localStorage.getItem(mxSettings.key));null!=D&&(u=D.plugins)}catch(k){}D=urlParams.p;App.initPluginCallback();null!=D&&App.loadPlugins(D.split(";"));if(null!=u&&0<u.length&&"0"!=urlParams.plugins){D=window.location.protocol+"//"+window.location.host;t=!0;for(var c=0;c<u.length&&t;c++)"/"!=u[c].charAt(0)&&u[c].substring(0,D.length)!=D&&(t=!1);if(t||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
[u.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<u.length;c++)try{null==App.pluginsLoaded[u[c]]&&(App.pluginsLoaded[u[c]]=!0,App.embedModePluginsCount++,"/"==u[c].charAt(0)&&(u[c]=PLUGINS_BASE_PATH+u[c]),mxscript(u[c]))}catch(k){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var e=window.opener||window.parent,g=function(k){if(k.source==e)try{var m=JSON.parse(k.data);null!=m&&"configure"==m.action&&(mxEvent.removeListener(window,"message",g),Editor.configure(m.config,!0),mxSettings.load(),m.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(q){null!=window.console&&console.log("Error in configure message: "+
-q,k.data)}};mxEvent.addListener(window,"message",g);e.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(k){null!=window.console&&console.error(k)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(u=localStorage.getItem(Editor.configurationKey),null!=u))try{u=JSON.parse(u),null!=u&&(EditorUi.debug("Using local configuration",
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var e=window.opener||window.parent,g=function(k){if(k.source==e)try{var m=JSON.parse(k.data);null!=m&&"configure"==m.action&&(mxEvent.removeListener(window,"message",g),Editor.configure(m.config,!0),mxSettings.load(),m.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(p){null!=window.console&&console.log("Error in configure message: "+
+p,k.data)}};mxEvent.addListener(window,"message",g);e.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(k){null!=window.console&&console.error(k)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(u=localStorage.getItem(Editor.configurationKey),null!=u))try{u=JSON.parse(u),null!=u&&(EditorUi.debug("Using local configuration",
u),Editor.configure(u),mxSettings.load())}catch(k){null!=window.console&&console.error(k)}}d()}}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -12322,9 +12323,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,f){var l=!1;try{var d=!0,u=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),t=mxUtils.bind(this,function(G){window.clearTimeout(u);d&&f(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,c=D.backgroundImage,e=null!=D.themes&&"darkTheme"==D.defaultThemeName;if(null!=this.pages&&(e||this.currentPage!=this.pages[0])){var g=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=
this.editor.graph.setBackgroundImage;var k=this.pages[0];this.currentPage==k?D.setBackgroundImage(c):null!=k.viewState&&null!=k.viewState&&(c=k.viewState.backgroundImage,D.setBackgroundImage(c));D.getGlobalVariable=function(G){return"page"==G?k.getName():"pagenumber"==G?1:g.apply(this,arguments)};D.getGlobalVariable=g;document.body.appendChild(D.container);D.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{D!=this.editor.graph&&
-null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(N){G=null}t(G)}),b,this.thumbImageCache,"#ffffff",function(){t()},null,null,null,null,null,null,D,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),q=D.getGraphBounds(),v=D.view.translate,y=D.view.scale;null!=c&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((v.x+c.x)*y,(v.y+c.y)*y,c.width*y,c.height*y)));var A=b/q.width;
-A=Math.min(1,Math.min(3*b/(4*q.height),A));var z=Math.floor(q.x),L=Math.floor(q.y);m.setAttribute("width",Math.ceil(A*(q.width+4)));m.setAttribute("height",Math.ceil(A*(q.height+4)));var M=m.getContext("2d");M.scale(A,A);M.translate(-z,-L);var n=D.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";M.save();M.fillStyle=n;M.fillRect(z,L,Math.ceil(q.width+4),Math.ceil(q.height+4));M.restore();if(null!=c){var x=new Image;x.src=c.src;M.drawImage(x,c.x*A,c.y*A,c.width*A,c.height*A)}var K=new mxJsCanvas(m),
-B=new mxAsyncCanvas(this.thumbImageCache);K.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(G,N){G.shape instanceof mxShape&&G.shape.checkBounds()&&(N.save(),N.translate(.5,.5),G.shape.paint(N),N.translate(-.5,-.5),N.restore())};F.drawText=function(G,N){};F.drawState(D.getView().getState(D.model.root),B);B.finish(mxUtils.bind(this,function(){try{F.drawState(D.getView().getState(D.model.root),K),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(G){m=
+null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(M){G=null}t(G)}),b,this.thumbImageCache,"#ffffff",function(){t()},null,null,null,null,null,null,D,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=D.getGraphBounds(),v=D.view.translate,x=D.view.scale;null!=c&&(p=mxRectangle.fromRectangle(p),p.add(new mxRectangle((v.x+c.x)*x,(v.y+c.y)*x,c.width*x,c.height*x)));var z=b/p.width;
+z=Math.min(1,Math.min(3*b/(4*p.height),z));var y=Math.floor(p.x),L=Math.floor(p.y);m.setAttribute("width",Math.ceil(z*(p.width+4)));m.setAttribute("height",Math.ceil(z*(p.height+4)));var N=m.getContext("2d");N.scale(z,z);N.translate(-y,-L);var K=D.background;if(null==K||""==K||K==mxConstants.NONE)K="#ffffff";N.save();N.fillStyle=K;N.fillRect(y,L,Math.ceil(p.width+4),Math.ceil(p.height+4));N.restore();if(null!=c){var q=new Image;q.src=c.src;N.drawImage(q,c.x*z,c.y*z,c.width*z,c.height*z)}var E=new mxJsCanvas(m),
+A=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var B=new mxImageExport;B.drawShape=function(G,M){G.shape instanceof mxShape&&G.shape.checkBounds()&&(M.save(),M.translate(.5,.5),G.shape.paint(M),M.translate(-.5,-.5),M.restore())};B.drawText=function(G,M){};B.drawState(D.getView().getState(D.model.root),A);A.finish(mxUtils.bind(this,function(){try{B.drawState(D.getView().getState(D.model.root),E),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(G){m=
null}t(m)}));l=!0}}catch(G){l=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}l||window.clearTimeout(u);return l};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var u=new Date;u.setYear(u.getFullYear()+1);document.cookie="MODE="+f+"; expires="+u.toUTCString()}}catch(t){}}})();
@@ -12378,15 +12379,15 @@ l.files){for(var u=0;u<l.files.length;u++)mxUtils.bind(this,function(t){var D=ne
mxUtils.bind(this,function(u,t){StorageFile.listFiles(this,"L",u,t)});window.openBrowserFile=mxUtils.bind(this,function(u,t,D){StorageFile.getFileContent(this,u,t,D)});window.deleteBrowserFile=mxUtils.bind(this,function(u,t,D){StorageFile.deleteFile(this,u,t,D)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(u){this.hideDialog(u)}));window.openFile.setConsumer(mxUtils.bind(this,function(u,t){try{this.loadLibrary(b==
App.MODE_BROWSER?new StorageLibrary(this,u,t):new LocalLibrary(this,u,t))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
App.prototype.saveLibrary=function(b,f,l,d,u,t,D){try{d=null!=d?d:this.mode;u=null!=u?u:!1;t=null!=t?t:!1;var c=this.createLibraryDataFromImages(f),e=mxUtils.bind(this,function(m){this.spinner.stop();null!=D&&D();this.handleError(m,null!=m?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,c,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(m){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,c,m,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),e,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,c,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),e,m):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-c,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),e,m):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,c,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),e,m):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,c,mxUtils.bind(this,function(q){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(q,f)}),e,m):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,c,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),e,m):d==App.MODE_BROWSER?(m=mxUtils.bind(this,function(){var q=new StorageLibrary(this,c,b);q.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(q,f)}),e)}),null==localStorage.getItem(b)?
+this.drive.insertFile(b,c,m,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_BROWSER?(m=mxUtils.bind(this,function(){var p=new StorageLibrary(this,c,b);p.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(p,f)}),e)}),null==localStorage.getItem(b)?
m():this.confirm(mxResources.get("replaceIt",[b]),m)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(u||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(c);var g=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);t||this.libraryLoaded(l,f);null!=D&&D()}),e)});if(b!=l.getTitle()){var k=l.getHash();l.rename(b,mxUtils.bind(this,function(m){l.constructor!=LocalLibrary&&k!=l.getHash()&&
(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(k);g()}),e)}else g()}}catch(m){this.handleError(m)}};
App.prototype.saveFile=function(b,f){var l=this.getCurrentFile();if(null!=l){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&l.removeDraft();this.getCurrentFile()==l||l.isModified()||(l.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==l.getTitle()||null!=l.invalidFileHandle||null==this.mode)if(null!=l&&l.constructor==LocalFile&&null!=l.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
function(e,g){l.invalidFileHandle=null;l.fileHandle=e;l.title=g.name;l.desc=g;this.save(g.name,d)}),null,this.createFileSystemOptions(l.getTitle()));else{var u=null!=l.getTitle()?l.getTitle():this.defaultFilename,t=!mxClient.IS_IOS||!navigator.standalone,D=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var c=4>=b?2:6<b?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(e,g,k){null!=e&&0<e.length&&(/(\.pdf)$/i.test(e)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){k.value=e.split(".").slice(0,-1).join(".");k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==D&&g==App.MODE_DEVICE?null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(m,q){l.fileHandle=m;l.mode=App.MODE_DEVICE;l.title=q.name;
-l.desc=q;this.setMode(App.MODE_DEVICE);this.save(q.name,d)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&this.handleError(m)}),this.createFileSystemOptions(e)):(this.setMode(App.MODE_DEVICE),this.save(e,d)):"download"==g?(new LocalFile(this,null,e)).save():"_blank"==g?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):D!=g?this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){k.value=e.split(".").slice(0,-1).join(".");k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==D&&g==App.MODE_DEVICE?null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(m,p){l.fileHandle=m;l.mode=App.MODE_DEVICE;l.title=p.name;
+l.desc=p;this.setMode(App.MODE_DEVICE);this.save(p.name,d)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&this.handleError(m)}),this.createFileSystemOptions(e)):(this.setMode(App.MODE_DEVICE),this.save(e,d)):"download"==g?(new LocalFile(this,null,e)).save():"_blank"==g?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):D!=g?this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,
this.getFileData(/(\.xml)$/i.test(e)||0>e.indexOf(".")||/(\.drawio)$/i.test(e),/(\.svg)$/i.test(e),/(\.html)$/i.test(e)),null,g,d,null==this.mode,m)})):null!=g&&this.save(e,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,t,null,!0,c,null,null,null,this.editor.fileExtensions,!1);this.showDialog(u.container,420,b>c?390:280,!0,!0);u.init()}else this.save(l.getTitle(),d)}};
App.prototype.loadTemplate=function(b,f,l,d,u){var t=!1,D=b,c=null!=d?d:b,e=/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c);d=/\.png$/i.test(c)||/\.pdf$/i.test(c);this.editor.isCorsEnabledForUrl(D)||(t=d||e,D="t="+(new Date).getTime(),D=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+D+(t?"&base64=1":""));this.editor.loadUrl(D,mxUtils.bind(this,function(g){try{var k=t?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g):g;if(e||this.isVisioData(k))e||(c=u?this.isRemoteVisioData(k)?
"raw.vss":"raw.vssx":this.isRemoteVisioData(k)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(m){f(m)},l,c);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,c))this.isExternalDataComms()?this.parseFileData(k,mxUtils.bind(this,function(m){4==m.readyState&&200<=m.status&&299>=m.status&&"<mxGraphModel"==m.responseText.substring(0,13)&&f(m.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);
@@ -12395,29 +12396,29 @@ App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b=
App.prototype.createFile=function(b,f,l,d,u,t,D,c,e){d=c?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(m){g();null==m&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=m&&this.handleError(m)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==D&&null!=this.stateArg&&null!=this.stateArg.folderId&&(D=this.stateArg.folderId),
this.drive.insertFile(b,f,D,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k,!1,D):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k,!1,D):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k,
!1,D):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k,!1,D):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,t,u,e)}),k):!c&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(g(),this.showSaveFilePicker(mxUtils.bind(this,
-function(m,q){var v=new LocalFile(this,f,q.name,null,m,q);v.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,l,t,u,e)}),k,!0)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&k(m)}),this.createFileSystemOptions(b))):(g(),this.fileCreated(new LocalFile(this,f,b,null==d),l,t,u,e))}catch(m){g(),this.handleError(m)}}};
+function(m,p){var v=new LocalFile(this,f,p.name,null,m,p);v.saveFile(p.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,l,t,u,e)}),k,!0)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&k(m)}),this.createFileSystemOptions(b))):(g(),this.fileCreated(new LocalFile(this,f,b,null==d),l,t,u,e))}catch(m){g(),this.handleError(m)}}};
App.prototype.fileCreated=function(b,f,l,d,u){var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=u&&0<u.length&&(t+="?clibs="+u);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+t,e=D,g=null;null!=D&&/\.svg$/i.test(b.getTitle())&&
-(g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(D,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var q=this.getCurrentFile();null==l&&null!=q&&(l=!q.isModified()&&null==q.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var A=[],z=u.split(";"),L=0;L<z.length;L++)A.push(decodeURIComponent(z[L]));this.loadLibraries(A)}}),y=mxUtils.bind(this,function(){l||null==q||!q.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=d&&d(),window.openWindow(t,null,y))});b.constructor==LocalFile?m():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(q){k();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
-App.prototype.loadFile=function(b,f,l,d,u){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var t=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var y=this.getCurrentFile();
-window.location.hash=null!=y?y.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
+(g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(D,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var p=this.getCurrentFile();null==l&&null!=p&&(l=!p.isModified()&&null==p.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus();
+null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var z=[],y=u.split(";"),L=0;L<y.length;L++)z.push(decodeURIComponent(y[L]));this.loadLibraries(z)}}),x=mxUtils.bind(this,function(){l||null==p||!p.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=d&&d(),window.openWindow(t,null,x))});b.constructor==LocalFile?m():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(p){k();null!=p&&"AbortError"==p.name||this.handleError(p)}))}};
+App.prototype.loadFile=function(b,f,l,d,u){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var t=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();
+window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var g=decodeURIComponent(b.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(v,y){this.spinner.stop();this.fileLoaded(new EmbedFile(this,v,y));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+y,f,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+y},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,z=k.lastIndexOf("."),L=A.lastIndexOf("/");z>L&&0<L&&(A=A.substring(L+1,z),z=k.substring(z),
-this.useCanvasForExport||".png"!=z||(z=".drawio"),".svg"===z||".xml"===z||".html"===z||".png"===z||".drawio"===z)&&(y=A+z)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(v,x){this.spinner.stop();this.fileLoaded(new EmbedFile(this,v,x));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var x=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+x,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+x},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=k,y=k.lastIndexOf("."),L=z.lastIndexOf("/");y>L&&0<L&&(z=z.substring(L+1,y),y=k.substring(y),
+this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(x=z+y)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)&&(g=this.trello),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(y.getHash=function(){return q+b},window.location.hash="#"+y.getHash()):v==y&&null==v.getMode()&&
-(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var y=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,y,null,null,"#"+q+b):y()}))}}),
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else{var p=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(x.getHash=function(){return p+b},window.location.hash="#"+x.getHash()):v==x&&null==v.getMode()&&
+(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var x=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+p+b):x()}))}}),
D=this.getCurrentFile(),c=mxUtils.bind(this,function(){u||null==D||!D.isModified()?t():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=D&&(window.location.hash=D.getHash())}),t,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?c():null==D||f?c():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,c)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(f,l[d])&&f.push(l[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(g,k){k||mxSettings.removeCustomLibrary(g);delete this.loadedLibraries[g]}),d=0,u=[],t=0<b.length&&"L.scratchpad"==b[0]?1:0,D=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var g=b.length-1;0<=g;g--)null!=u[g]&&this.loadLibrary(u[g],g<=t);null!=f&&f()}});if(null!=b)for(var c=0;c<b.length;c++){var e=encodeURIComponent(decodeURIComponent(b[c]));
-mxUtils.bind(this,function(g,k){if(null!=g&&0<g.length&&null==this.loadedLibraries[g]&&null==this.sidebar.palettes[g]){this.loadedLibraries[g]=!0;d++;var m=mxUtils.bind(this,function(L){u[k]=L;d--;D()}),q=mxUtils.bind(this,function(L){l(g,L);d--;D()}),v=g.substring(0,1);if("L"==v)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(g.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(M){".scratchpad"==L&&null==
-M&&(M=this.emptyLibraryXml);null!=M?m(new StorageLibrary(this,M,L)):q()}),q)}catch(M){q()}}),0);else if("U"==v){var y=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,y)):q()}),function(){q()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var A={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
-L,A))}catch(M){q()}}),function(){q()})}catch(L){q()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},q)}catch(L){q()}else{var z=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(z=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(z=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(z=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(z=this.dropbox):"W"==v&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(z=this.oneDrive);null!=z?z.getLibrary(decodeURIComponent(g.substring(1)),mxUtils.bind(this,function(L){try{m(L)}catch(M){q()}}),function(L){q()}):q(!0)}}})(e,c)}D()}};
+mxUtils.bind(this,function(g,k){if(null!=g&&0<g.length&&null==this.loadedLibraries[g]&&null==this.sidebar.palettes[g]){this.loadedLibraries[g]=!0;d++;var m=mxUtils.bind(this,function(L){u[k]=L;d--;D()}),p=mxUtils.bind(this,function(L){l(g,L);d--;D()}),v=g.substring(0,1);if("L"==v)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(g.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(N){".scratchpad"==L&&null==
+N&&(N=this.emptyLibraryXml);null!=N?m(new StorageLibrary(this,N,L)):p()}),p)}catch(N){p()}}),0);else if("U"==v){var x=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(x,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,x)):p()}),function(){p()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var z={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
+L,z))}catch(N){p()}}),function(){p()})}catch(L){p()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},p)}catch(L){p()}else{var y=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==v&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(g.substring(1)),mxUtils.bind(this,function(L){try{m(L)}catch(N){p()}}),function(L){p()}):p(!0)}}})(e,c)}D()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=
@@ -12446,10 +12447,10 @@ App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,f,l,d){var u=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(t){try{null!=l&&l(t,mxUtils.bind(this,function(){this.hideDialog();u()}))}catch(D){this.editor.setStatus(mxUtils.htmlEntities(D.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(t){null!=d&&d(t);t&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,f,l,d,u,t,D,c){var e=f;/\.svg$/i.test(e)||(e=e.substring(0,f.lastIndexOf("."))+d);var g=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(g=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var k=new XMLHttpRequest;k.open("GET",b,!0);g||(k.responseType="blob");if(c)for(var m in c)k.setRequestHeader(m,c[m]);k.onload=mxUtils.bind(this,function(){if(200<=
-k.status&&299>=k.status){var v=null;g?(v=JSON.parse(k.responseText),v=this.base64ToBlob(v.content,"application/octet-stream")):v=new Blob([k.response],{type:"application/octet-stream"});this.importVisio(v,mxUtils.bind(this,function(y){u(new LocalFile(this,y,e,!0))}),t,f)}else null!=t&&t({message:mxResources.get("errorLoadingFile")})});k.onerror=t;k.send()}else{var q=mxUtils.bind(this,function(v){try{if(/\.pdf$/i.test(f)){var y=Editor.extractGraphModelFromPdf(v);null!=y&&0<y.length&&u(new LocalFile(this,
-y,e,!0))}else/\.png$/i.test(f)?(y=this.extractGraphModelFromPng(v),null!=y?u(new LocalFile(this,y,e,!0)):u(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?u(new LocalFile(this,A.responseText,e,!0)):null!=t&&t({message:mxResources.get("errorLoadingFile")}))}),f):u(new LocalFile(this,v,e,!0))}catch(A){null!=t&&t(A)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=l&&"image/"==l.substring(0,6);g?mxUtils.get(b,mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){if(null!=u){v=JSON.parse(v.getText());var y=v.content;"base64"===v.encoding&&(y=/\.png$/i.test(f)?"data:image/png;base64,"+y:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+y:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y));q(y)}}else null!=t&&t({code:App.ERROR_UNKNOWN})}),function(){null!=t&&t({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=t&&t({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=D?D(b,q,t,l):this.editor.loadUrl(b,q,t,l,null,null,null,c)}};
+k.status&&299>=k.status){var v=null;g?(v=JSON.parse(k.responseText),v=this.base64ToBlob(v.content,"application/octet-stream")):v=new Blob([k.response],{type:"application/octet-stream"});this.importVisio(v,mxUtils.bind(this,function(x){u(new LocalFile(this,x,e,!0))}),t,f)}else null!=t&&t({message:mxResources.get("errorLoadingFile")})});k.onerror=t;k.send()}else{var p=mxUtils.bind(this,function(v){try{if(/\.pdf$/i.test(f)){var x=Editor.extractGraphModelFromPdf(v);null!=x&&0<x.length&&u(new LocalFile(this,
+x,e,!0))}else/\.png$/i.test(f)?(x=this.extractGraphModelFromPng(v),null!=x?u(new LocalFile(this,x,e,!0)):u(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(new LocalFile(this,z.responseText,e,!0)):null!=t&&t({message:mxResources.get("errorLoadingFile")}))}),f):u(new LocalFile(this,v,e,!0))}catch(z){null!=t&&t(z)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+/\.pdf$/i.test(f)||null!=l&&"image/"==l.substring(0,6);g?mxUtils.get(b,mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){if(null!=u){v=JSON.parse(v.getText());var x=v.content;"base64"===v.encoding&&(x=/\.png$/i.test(f)?"data:image/png;base64,"+x:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+x:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(x):atob(x));p(x)}}else null!=t&&t({code:App.ERROR_UNKNOWN})}),function(){null!=t&&t({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=t&&t({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=D?D(b,p,t,l):this.editor.loadUrl(b,p,t,l,null,null,null,c)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(d){this.appIconClicked(d)}));var b=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -12477,13 +12478,13 @@ mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.pr
else{var d=!1;this.userPanel.innerHTML="";l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.className="geDialogClose";l.style.top="8px";l.style.right="8px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(l);if(null!=this.drive){var u=this.drive.getUsersList();if(0<u.length){var t=mxUtils.bind(this,
function(e,g){var k=this.getCurrentFile();null!=k&&k.constructor==DriveFile?(this.spinner.spin(document.body,g),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();e()}),2E3)):e()});l=mxUtils.bind(this,function(e){var g=document.createElement("tr");g.setAttribute("title","User ID: "+e.id);var k=document.createElement("td");k.setAttribute("valig","middle");k.style.height="59px";k.style.width="66px";var m=document.createElement("img");m.setAttribute("width","50");
m.setAttribute("height","50");m.setAttribute("border","0");m.setAttribute("src",null!=e.pictureUrl?e.pictureUrl:this.defaultUserPicture);m.style.borderRadius="50%";m.style.margin="4px 8px 0 8px";k.appendChild(m);g.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.paddingTop="4px";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,e.displayName+(e.isCurrent&&1<u.length?" ("+mxResources.get("default")+
-")":""));null!=e.email&&(mxUtils.br(k),m=document.createElement("small"),m.style.color="gray",mxUtils.write(m,e.email),k.appendChild(m));m=document.createElement("div");m.style.marginTop="4px";var q=document.createElement("i");mxUtils.write(q,mxResources.get("googleDrive"));m.appendChild(q);k.appendChild(m);g.appendChild(k);e.isCurrent||(g.style.cursor="pointer",g.style.opacity="0.3",mxEvent.addListener(g,"click",mxUtils.bind(this,function(v){t(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(e);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(v)})));return g});d=!0;var D=document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";for(var c=0;c<u.length;c++)D.appendChild(l(u[c]));this.userPanel.appendChild(D);l=document.createElement("div");l.style.textAlign=
+")":""));null!=e.email&&(mxUtils.br(k),m=document.createElement("small"),m.style.color="gray",mxUtils.write(m,e.email),k.appendChild(m));m=document.createElement("div");m.style.marginTop="4px";var p=document.createElement("i");mxUtils.write(p,mxResources.get("googleDrive"));m.appendChild(p);k.appendChild(m);g.appendChild(k);e.isCurrent||(g.style.cursor="pointer",g.style.opacity="0.3",mxEvent.addListener(g,"click",mxUtils.bind(this,function(v){t(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(e);
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(x){this.handleError(x)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(v)})));return g});d=!0;var D=document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";for(var c=0;c<u.length;c++)D.appendChild(l(u[c]));this.userPanel.appendChild(D);l=document.createElement("div");l.style.textAlign=
"left";l.style.padding="10px";l.style.whiteSpace="nowrap";l.style.borderTop="1px solid rgb(224, 224, 224)";D=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){t(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));D.className="geBtn";D.style.float="right";l.appendChild(D);D=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var e=this.drive.createAuthWin();e.blur();window.focus();t(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0,e)}),mxResources.get("closingFile")+"...")}));D.className="geBtn";D.style.margin="0px";l.appendChild(D);this.userPanel.appendChild(l)}}l=mxUtils.bind(this,function(e,g,k,m){if(null!=e){d&&this.userPanel.appendChild(document.createElement("hr"));
-d=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var v=document.createElement("tbody"),y=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=g){var z=document.createElement("img");z.setAttribute("width","40");z.setAttribute("height","40");z.setAttribute("border","0");z.setAttribute("src",g);z.style.marginRight="6px";A.appendChild(z)}y.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,e.displayName);null!=e.email&&(mxUtils.br(A),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),A.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),A.appendChild(e));y.appendChild(A);v.appendChild(y);
-q.appendChild(v);this.userPanel.appendChild(q);e=document.createElement("div");e.style.textAlign="center";e.style.padding="10px";e.style.whiteSpace="nowrap";null!=k&&(k=mxUtils.button(mxResources.get("signOut"),k),k.className="geBtn",e.appendChild(k));this.userPanel.appendChild(e)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==DropboxFile){var g=mxUtils.bind(this,function(){this.dropbox.logout();
+d=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";var v=document.createElement("tbody"),x=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=g){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",g);y.style.marginRight="6px";z.appendChild(y)}x.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,e.displayName);null!=e.email&&(mxUtils.br(z),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),z.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),z.appendChild(e));x.appendChild(z);v.appendChild(x);
+p.appendChild(v);this.userPanel.appendChild(p);e=document.createElement("div");e.style.textAlign="center";e.style.padding="10px";e.style.whiteSpace="nowrap";null!=k&&(k=mxUtils.button(mxResources.get("signOut"),k),k.className="geBtn",e.appendChild(k));this.userPanel.appendChild(e)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==DropboxFile){var g=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==OneDriveFile){var g=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==GitHubFile){var g=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&l(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==GitLabFile){var g=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):
@@ -12496,157 +12497,158 @@ null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(l){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var u=document.createElement("img");mxUtils.setOpacity(u,50);u.style.height="16px";u.style.width="16px";u.setAttribute("border","0");u.setAttribute("valign","bottom");u.setAttribute("src",Editor.helpImage);d.appendChild(u);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(t){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(t)}));return d};Menus.prototype.addLinkToItem=function(l,d){null!=l&&l.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function l(n,x,K){this.ui=n;this.previousExtFonts=this.extFonts=x;this.prevCustomFonts=this.customFonts=K}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,t=mxUtils.bind(u,u.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function l(q,E,A){this.ui=q;this.previousExtFonts=this.extFonts=E;this.prevCustomFonts=this.customFonts=A}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,t=mxUtils.bind(u,u.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),e=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));d.actions.addAction("new...",function(){var n=d.isOffline();if(n||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var x=new NewDialog(d,n,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(x.container,n?350:620,n?70:460,!0,!0,function(B){d.sidebar.hideTooltip();B&&null==d.getCurrentFile()&&d.showSplash()});
-x.init()}else{var K=function(B){return{id:B.id,isExt:!0,url:B.downloadUrl,title:B.title,imgUrl:B.thumbnailLink,changedBy:B.lastModifyingUserName,lastModifiedOn:B.modifiedDate}};n=new TemplatesDialog(d,function(B,F,G){var N=G.libs,J=G.clibs;d.pickFolder(d.mode,function(E){d.createFile(F,B,null!=N&&0<N.length?N:null,null,function(){d.hideDialog()},null,E,null,null!=J&&0<J.length?J:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(B,F,G){var N=new Date;N.setDate(N.getDate()-
-7);d.drive.listFiles(null,N,G?!0:!1,function(J){for(var E=[],H=0;H<J.items.length;H++)E.push(K(J.items[H]));B(E)},F)},function(B,F,G,N){d.drive.listFiles(B,null,N?!0:!1,function(J){for(var E=[],H=0;H<J.items.length;H++)E.push(K(J.items[H]));F(E)},G)},function(B,F,G){d.drive.getFile(B.id,function(N){F(N.data)},G)},null,null,!1,!1);d.showDialog(n.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(u.isEnabled()&&
-!u.isCellLocked(u.getDefaultParent())){var n=new NewDialog(d,null,!1,function(x){d.hideDialog();if(null!=x){var K=d.editor.graph.getFreeInsertPoint();u.setSelectionCells(d.importXml(x,Math.max(K.x,20),Math.max(K.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(n.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});n.init()}})).isEnabled=t;var k=d.actions.addAction("shareCursor",
+d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline();if(q||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var E=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(E.container,q?350:620,q?70:460,!0,!0,function(B){d.sidebar.hideTooltip();B&&null==d.getCurrentFile()&&d.showSplash()});
+E.init()}else{var A=function(B){return{id:B.id,isExt:!0,url:B.downloadUrl,title:B.title,imgUrl:B.thumbnailLink,changedBy:B.lastModifyingUserName,lastModifiedOn:B.modifiedDate}};q=new TemplatesDialog(d,function(B,G,M){var H=M.libs,F=M.clibs;d.pickFolder(d.mode,function(I){d.createFile(G,B,null!=H&&0<H.length?H:null,null,function(){d.hideDialog()},null,I,null,null!=F&&0<F.length?F:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(B,G,M){var H=new Date;H.setDate(H.getDate()-
+7);d.drive.listFiles(null,H,M?!0:!1,function(F){for(var I=[],R=0;R<F.items.length;R++)I.push(A(F.items[R]));B(I)},G)},function(B,G,M,H){d.drive.listFiles(B,null,H?!0:!1,function(F){for(var I=[],R=0;R<F.items.length;R++)I.push(A(F.items[R]));G(I)},M)},function(B,G,M){d.drive.getFile(B.id,function(H){G(H.data)},M)},null,null,!1,!1);d.showDialog(q.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(u.isEnabled()&&
+!u.isCellLocked(u.getDefaultParent())){var q=new NewDialog(d,null,!1,function(E){d.hideDialog();if(null!=E){var A=d.editor.graph.getFreeInsertPoint();u.setSelectionCells(d.importXml(E,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(q.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});q.init()}})).isEnabled=t;var k=d.actions.addAction("shareCursor",
function(){d.setShareCursorPosition(!d.isShareCursorPosition())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShareCursorPosition()});k=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShowRemoteCursors()});k=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==
mxConstants.POINTS});k=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});k=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});k=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
-k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,["points","inches","millimeters","meters"],x)})));k=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});k.setEnabled(d.canvasSupported&&9!=document.documentMode);
+k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,["points","inches","millimeters","meters"],E)})));k=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});k.setEnabled(d.canvasSupported&&9!=document.documentMode);
k.setToggleAction(!0);k.setSelectedCallback(function(){return null!=d.ruler});k=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});k.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;k.setToggleAction(!0);k.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});d.actions.addAction("properties...",function(){var n=new FilePropertiesDialog(d);d.showDialog(n.container,320,120,!0,!0);n.init()}).isEnabled=t;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(n){u.isEnabled()&&(null==this.freehandWindow&&(n=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,n?120:84,n)),u.freehand.isDrawing()?
-u.freehand.stopDrawing():u.freehand.startDrawing(),this.freehandWindow.window.setVisible(u.freehand.isDrawing()))})).isEnabled=function(){return t()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var x=null==d.pages||1>=d.pages.length,K=document.createElement("h3");mxUtils.write(K,mxResources.get("formatXml"));K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-n.appendChild(K);var B=d.addCheckbox(n,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),F=d.addCheckbox(n,mxResources.get("compressed"),!0),G=d.addCheckbox(n,mxResources.get("allPages"),!x,x);G.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?G.setAttribute("disabled","disabled"):G.removeAttribute("disabled")});n=new CustomDialog(d,n,mxUtils.bind(this,function(){d.downloadFile("xml",!F.checked,null,!B.checked,x||!G.checked)}),null,mxResources.get("export"));d.showDialog(n.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(n,x,K,B,F,G,N,J,E){N=[];E&&N.push("tags=%7B%7D");n=new EmbedDialog(d,d.createLink(n,x,K,B,F,G,null,!0,N));d.showDialog(n.container,450,240,!0,!0);n.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
-function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,n,function(x,K,B,F,G,N,J,E,H,S,U){d.createHtml(x,K,B,F,G,N,J,E,H,S,U,mxUtils.bind(this,function(Q,W){var V=d.getBaseFilename(J);Q='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(V)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+Q+"\n"+W+"\n</body>\n</html>";d.saveData(V+(".drawio"==V.substring(V.lenth-7)?"":".drawio")+
-".html","html",Q,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var n=null==d.pages||1>=d.pages.length,x=document.createElement("div");x.style.whiteSpace="nowrap";var K=document.createElement("h3");mxUtils.write(K,mxResources.get("formatPdf"));K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(K);var B=function(){J!=this&&this.checked?
-(W.removeAttribute("disabled"),W.checked=!u.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};K=200;var F=1,G=null;if(d.pdfPageExport&&!n){var N=function(){U.value=Math.max(1,Math.min(F,Math.max(parseInt(U.value),parseInt(H.value))));H.value=Math.max(1,Math.min(F,Math.min(parseInt(U.value),parseInt(H.value))))},J=d.addRadiobox(x,"pages",mxResources.get("allPages"),!0),E=d.addRadiobox(x,"pages",mxResources.get("pages")+":",!1,null,!0),H=document.createElement("input");H.style.cssText=
-"margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("type","number");H.setAttribute("min","1");H.style.width="50px";x.appendChild(H);var S=document.createElement("span");mxUtils.write(S,mxResources.get("to"));x.appendChild(S);var U=H.cloneNode(!0);x.appendChild(U);mxEvent.addListener(H,"focus",function(){E.checked=!0});mxEvent.addListener(U,"focus",function(){E.checked=!0});mxEvent.addListener(H,"change",N);mxEvent.addListener(U,"change",N);if(null!=d.pages&&(F=d.pages.length,null!=d.currentPage))for(N=
-0;N<d.pages.length;N++)if(d.currentPage==d.pages[N]){G=N+1;H.value=G;U.value=G;break}H.setAttribute("max",F);U.setAttribute("max",F);mxUtils.br(x);var Q=d.addRadiobox(x,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),W=d.addCheckbox(x,mxResources.get("crop"),!1,!0),V=d.addCheckbox(x,mxResources.get("grid"),!1,!1);mxEvent.addListener(J,"change",B);mxEvent.addListener(E,"change",B);mxEvent.addListener(Q,"change",B);K+=64}else Q=d.addCheckbox(x,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),
-W=d.addCheckbox(x,mxResources.get("crop"),!u.pageVisible||!d.pdfPageExport,!d.pdfPageExport),V=d.addCheckbox(x,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(Q,"change",B);B=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var X=null,p=null;if(EditorUi.isElectronApp||B)p=d.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),K+=30;B&&(X=d.addCheckbox(x,mxResources.get("transparentBackground"),!1),K+=30);x=new CustomDialog(d,
-x,mxUtils.bind(this,function(){var C=null;if(!n){C=parseInt(H.value);var I=parseInt(U.value);C=J.checked||C==G&&I==G?null:{from:Math.max(0,Math.min(F-1,C-1)),to:Math.max(0,Math.min(F-1,I-1))}}d.downloadFile("pdf",null,null,!Q.checked,n?!0:!J.checked&&null==C,!W.checked,null!=X&&X.checked,null,null,V.checked,null!=p&&p.checked,C)}),null,mxResources.get("export"));d.showDialog(x.container,300,K,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
-d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function n(){null!=x&&x.removeDraft();d.fileLoaded(null)}var x=d.getCurrentFile();null!=x&&x.isModified()?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){u.getSelectionCells();if(1==u.getSelectionCount()){var n=
-u.getSelectionCell(),x=u.view.getState(n);null!=x&&null!=x.shape&&null!=x.shape.stencil&&(n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(n,x){d.spinner.stop();n=new RevisionDialog(d,n,x);d.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,
-function(n){d.handleError(n)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");k=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(k.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var n=d.getCurrentFile();null!=n&&(window.drawdata=
-d.getFileData(),n=null!=n.getTitle()?n.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&(k=d.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!d.isMathEnabled();u.model.execute(n)}),k.setToggleAction(!0),k.setSelectedCallback(function(){return d.isMathEnabled()}),
-k.isEnabled=t);isLocalStorage&&(k=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var m=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var n=
-u.getSelectionCells(),x=[],K=0;K<n.length;K++)u.getModel().isVertex(n[K])&&x.push(n[K]);0<x.length&&(n=new EditGeometryDialog(d,x),d.showDialog(n.container,200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;d.actions.addAction("copyStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&(q=u.copyStyle(u.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&null!=q&&u.pasteStyle(q,u.getSelectionCells())},
-null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var n=new BackgroundImageDialog(d,function(x){d.setBackgroundImage(x)});d.showDialog(n.container,400,170,!0,!0);n.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(n,x,K,B,F,G,N,J,E,H,S,U,Q,W,V){E=parseInt(n);!isNaN(E)&&0<E&&(V?d.downloadFile("remoteSvg",null,null,K,null,J,x,n,N,null,F):d.exportSvg(E/100,x,K,B,F,G,N,!J,!1,H,U,Q,W))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,x,K,B,F,G,N,J,E,H,S,U,Q){n=parseInt(n);!isNaN(n)&&
-0<n&&d.exportImage(n/100,x,K,B,F,N,!J,!1,null,S,null,U,Q)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,x,K,B,F){d.downloadFile(x?"xmlpng":"png",null,null,n,null,null,K,B,F)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(n,x,K,B,F,G,N,J,E,H,S,U,Q){n=parseInt(n);!isNaN(n)&&0<n&&d.exportImage(n/100,!1,K,B,!1,N,!J,!1,"jpeg",S,null,U,Q)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,x,K,B,F){d.downloadFile("jpeg",null,null,n,null,null,null,B,F)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(u.model.getTopmostCells(u.getSelectionCells())),
-x=mxUtils.getXml(0==n.length?d.editor.getGraphXml():u.encodeCells(n));d.copyImage(n,x)}));k.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;k=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){u.setShadowVisible(!u.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return u.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||
+Editor.inlineFullscreen:null!=document.fullscreenElement});d.actions.addAction("properties...",function(){var q=new FilePropertiesDialog(d);d.showDialog(q.container,320,120,!0,!0);q.init()}).isEnabled=t;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(q){u.isEnabled()&&(null==this.freehandWindow&&(q=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,q?120:84,q)),u.freehand.isDrawing()?
+u.freehand.stopDrawing():u.freehand.startDrawing(),this.freehandWindow.window.setVisible(u.freehand.isDrawing()))})).isEnabled=function(){return t()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var E=null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+q.appendChild(A);var B=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),G=d.addCheckbox(q,mxResources.get("compressed"),!0),M=d.addCheckbox(q,mxResources.get("allPages"),!E,E);M.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?M.setAttribute("disabled","disabled"):M.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!G.checked,null,!B.checked,E||!M.checked)}),null,mxResources.get("export"));d.showDialog(q.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(q,E,A,B,G,M,H,F,I){H=[];I&&H.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,E,A,B,G,M,null,!0,H));d.showDialog(q.container,450,240,!0,!0);q.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
+function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,q,function(E,A,B,G,M,H,F,I,R,W,P){d.createHtml(E,A,B,G,M,H,F,I,R,W,P,mxUtils.bind(this,function(V,U){var X=d.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var q=null==d.pages||1>=d.pages.length,E=document.createElement("div");E.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatPdf"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";E.appendChild(A);var B=function(){F!=this&&this.checked?
+(U.removeAttribute("disabled"),U.checked=!u.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};A=200;var G=1,M=null;if(d.pdfPageExport&&!q){var H=function(){P.value=Math.max(1,Math.min(G,Math.max(parseInt(P.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(P.value),parseInt(R.value))))},F=d.addRadiobox(E,"pages",mxResources.get("allPages"),!0),I=d.addRadiobox(E,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
+"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";E.appendChild(R);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));E.appendChild(W);var P=R.cloneNode(!0);E.appendChild(P);mxEvent.addListener(R,"focus",function(){I.checked=!0});mxEvent.addListener(P,"focus",function(){I.checked=!0});mxEvent.addListener(R,"change",H);mxEvent.addListener(P,"change",H);if(null!=d.pages&&(G=d.pages.length,null!=d.currentPage))for(H=
+0;H<d.pages.length;H++)if(d.currentPage==d.pages[H]){M=H+1;R.value=M;P.value=M;break}R.setAttribute("max",G);P.setAttribute("max",G);mxUtils.br(E);var V=d.addRadiobox(E,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),U=d.addCheckbox(E,mxResources.get("crop"),!1,!0),X=d.addCheckbox(E,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",B);mxEvent.addListener(I,"change",B);mxEvent.addListener(V,"change",B);A+=64}else V=d.addCheckbox(E,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),
+U=d.addCheckbox(E,mxResources.get("crop"),!u.pageVisible||!d.pdfPageExport,!d.pdfPageExport),X=d.addCheckbox(E,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",B);B=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var n=null,C=null;if(EditorUi.isElectronApp||B)C=d.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),A+=30;B&&(n=d.addCheckbox(E,mxResources.get("transparentBackground"),!1),A+=30);E=new CustomDialog(d,
+E,mxUtils.bind(this,function(){var J=null;if(!q){J=parseInt(R.value);var T=parseInt(P.value);J=F.checked||J==M&&T==M?null:{from:Math.max(0,Math.min(G-1,J-1)),to:Math.max(0,Math.min(G-1,T-1))}}d.downloadFile("pdf",null,null,!V.checked,q?!0:!F.checked&&null==J,!U.checked,null!=n&&n.checked,null,null,X.checked,null!=C&&C.checked,J)}),null,mxResources.get("export"));d.showDialog(E.container,300,A,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
+d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=E&&E.removeDraft();d.fileLoaded(null)}var E=d.getCurrentFile();null!=E&&E.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){u.getSelectionCells();if(1==u.getSelectionCount()){var q=
+u.getSelectionCell(),E=u.view.getState(q);null!=E&&null!=E.shape&&null!=E.shape.stencil&&(q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(q,E){d.spinner.stop();q=new RevisionDialog(d,q,E);d.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,
+function(q){d.handleError(q)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");k=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(k.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var q=d.getCurrentFile();null!=q&&(window.drawdata=
+d.getFileData(),q=null!=q.getTitle()?q.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(k=d.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!d.isMathEnabled();u.model.execute(q)}),k.setToggleAction(!0),k.setSelectedCallback(function(){return d.isMathEnabled()}),
+k.isEnabled=t);isLocalStorage&&(k=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var m=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=
+u.getSelectionCells(),E=[],A=0;A<q.length;A++)u.getModel().isVertex(q[A])&&E.push(q[A]);0<E.length&&(q=new EditGeometryDialog(d,E),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");var p=null;d.actions.addAction("copyStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&(p=u.copyStyle(u.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&null!=p&&u.pasteStyle(p,u.getSelectionCells())},
+null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var q=new BackgroundImageDialog(d,function(E){d.setBackgroundImage(E)});d.showDialog(q.container,400,170,!0,!0);q.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(q,E,A,B,G,M,H,F,I,R,W,P,V,U,X){I=parseInt(q);!isNaN(I)&&0<I&&(X?d.downloadFile("remoteSvg",null,null,A,null,F,E,q,H,null,G):d.exportSvg(I/100,E,A,B,G,M,H,!F,!1,R,P,V,U))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(q,E,A,B,G,M,H,F,I,R,W,P,V){q=parseInt(q);!isNaN(q)&&
+0<q&&d.exportImage(q/100,E,A,B,G,H,!F,!1,null,W,null,P,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,E,A,B,G){d.downloadFile(E?"xmlpng":"png",null,null,q,null,null,A,B,G)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(q,E,A,B,G,M,H,F,I,R,W,P,V){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,A,B,!1,H,!F,!1,"jpeg",W,null,P,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,E,A,B,G){d.downloadFile("jpeg",null,null,q,null,null,null,B,G)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(u.model.getTopmostCells(u.getSelectionCells())),
+E=mxUtils.getXml(0==q.length?d.editor.getGraphXml():u.encodeCells(q));d.copyImage(q,E)}));k.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;k=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){u.setShadowVisible(!u.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return u.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",
-function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var n=new FeedbackDialog(d);d.showDialog(n.container,610,360,!0,!1);n.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});d.actions.addAction("forkme",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop"):
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var q=new FeedbackDialog(d);d.showDialog(q.container,610,360,!0,!1);q.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});d.actions.addAction("forkme",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop"):
d.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";d.actions.addAction("downloadDesktop...",function(){d.openLink("https://get.diagrams.net/")});k=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(n,x){var K=(n=u.isEnabled()&&(null==x||!mxEvent.isShiftDown(x)))?"findReplace":"find";x=K+"Window";if(null==this[x]){var B=n?"min"==uiTheme?330:
-300:240;this[x]=new FindWindow(d,document.body.offsetWidth-(B+20),100,B,n?"min"==uiTheme?304:288:170,n);this[x].window.addListener("show",function(){d.fireEvent(new mxEventObject(K))});this[x].window.addListener("hide",function(){d.fireEvent(new mxEventObject(K))});this[x].window.setVisible(!0)}else this[x].window.setVisible(!this[x].window.isVisible())}),null,null,Editor.ctrlKey+"+F");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){var n=u.isEnabled()?"findReplaceWindow":
-"findWindow";return null!=this[n]&&this[n].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var n=null==d.pages||1>=d.pages.length;if(n)d.exportVisio();else{var x=document.createElement("div");x.style.whiteSpace="nowrap";var K=document.createElement("h3");mxUtils.write(K,mxResources.get("formatVsdx"));K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(K);var B=d.addCheckbox(x,mxResources.get("allPages"),
-!n,n);B.style.marginBottom="16px";n=new CustomDialog(d,x,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="4px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var x=
-document.createElement("span");x.style["float"]="right";x.style.cursor="pointer";x.style.userSelect="none";x.style.marginTop="-4px";x.appendChild(n);mxUtils.write(x,mxResources.get("showStartScreen"));mxEvent.addListener(x,"click",function(F){mxEvent.getSource(F)!=n&&(n.checked=!n.checked)});header=x}var K=localStorage.getItem(Editor.configurationKey);x=[[mxResources.get("reset"),function(F,G){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(F)?(localStorage.removeItem(Editor.settingsKey),
-localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(N){d.handleError(N)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");null!=B&&"1"==urlParams.sketch&&x.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||x.push([mxResources.get("share"),function(F,G){if(0<G.value.length)try{var N=JSON.parse(G.value),J=window.location.protocol+"//"+window.location.host+
-"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),E=new EmbedDialog(d,J);d.showDialog(E.container,450,240,!0);E.init()}catch(H){d.handleError(H)}else d.handleError({message:mxResources.get("invalidInput")})}]);x=new TextareaDialog(d,mxResources.get("configuration")+":",null!=K?JSON.stringify(JSON.parse(K),null,2):"",function(F){if(null!=F)try{if(null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save()),F==K)d.hideDialog();else{if(0<F.length){var G=JSON.parse(F);
-localStorage.setItem(Editor.configurationKey,JSON.stringify(G))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(N){d.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",x,n.parentNode);d.showDialog(x.container,620,460,!0,!1);x.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(n,x){var K=mxUtils.bind(this,
-function(F){var G=""==F?mxResources.get("automatic"):mxLanguageMap[F],N=null;""!=G&&(N=n.addItem(G,null,mxUtils.bind(this,function(){mxSettings.setLanguage(F);mxSettings.save();mxClient.language=F;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),x),(F==mxLanguage||""==F&&null==mxLanguage)&&n.addCheckmark(N,Editor.checkmarkImage));return N});K("");n.addSeparator(x);for(var B in mxLanguageMap)K(B)})));var v=Menus.prototype.createMenubar;
-Menus.prototype.createMenubar=function(n){var x=v.apply(this,arguments);if(null!=x&&"1"!=urlParams.noLangIcon){var K=this.get("language");if(null!=K){K=x.addMenu("",K.funct);K.setAttribute("title",mxResources.get("language"));K.style.width="16px";K.style.paddingTop="2px";K.style.paddingLeft="4px";K.style.zIndex="1";K.style.position="absolute";K.style.display="block";K.style.cursor="pointer";K.style.right="17px";"atlas"==uiTheme?(K.style.top="6px",K.style.right="15px"):K.style.top="min"==uiTheme?"2px":
-"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex="1";K.appendChild(B);mxUtils.setOpacity(K,40);"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.width="19px",K.style.height="19px",K.style.webkitAppRegion="no-drag",B.style.webkitAppRegion=
-"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)K.style.opacity="0.85",K.style.filter="invert(100%)";document.body.appendChild(K);x.langIcon=K}}return x}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var n=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(x){if(0<x.length)try{var K=JSON.parse(x);
-d.executeLayoutList(K);d.customLayoutConfig=K}catch(B){d.handleError(B),null!=window.console&&console.error(B)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(n.container,620,460,!0,!0);n.init()});k=this.get("layout");var y=k.funct;k.funct=function(n,x){y.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){function K(){"undefined"!==typeof mxOrgChartLayout||d.loadingOrgChart||d.isOffline(!0)?J():d.spinner.spin(document.body,
-mxResources.get("loading"))&&(d.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",J)})})}):mxscript("js/extensions.min.js",J))}var B=null,F=20,G=20,N=!0,J=function(){d.loadingOrgChart=!1;d.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=B&&N){var X=d.editor.graph,p=new mxOrgChartLayout(X,B,
-F,G),C=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(C=X.getSelectionCell());p.execute(C);N=!1}},E=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");E.appendChild(H);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<H.length;U++){var Q=document.createElement("option");mxUtils.write(Q,H[U]);Q.value=U;2==U&&Q.setAttribute("selected","selected");S.appendChild(Q)}mxEvent.addListener(S,"change",function(){B=S.value});E.appendChild(S);H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,
-mxResources.get("parentChildSpacing")+": ");E.appendChild(H);var W=document.createElement("input");W.type="number";W.value=F;W.style.width="200px";W.style.boxSizing="border-box";E.appendChild(W);mxEvent.addListener(W,"change",function(){F=W.value});H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("siblingSpacing")+": ");E.appendChild(H);var V=document.createElement("input");V.type="number";V.value=G;V.style.width=
-"200px";V.style.boxSizing="border-box";E.appendChild(V);mxEvent.addListener(V,"change",function(){G=V.value});E=new CustomDialog(d,E,function(){null==B&&(B=2);K()});d.showDialog(E.container,355,140,!0,!0)},x,null,t());n.addSeparator(x);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var K=new mxParallelEdgeLayout(u);K.checkOverlap=!0;K.spacing=20;d.executeLayout(function(){K.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}),x);n.addSeparator(x);
-d.menus.addMenuItem(n,"runLayout",x,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,x){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(n,["about"],x);else{var K=n.addItem("Search:",null,null,x,null,null,!1);K.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";K.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.marginLeft="8px";mxEvent.addListener(B,
-"keydown",mxUtils.bind(this,function(F){var G=mxUtils.trim(B.value);13==F.keyCode&&0<G.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(G)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:G}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==F.keyCode&&(B.value="")}));K.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,
-function(F){document.activeElement!=B&&B.focus();mxEvent.consume(F)},function(F){mxEvent.consume(F)},function(F){mxEvent.consume(F)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),x),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates",
-"-"],x),this.addMenuItems(n,["forkme","-","about"],x)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),x)}"1"==urlParams.test&&(n.addSeparator(x),this.addSubmenu("testDevelop",n,x))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var n=prompt("Language Code",Graph.diagramLanguage||"");null!=n&&(Graph.diagramLanguage=0<n.length?n:null,u.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
+this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(q,E){var A=(q=u.isEnabled()&&(null==E||!mxEvent.isShiftDown(E)))?"findReplace":"find";E=A+"Window";if(null==this[E]){var B=q?"min"==uiTheme?330:
+300:240;this[E]=new FindWindow(d,document.body.offsetWidth-(B+20),100,B,q?"min"==uiTheme?304:288:170,q);this[E].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[E].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});this[E].window.setVisible(!0)}else this[E].window.setVisible(!this[E].window.isVisible())}),null,null,Editor.ctrlKey+"+F");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){var q=u.isEnabled()?"findReplaceWindow":
+"findWindow";return null!=this[q]&&this[q].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==d.pages||1>=d.pages.length;if(q)d.exportVisio();else{var E=document.createElement("div");E.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";E.appendChild(A);var B=d.addCheckbox(E,mxResources.get("allPages"),
+!q,q);B.style.marginBottom="16px";q=new CustomDialog(d,E,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="4px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var E=
+document.createElement("span");E.style["float"]="right";E.style.cursor="pointer";E.style.userSelect="none";E.style.marginTop="-4px";E.appendChild(q);mxUtils.write(E,mxResources.get("showStartScreen"));mxEvent.addListener(E,"click",function(G){mxEvent.getSource(G)!=q&&(q.checked=!q.checked)});header=E}var A=localStorage.getItem(Editor.configurationKey);E=[[mxResources.get("reset"),function(G,M){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),
+localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(H){d.handleError(H)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");null!=B&&"1"==urlParams.sketch&&E.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||E.push([mxResources.get("share"),function(G,M){if(0<M.value.length)try{var H=JSON.parse(M.value),F=window.location.protocol+"//"+window.location.host+
+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(H)),I=new EmbedDialog(d,F);d.showDialog(I.container,450,240,!0);I.init()}catch(R){d.handleError(R)}else d.handleError({message:mxResources.get("invalidInput")})}]);E=new TextareaDialog(d,mxResources.get("configuration")+":",null!=A?JSON.stringify(JSON.parse(A),null,2):"",function(G){if(null!=G)try{if(null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save()),G==A)d.hideDialog();else{if(0<G.length){var M=JSON.parse(G);
+localStorage.setItem(Editor.configurationKey,JSON.stringify(M))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(H){d.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",E,q.parentNode);d.showDialog(E.container,620,460,!0,!1);E.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,E){var A=mxUtils.bind(this,
+function(G){var M=""==G?mxResources.get("automatic"):mxLanguageMap[G],H=null;""!=M&&(H=q.addItem(M,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),E),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(H,Editor.checkmarkImage));return H});A("");q.addSeparator(E);for(var B in mxLanguageMap)A(B)})));var v=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(q){var E=v.apply(this,arguments);if(null!=E&&"1"!=urlParams.noLangIcon){var A=this.get("language");if(null!=A){A=E.addMenu("",A.funct);A.setAttribute("title",mxResources.get("language"));A.style.width="16px";A.style.paddingTop="2px";A.style.paddingLeft="4px";A.style.zIndex="1";A.style.position="absolute";A.style.display="block";A.style.cursor="pointer";A.style.right="17px";"atlas"==uiTheme?(A.style.top="6px",A.style.right="15px"):A.style.top="min"==uiTheme?"2px":
+"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex="1";A.appendChild(B);mxUtils.setOpacity(A,40);"1"==urlParams.winCtrls&&(A.style.right="95px",A.style.width="19px",A.style.height="19px",A.style.webkitAppRegion="no-drag",B.style.webkitAppRegion=
+"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)A.style.opacity="0.85",A.style.filter="invert(100%)";document.body.appendChild(A);E.langIcon=A}}return E}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var q=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(E){if(0<E.length)try{var A=JSON.parse(E);
+d.executeLayoutList(A);d.customLayoutConfig=A}catch(B){d.handleError(B),null!=window.console&&console.error(B)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,E){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){function A(){"undefined"!==typeof mxOrgChartLayout||d.loadingOrgChart||d.isOffline(!0)?F():d.spinner.spin(document.body,
+mxResources.get("loading"))&&(d.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("js/extensions.min.js",F))}var B=null,G=20,M=20,H=!0,F=function(){d.loadingOrgChart=!1;d.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=B&&H){var n=d.editor.graph,C=new mxOrgChartLayout(n,B,
+G,M),J=n.getDefaultParent();1<n.model.getChildCount(n.getSelectionCell())&&(J=n.getSelectionCell());C.execute(J);H=!1}},I=document.createElement("div"),R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("orgChartType")+": ");I.appendChild(R);var W=document.createElement("select");W.style.width="200px";W.style.boxSizing="border-box";R=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var P=0;P<R.length;P++){var V=document.createElement("option");mxUtils.write(V,R[P]);V.value=P;2==P&&V.setAttribute("selected","selected");W.appendChild(V)}mxEvent.addListener(W,"change",function(){B=W.value});I.appendChild(W);R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,
+mxResources.get("parentChildSpacing")+": ");I.appendChild(R);var U=document.createElement("input");U.type="number";U.value=G;U.style.width="200px";U.style.boxSizing="border-box";I.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("siblingSpacing")+": ");I.appendChild(R);var X=document.createElement("input");X.type="number";X.value=M;X.style.width=
+"200px";X.style.boxSizing="border-box";I.appendChild(X);mxEvent.addListener(X,"change",function(){M=X.value});I=new CustomDialog(d,I,function(){null==B&&(B=2);A()});d.showDialog(I.container,355,140,!0,!0)},E,null,t());q.addSeparator(E);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(u);A.checkOverlap=!0;A.spacing=20;d.executeLayout(function(){A.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}),E);q.addSeparator(E);
+d.menus.addMenuItem(q,"runLayout",E,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,E){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],E);else{var A=q.addItem("Search:",null,null,E,null,null,!1);A.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.marginLeft="8px";mxEvent.addListener(B,
+"keydown",mxUtils.bind(this,function(G){var M=mxUtils.trim(B.value);13==G.keyCode&&0<M.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(M)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:M}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,
+function(G){document.activeElement!=B&&B.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),E),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates",
+"-"],E),this.addMenuItems(q,["forkme","-","about"],E)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),E)}"1"==urlParams.test&&(q.addSeparator(E),this.addSubmenu("testDevelop",q,E))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var q=prompt("Language Code",Graph.diagramLanguage||"");null!=q&&(Graph.diagramLanguage=0<q.length?q:null,u.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,
-function(){if(!u.isSelectionEmpty()){var n=u.cloneCells(u.getSelectionCells()),x=u.getBoundingBoxFromGeometry(n);n=u.moveCells(n,-x.x,-x.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+x.width+", "+x.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(n)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var n=u.getGraphBounds(),x=u.view.translate,K=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",n.x/K-x.x,n.y/K-
-x.y,n.width/K,n.height/K,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(x){if(0<x.length)try{var K=function(J){function E(I){if(null==C[I]){if(C[I]=!0,null!=U[I]){for(;0<U[I].length;){var T=U[I].pop();E(T)}delete U[I]}}else mxLog.debug(H+": Visited: "+I)}var H=J.parentNode.id,S=J.childNodes;J={};
-for(var U={},Q=null,W={},V=0;V<S.length;V++){var X=S[V];if(null!=X.id&&0<X.id.length)if(null==J[X.id]){J[X.id]=X.id;var p=X.getAttribute("parent");null==p?null!=Q?mxLog.debug(H+": Multiple roots: "+X.id):Q=X.id:(null==U[p]&&(U[p]=[]),U[p].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var C={};null==Q?mxLog.debug(H+": No root"):(E(Q),Object.keys(C).length!=Object.keys(J).length&&
-(mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",U)))};"<"!=x.charAt(0)&&(x=Graph.decompress(x),mxLog.debug("See console for uncompressed XML"),console.log("xml",x));var B=mxUtils.parseXml(x),F=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var G=d.getHashValueForPages(F);mxLog.debug("Checksum: ",G)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var N=B.getElementsByTagName("root");for(x=0;x<N.length;x++)K(N[x]);
-mxLog.show()}catch(J){d.handleError(J),null!=window.console&&console.error(J)}});d.showDialog(n.container,620,460,!0,!0);n.init()}));var A=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var n=new TextareaDialog(d,"Diff/Sync:","",function(x){var K=d.getCurrentFile();if(0<x.length&&null!=K)try{var B=JSON.parse(x);K.patch([B],null,!0);d.hideDialog()}catch(F){d.handleError(F)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(x,K){A=d.getPagesForXml(d.getFileData(!0));
-n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)}],["Diff",function(x,K){try{n.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==A?(A=d.getPagesForXml(d.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)):n.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2);d.showDialog(n.container,620,460,!0,!0);n.init()}else d.alert("No pages")}));
-d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var n=d.getCurrentFile();console.log("editorUi",d,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",d.diffPages(n.ownPages,n.theirPages));var x=n.getShadowPages();null!=x&&(console.log("Checksum shadowPages",d.getHashValueForPages(x)),console.log("diff shadowPages/ownPages",
-d.diffPages(x,n.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(n.ownPages,x)),console.log("diff theirPages/shadowPages",d.diffPages(n.theirPages,x)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(n.theirPages,n.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(n.sync.snapshot,
-d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(n.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(n.theirPages,d.pages)))}null!=n&&console.log("Shadow pages",[d.getXmlForPages(n.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var n=d.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&
-(console.log("patching actualPages to shadowPages",n.patch([d.diffPages(n.shadowPages,d.pages)])),n.ownPages=d.clonePages(d.pages),n.theirPages=d.clonePages(d.pages),n.shadowPages=d.clonePages(d.pages),null!=n.sync&&(n.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,u.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,x=u.getGraphBounds(),K=u.view.scale,B=mxUtils.createXmlDocument(),
-F=B.createElement("output");B.appendChild(F);B=new mxXmlCanvas2D(F);B.translate(Math.floor((1-x.x)/K),Math.floor((1-x.y)/K));B.scale(1/K);var G=0,N=B.save;B.save=function(){G++;N.apply(this,arguments)};var J=B.restore;B.restore=function(){G--;J.apply(this,arguments)};var E=n.drawShape;n.drawShape=function(H){mxLog.debug("entering shape",H,G);E.apply(this,arguments);mxLog.debug("leaving shape",H,G)};n.drawState(u.getView().getState(u.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",
-G)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),x)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,
-!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(n){u.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())})).isEnabled=t;d.actions.put("embedHtml",
-new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",n,function(x,K,B,F,G,N,J,E,H,S,U){d.createHtml(x,K,B,F,G,N,J,E,H,S,U,mxUtils.bind(this,function(Q,W){var V=new EmbedDialog(d,Q+"\n"+W,null,null,function(){var X=window.open(),p=X.document;if(null!=p){"CSS1Compat"===document.compatMode&&
-p.writeln("<!DOCTYPE html>");p.writeln("<html>");p.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');p.writeln("<body>");p.writeln(Q);var C=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;C&&p.writeln(W);p.writeln("</body>");p.writeln("</html>");p.close();if(!C){var I=X.document.createElement("div");I.marginLeft="26px";I.marginTop="26px";mxUtils.write(I,mxResources.get("updatingDocument"));C=X.document.createElement("img");
-C.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");C.style.marginLeft="6px";I.appendChild(C);X.document.body.insertBefore(I,X.document.body.firstChild);window.setTimeout(function(){var T=document.createElement("script");T.type="text/javascript";T.src=/<script.*?src="(.*?)"/.exec(W)[1];p.body.appendChild(T);I.parentNode.removeChild(I)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(V.container,450,240,!0,
-!0);V.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(x){d.spinner.stop();null!=x?(x=new EmbedDialog(d,'<img src="'+(n.constructor!=DriveFile?x:"https://drive.google.com/uc?id="+n.getId())+'"/>'),d.showDialog(x.container,450,240,!0,!0),x.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",
-new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(n,x,K,B,F,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(n,x,K,B,F,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(n,
-x,K,B,F,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(n,x,K,B,F,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var n=u.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),
-null,"100%",Math.ceil(n.height/u.view.scale)+2,function(x,K,B,F,G,N,J,E,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(S){d.spinner.stop();var U=[];H&&U.push("tags=%7B%7D");S=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+J+";height:"+E+';" src="'+d.createLink(x,K,B,F,G,N,S,null,U)+'"></iframe>');d.showDialog(S.container,450,240,!0,!0);S.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var n=
-document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var x=document.createElement("a");x.setAttribute("href","javascript:void(0);");x.setAttribute("target","_blank");x.style.cursor="pointer";mxUtils.write(x,mxResources.get("getNotionChromeExtension"));n.appendChild(x);mxEvent.addListener(x,"click",function(K){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(K)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(K,B,F,G,N,J,E,H,S){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var Q=["border=0"];S&&Q.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(K,B,F,G,N,J,U,null,Q,!0));d.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",n)}));d.actions.put("publishLink",new Action(mxResources.get("link")+
-"...",function(){d.showPublishLinkDialog(null,null,null,null,function(n,x,K,B,F,G,N,J,E){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(H){d.spinner.stop();var S=[];E&&S.push("tags=%7B%7D");H=new EmbedDialog(d,d.createLink(n,x,K,B,F,G,H,null,S));d.showDialog(H.container,450,240,!0,!0);H.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});
-d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();n=new GoogleSitesDialog(d,n);d.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=d.actions.addAction("scratchpad",
-function(){d.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});k=d.actions.addAction("search",function(){var n=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!n);isLocalStorage&&(mxSettings.settings.search=!n,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(d.actions.get("save").funct=function(n){u.isEditing()&&u.stopEditing();var x="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var K=d.createLoadMessage("save");K.xml=x;n&&(K.exit=!0);x=JSON.stringify(K)}(window.opener||window.parent).postMessage(x,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));n=d.getCurrentFile();null==n||n.constructor==
-EmbedFile||n.constructor==LocalFile&&null==n.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var n=function(){d.editor.modified=!1;var x="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(x,
-"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,x){d.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],x),d.jpgSupported&&this.addMenuItems(n,["exportJpg"],x)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],x);this.addMenuItems(n,["exportSvg","-"],x);d.isOffline()||d.printPdfExport?this.addMenuItems(n,
-["exportPdf"],x):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],x);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(n,["exportVsdx"],x);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],x);d.isOffline()||(n.addSeparator(x),this.addMenuItem(n,"export",x).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(n,x){function K(G){G.pickFile(function(N){d.spinner.spin(document.body,
-mxResources.get("loading"))&&G.getFile(N,function(J){var E="data:image/"==J.getData().substring(0,11)?F(J.getTitle()):"text/xml";/\.svg$/i.test(J.getTitle())&&!d.editor.isDataSvg(J.getData())&&(J.setData(Editor.createSvgDataUri(J.getData())),E="image/svg+xml");B(J.getData(),E,J.getTitle())},function(J){d.handleError(J,null!=J?mxResources.get("errorLoadingFile"):null)},G==d.drive)},!0)}var B=mxUtils.bind(this,function(G,N,J){var E=u.view,H=u.getGraphBounds(),S=u.snap(Math.ceil(Math.max(0,H.x/E.scale-
-E.translate.x)+4*u.gridSize)),U=u.snap(Math.ceil(Math.max(0,(H.y+H.height)/E.scale-E.translate.y)+4*u.gridSize));"data:image/"==G.substring(0,11)?d.loadImage(G,mxUtils.bind(this,function(Q){var W=!0,V=mxUtils.bind(this,function(){d.resizeImage(Q,G,mxUtils.bind(this,function(X,p,C){X=W?Math.min(1,Math.min(d.maxImageSize/p,d.maxImageSize/C)):1;d.importFile(G,N,S,U,Math.round(p*X),Math.round(C*X),J,function(I){d.spinner.stop();u.setSelectionCells(I);u.scrollCellToVisible(u.getSelectionCell())})}),W)});
-G.length>d.resampleThreshold?d.confirmImageResize(function(X){W=X;V()}):V()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(G,N,S,U,0,0,J,function(Q){d.spinner.stop();u.setSelectionCells(Q);u.scrollCellToVisible(u.getSelectionCell())})}),F=mxUtils.bind(this,function(G){var N="text/xml";/\.png$/i.test(G)?N="image/png":/\.jpe?g$/i.test(G)?N="image/jpg":/\.gif$/i.test(G)?N="image/gif":/\.pdf$/i.test(G)&&(N="application/pdf");return N});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){K(d.drive)},x):D&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){K(d.oneDrive)},x):e&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},x,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){K(d.dropbox)},x):c&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){K(d.gitHub)},x);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){K(d.gitLab)},x);null!=d.trello?n.addItem(mxResources.get("trello")+
-"...",null,function(){K(d.trello)},x):g&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},x);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},x);d.isOffline()||(n.addSeparator(x),n.addItem(mxResources.get("url")+
-"...",null,function(){var G=new FilenameDialog(d,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var J=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(N),function(E){B(E,J,N)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==J)}},mxResources.get("url"));d.showDialog(G.container,300,80,!0,!0);G.init()},x))}))).isEnabled=t;
-this.put("theme",new Menu(mxUtils.bind(this,function(n,x){var K="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=n.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},x);"kennedy"!=K&&"atlas"!=K&&"dark"!=K&&"min"!=K&&"sketch"!=K&&n.addCheckmark(B,Editor.checkmarkImage);n.addSeparator(x);B=n.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},
-x);"kennedy"==K&&n.addCheckmark(B,Editor.checkmarkImage);B=n.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},x);"min"==K&&n.addCheckmark(B,Editor.checkmarkImage);B=n.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},x);"atlas"==K&&n.addCheckmark(B,Editor.checkmarkImage);if("dark"==K||!mxClient.IS_IE&&!mxClient.IS_IE11)B=n.addItem(mxResources.get("dark"),
-null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},x),"dark"==K&&n.addCheckmark(B,Editor.checkmarkImage);n.addSeparator(x);B=n.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},x);"sketch"==K&&n.addCheckmark(B,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();if(null!=n)if(n.constructor==
-LocalFile&&null!=n.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(K,B){n.invalidFileHandle=null;n.fileHandle=K;n.title=B.name;n.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(n.getTitle()));else{var x=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;x=new FilenameDialog(this.editorUi,x,mxResources.get("rename"),mxUtils.bind(this,function(K){null!=K&&0<K.length&&null!=n&&K!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&n.rename(K,
-mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==StorageFile?mxResources.get("diagramName"):null,function(K){if(null!=K&&0<K.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(x.container,340,96,!0,
-!0);x.init()}}));k.isEnabled=function(){return this.enabled&&t.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(null!=n){var x=d.getCopyFilename(n);n.constructor==DriveFile?(x=new CreateDialog(d,x,mxUtils.bind(this,function(K,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),K):("download"==B&&(B=App.MODE_GOOGLE),null!=K&&0<K.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&
-n.saveAs(K,mxUtils.bind(this,function(F){n.desc=F;n.save(!1,mxUtils.bind(this,function(){d.spinner.stop();n.setModified(!1);n.addAllSavedStatus()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),mxUtils.bind(this,function(F){d.handleError(F)})):d.createFile(K,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(x.container,420,380,!0,!0),
-x.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),x)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var x=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var K=0;K<n.desc.parents.length;K++)if(n.desc.parents[K].isRoot){x=!0;break}d.pickFolder(n.getMode(),mxUtils.bind(this,function(B){d.spinner.spin(document.body,mxResources.get("moving"))&&n.move(B,mxUtils.bind(this,
-function(F){d.spinner.stop()}),mxUtils.bind(this,function(F){d.handleError(F)}))}),null,!0,x)}}));this.put("publish",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,["publishLink"],x)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));d.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){d.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
-function(){try{var n=d.getCurrentFile();null!=n&&n.share()}catch(x){d.handleError(x)}}));this.put("embed",new Menu(mxUtils.bind(this,function(n,x){var K=d.getCurrentFile();null==K||K.getMode()!=App.MODE_GOOGLE&&K.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(K.getTitle())||this.addMenuItems(n,["liveImage","-"],x);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],x);navigator.standalone||d.isOffline()||this.addMenuItems(n,["embedIframe"],x);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(n,
-"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),x)})));d.addInsertItem=function(n,x,K,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&n.addItem(K,null,mxUtils.bind(this,function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var F=new ParseDialog(d,K,B);d.showDialog(F.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else F=new CreateGraphDialog(d,K,B),d.showDialog(F.container,620,420,!0,!1);F.init()}),x,null,t())};
-var z=function(n,x,K,B){var F=new mxCell(n,new mxGeometry(0,0,x,K),B);F.vertex=!0;n=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([F],!0));F.geometry.x=n.x;F.geometry.y=n.y;u.getModel().beginUpdate();try{F=u.addCell(F),u.fireEvent(new mxEventObject("cellsInserted","cells",[F]))}finally{u.getModel().endUpdate()}u.scrollCellToVisible(F);u.setSelectionCell(F);u.container.focus();u.editAfterInsert&&u.startEditing(F);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(u.view.getState(F))},
-0);return F};d.actions.put("insertText",new Action(mxResources.get("text"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&u.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=t;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&z("",120,60,
-"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=t;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=t;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=t;d.addInsertMenuItems=
-mxUtils.bind(this,function(n,x,K){for(var B=0;B<K.length;B++)"-"==K[B]?n.addSeparator(x):d.addInsertItem(n,x,mxResources.get(K[B])+"...",K[B])});this.put("insert",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),x);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(n,["insertTemplate"],x);n.addSeparator(x);this.addSubmenu("insertLayout",n,x,mxResources.get("layout"));
-this.addSubmenu("insertAdvanced",n,x,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,x){d.addInsertMenuItems(n,x,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,x){d.addInsertMenuItems(n,x,["fromText","plantUml","mermaid","-","formatSql"]);n.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},x,null,t())})));
-this.put("openRecent",new Menu(function(n,x){var K=d.getRecent();if(null!=K){for(var B=0;B<K.length;B++)(function(F){var G=F.mode;G==App.MODE_GOOGLE?G="googleDrive":G==App.MODE_ONEDRIVE&&(G="oneDrive");n.addItem(F.title+" ("+mxResources.get(G)+")",null,function(){d.loadFile(F.id)},x)})(K[B]);n.addSeparator(x)}n.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},x)}));this.put("openFrom",new Menu(function(n,x){null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},
-x):D&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},x):e&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},
-x):c&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},x);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},x);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},x):g&&"function"===
-typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},x);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},x);d.isOffline()||(n.addSeparator(x),n.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(d,
-"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(B):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));d.showDialog(K.container,300,80,!0,!0);K.init()},x))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(n,x){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},x):D&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},x):e&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},x):c&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
-x);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},x);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},x):g&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+
-"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},x);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},x)})),this.put("openLibraryFrom",new Menu(function(n,x){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},x):D&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},x):e&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},x):c&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},x,null,!1);n.addSeparator(x);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},x);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},x);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},x):g&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},x,null,!1);n.addSeparator(x);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},x);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},x);d.isOffline()||(n.addSeparator(x),n.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(d,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&d.spinner.spin(document.body,
-mxResources.get("loading"))){var F=B;d.editor.isCorsEnabledForUrl(B)||(F=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(F,function(G){if(200<=G.getStatus()&&299>=G.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,G.getText(),B))}catch(N){d.handleError(N,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
-d.showDialog(K.container,300,80,!0,!0);K.init()},x));"1"==urlParams.confLib&&(n.addSeparator(x),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},x))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-k=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));k=this.get("viewPanels");var L=k.funct;k.funct=
-function(n,x){L.apply(this,arguments);d.menus.addMenuItems(n,["tags"],x);d.commentsSupported()&&d.menus.addMenuItems(n,["comments"],x)};this.put("view",new Menu(mxUtils.bind(this,function(n,x){this.addMenuItems(n,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],x);if(isLocalStorage||mxClient.IS_CHROMEAPP){var K=this.addMenuItem(n,"scratchpad",x);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(n,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",n,x);this.addMenuItems(n,"- scrollbars tooltips ruler - grid guides".split(" "),x);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(n,"shadowVisible",x);this.addMenuItems(n,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),x);"1"!=urlParams.sketch&&this.addMenuItems(n,
-["-","fullscreen"],x)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;k=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();M=!M;d.alert(mxResources.get("restartForChangeRequired"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return M});d.actions.addAction("openDevTools",function(){d.openDevTools()})}this.put("extras",new Menu(mxUtils.bind(this,function(n,x){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",n,x),n.addSeparator(x));"1"!=urlParams.embed&&
-(this.addSubmenu("theme",n,x),n.addSeparator(x));if("undefined"!==typeof MathJax){var K=this.addMenuItem(n,"mathematicalTypesetting",x);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(n,["spellCheck"],x);this.addMenuItems(n,["copyConnect","collapseExpand","-"],x);"1"!=urlParams.embed&&(K=d.getCurrentFile(),null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(n,
-["showRemoteCursors","shareCursor"],x),this.addMenuItems(n,["autosave"],x));n.addSeparator(x);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,"plugins",x);this.addMenuItems(n,["-","editDiagram"],x);Graph.translateDiagram&&this.addMenuItems(n,["diagramLanguage"]);n.addSeparator(x);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],x);this.addMenuItems(n,["configuration"],x);EditorUi.isElectronApp&&this.addMenuItems(n,["openDevTools"],x);n.addSeparator(x);
-"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function B(G){return{id:G.id,isExt:!0,url:G.downloadUrl,title:G.title,imgUrl:G.thumbnailLink,changedBy:G.lastModifyingUserName,lastModifiedOn:G.modifiedDate}}var F=new TemplatesDialog(d,function(G){console.log(arguments)},null,null,null,"user",function(G,N,J){var E=new Date;E.setDate(E.getDate()-7);d.drive.listFiles(null,E,J?!0:!1,function(H){for(var S=[],U=0;U<H.items.length;U++)S.push(B(H.items[U]));G(S)},N)},function(G,N,J,
-E){d.drive.listFiles(G,null,E?!0:!1,function(H){for(var S=[],U=0;U<H.items.length;U++)S.push(B(H.items[U]));N(S)},J)},function(G,N,J){d.drive.getFile(G.id,function(E){N(E.data)},J)},null,function(G){G({Test:[]},1)},!0,!1);d.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(n,"templates",x))})));this.put("file",new Menu(mxUtils.bind(this,function(n,x){if("1"==urlParams.embed)this.addSubmenu("importFrom",n,x),this.addSubmenu("exportAs",n,x),this.addSubmenu("embed",
-n,x),"1"==urlParams.libraries&&(this.addMenuItems(n,["-"],x),this.addSubmenu("newLibrary",n,x),this.addSubmenu("openLibraryFrom",n,x)),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],x),this.addMenuItems(n,["-","pageSetup","print","-","rename"],x),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],x):(this.addMenuItems(n,["save"],x),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],x))),"1"!=
-urlParams.noExitBtn&&this.addMenuItems(n,["exit"],x);else{var K=this.editorUi.getCurrentFile();if(null!=K&&K.constructor==DriveFile){K.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],x);this.addMenuItems(n,["save","-","share"],x);var B=this.addMenuItem(n,"synchronize",x);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize");n.addSeparator(x)}else this.addMenuItems(n,["new"],x);this.addSubmenu("openFrom",
-n,x);isLocalStorage&&this.addSubmenu("openRecent",n,x);null!=K&&K.constructor==DriveFile?this.addMenuItems(n,["new","-","rename","makeCopy","moveToFolder"],x):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==K||K.constructor==LocalFile&&null==K.fileHandle||(n.addSeparator(x),B=this.addMenuItem(n,"synchronize",x),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(n,["-","save","saveAs","-"],x),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==K||this.addMenuItems(n,["share","-"],x),this.addMenuItems(n,["rename"],x),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],x):(this.addMenuItems(n,["makeCopy"],x),null!=K&&K.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],x)));n.addSeparator(x);this.addSubmenu("importFrom",n,x);this.addSubmenu("exportAs",n,x);n.addSeparator(x);
-this.addSubmenu("embed",n,x);this.addSubmenu("publish",n,x);n.addSeparator(x);this.addSubmenu("newLibrary",n,x);this.addSubmenu("openLibraryFrom",n,x);d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],x);null!=K&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=K.getTitle()?K.getTitle():d.defaultFilename,(K.constructor==DriveFile&&null!=K.sync&&K.sync.isConnected()||!/(\.html)$/i.test(B)&&!/(\.svg)$/i.test(B))&&this.addMenuItems(n,["-","properties"]));this.addMenuItems(n,
-["-","pageSetup"],x);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],x);this.addMenuItems(n,["-","close"])}})));l.prototype.execute=function(){var n=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var x=n.extFonts,K=0;null!=x&&K<x.length;K++){var B=document.getElementById("extFont_"+x[K].name);
-null!=B&&B.parentNode.removeChild(B)}n.extFonts=[];for(K=0;null!=this.previousExtFonts&&K<this.previousExtFonts.length;K++)this.ui.editor.graph.addExtFont(this.previousExtFonts[K].name,this.previousExtFonts[K].url);this.previousExtFonts=x};this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,x){for(var K=mxUtils.bind(this,function(U,Q,W,V,X){var p=d.editor.graph;V=this.styleChange(n,V||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[U,null!=Q?encodeURIComponent(Q):null,null]:[U],null,x,function(){"1"!=urlParams["ext-fonts"]?p.setFont(U,Q):(document.execCommand("fontname",!1,U),p.addExtFont(U,Q));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=Q?encodeURIComponent(Q):null,null]:[U],"cells",[p.cellEditor.getEditingCell()]))},function(){p.updateLabelElements(p.getSelectionCells(),
-function(C){C.removeAttribute("face");C.style.fontFamily=null;"PRE"==C.nodeName&&p.replaceElement(C,"div")});"1"==urlParams["ext-fonts"]&&p.addExtFont(U,Q)});W&&(W=document.createElement("span"),W.className="geSprite geSprite-delete",W.style.cursor="pointer",W.style.display="inline-block",V.firstChild.nextSibling.nextSibling.appendChild(W),mxEvent.addListener(W,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(C){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[U.toLowerCase()];
-for(var I=0;I<this.customFonts.length;I++)if(this.customFonts[I].name==U&&this.customFonts[I].url==Q){this.customFonts.splice(I,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var T=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=T&&0<T.length)for(I=0;I<T.length;I++)if(T[I].name==U){T.splice(I,1);break}var P=mxUtils.clone(this.customFonts);for(I=0;I<P.length;I++)if(P[I].name==U){P.splice(I,1);break}I=new l(this.editorUi,T,P);this.editorUi.editor.graph.model.execute(I)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(C)})));Graph.addFont(U,Q);V.firstChild.nextSibling.style.fontFamily=U;null!=X&&V.setAttribute("title",X)}),B={},F=0;F<this.defaultFonts.length;F++){var G=this.defaultFonts[F];"string"===typeof G?K(G):null!=G.fontFamily&&null!=G.fontUrl&&(B[encodeURIComponent(G.fontFamily)+"@"+encodeURIComponent(G.fontUrl)]=!0,K(G.fontFamily,G.fontUrl))}n.addSeparator(x);if("1"!=urlParams["ext-fonts"]){G=function(U){var Q=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!B[Q]){for(var W=
-U.name,V=0;null!=J[W.toLowerCase()];)W=U.name+" ("+ ++V+")";null==N[Q]&&(E.push({name:U.name,url:U.url,label:W,title:U.url}),J[W.toLowerCase()]=U,N[Q]=U)}};var N={},J={},E=[];for(F=0;F<this.customFonts.length;F++)G(this.customFonts[F]);for(var H in Graph.recentCustomFonts)G(Graph.recentCustomFonts[H]);E.sort(function(U,Q){return U.label<Q.label?-1:U.label>Q.label?1:0});if(0<E.length){for(F=0;F<E.length;F++)K(E[F].name,E[F].url,!0,E[F].label,E[F].url);n.addSeparator(x)}n.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),x);n.addSeparator(x)}else{H=this.editorUi.editor.graph.extFonts;if(null!=H&&0<H.length){G={};var S=!1;for(F=0;F<this.customFonts.length;F++)G[this.customFonts[F].name]=!0;for(F=0;F<H.length;F++)G[H[F].name]||(this.customFonts.push(H[F]),S=!0);S&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(F=
-0;F<this.customFonts.length;F++)H=this.customFonts[F].name,G=this.customFonts[F].url,K(H,G,!0),this.editorUi.editor.graph.addExtFont(H,G,!0);n.addSeparator(x);n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new l(this.editorUi,[],[]);d.editor.graph.model.execute(U)}),x);n.addSeparator(x)}}n.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,Q=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],W=
-"s",V=null;if("1"!=urlParams["ext-fonts"]&&U.isEditing()){var X=U.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&(Q=Graph.stripQuotes(X.fontFamily),V=Graph.getFontUrl(Q,null),null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,W="g"):W="w")))}else X=U.getView().getState(U.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,"1"!=urlParams["ext-fonts"]?(X=X.style.fontSource,null!=X&&(X=decodeURIComponent(X),Graph.isGoogleFontUrl(X)?W="g":(W="w",V=X))):(W=X.style.FType||
-W,"w"==W&&(V=this.editorUi.editor.graph.extFonts,X=null,null!=V&&(X=V.find(function(C){return C.name==Q})),V=null!=X?X.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var p=null;document.activeElement==U.cellEditor.textarea&&(p=U.cellEditor.saveSelection());W=new FontDialog(this.editorUi,Q,V,W,mxUtils.bind(this,function(C,I,T){null!=p&&(U.cellEditor.restoreSelection(p),p=null);
-if(null!=C&&0<C.length)if("1"!=urlParams["ext-fonts"]&&U.isEditing())U.setFont(C,I);else{U.getModel().beginUpdate();try{U.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,C),U.setCellStyles("fontSource",null!=I?encodeURIComponent(I):null),U.setCellStyles("FType",null)):(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,C),"s"!=T&&(U.setCellStyles("FType",T),0==I.indexOf("http://")&&(I=PROXY_URL+"?url="+encodeURIComponent(I)),this.editorUi.editor.graph.addExtFont(C,
-I)));T=!0;for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==C){T=!1;break}T&&(this.customFonts.push({name:C,url:I}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),x,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+function(){if(!u.isSelectionEmpty()){var q=u.cloneCells(u.getSelectionCells()),E=u.getBoundingBoxFromGeometry(q);q=u.moveCells(q,-E.x,-E.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+E.width+", "+E.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=u.getGraphBounds(),E=u.view.translate,A=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",q.x/A-E.x,q.y/A-
+E.y,q.width/A,q.height/A,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(E){if(0<E.length)try{var A=function(F){function I(T){if(null==J[T]){if(J[T]=!0,null!=P[T]){for(;0<P[T].length;){var Q=P[T].pop();I(Q)}delete P[T]}}else mxLog.debug(R+": Visited: "+T)}var R=F.parentNode.id,W=F.childNodes;F={};
+for(var P={},V=null,U={},X=0;X<W.length;X++){var n=W[X];if(null!=n.id&&0<n.id.length)if(null==F[n.id]){F[n.id]=n.id;var C=n.getAttribute("parent");null==C?null!=V?mxLog.debug(R+": Multiple roots: "+n.id):V=n.id:(null==P[C]&&(P[C]=[]),P[C].push(n.id))}else U[n.id]=n.id}W=Object.keys(U);0<W.length?(W=R+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var J={};null==V?mxLog.debug(R+": No root"):(I(V),Object.keys(J).length!=Object.keys(F).length&&
+(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",P)))};"<"!=E.charAt(0)&&(E=Graph.decompress(E),mxLog.debug("See console for uncompressed XML"),console.log("xml",E));var B=mxUtils.parseXml(E),G=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var M=d.getHashValueForPages(G);mxLog.debug("Checksum: ",M)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var H=B.getElementsByTagName("root");for(E=0;E<H.length;E++)A(H[E]);
+mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(E){var A=d.getCurrentFile();if(0<E.length&&null!=A)try{var B=JSON.parse(E);A.patch([B],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(E,A){z=d.getPagesForXml(d.getFileData(!0));
+q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(E,A){try{q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)):q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));
+d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",d.diffPages(q.ownPages,q.theirPages));var E=q.getShadowPages();null!=E&&(console.log("Checksum shadowPages",d.getHashValueForPages(E)),console.log("diff shadowPages/ownPages",
+d.diffPages(E,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,E)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,E)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,
+d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&
+(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,u.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,E=u.getGraphBounds(),A=u.view.scale,B=mxUtils.createXmlDocument(),
+G=B.createElement("output");B.appendChild(G);B=new mxXmlCanvas2D(G);B.translate(Math.floor((1-E.x)/A),Math.floor((1-E.y)/A));B.scale(1/A);var M=0,H=B.save;B.save=function(){M++;H.apply(this,arguments)};var F=B.restore;B.restore=function(){M--;F.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(R){mxLog.debug("entering shape",R,M);I.apply(this,arguments);mxLog.debug("leaving shape",R,M)};q.drawState(u.getView().getState(u.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",
+M)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),E)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,
+!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){u.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=t;d.actions.put("embedHtml",
+new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",q,function(E,A,B,G,M,H,F,I,R,W,P){d.createHtml(E,A,B,G,M,H,F,I,R,W,P,mxUtils.bind(this,function(V,U){var X=new EmbedDialog(d,V+"\n"+U,null,null,function(){var n=window.open(),C=n.document;if(null!=C){"CSS1Compat"===document.compatMode&&
+C.writeln("<!DOCTYPE html>");C.writeln("<html>");C.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');C.writeln("<body>");C.writeln(V);var J=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;J&&C.writeln(U);C.writeln("</body>");C.writeln("</html>");C.close();if(!J){var T=n.document.createElement("div");T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));J=n.document.createElement("img");
+J.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");J.style.marginLeft="6px";T.appendChild(J);n.document.body.insertBefore(T,n.document.body.firstChild);window.setTimeout(function(){var Q=document.createElement("script");Q.type="text/javascript";Q.src=/<script.*?src="(.*?)"/.exec(U)[1];C.body.appendChild(Q);T.parentNode.removeChild(T)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,
+!0);X.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(E){d.spinner.stop();null!=E?(E=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?E:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(E.container,450,240,!0,!0),E.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",
+new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,E,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,E,A,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(q,
+E,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,E,A,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var q=u.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),
+null,"100%",Math.ceil(q.height/u.view.scale)+2,function(E,A,B,G,M,H,F,I,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var P=[];R&&P.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+I+';" src="'+d.createLink(E,A,B,G,M,H,W,null,P)+'"></iframe>');d.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=
+document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var E=document.createElement("a");E.setAttribute("href","javascript:void(0);");E.setAttribute("target","_blank");E.style.cursor="pointer";mxUtils.write(E,mxResources.get("getNotionChromeExtension"));q.appendChild(E);mxEvent.addListener(E,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(A)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(A,B,G,M,H,F,I,R,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(P){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");P=new EmbedDialog(d,d.createLink(A,B,G,M,H,F,P,null,V,!0));d.showDialog(P.container,450,240,!0,!0);P.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",q)}));d.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(q,E,A,B,G,M,H,F,I){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var W=[];I&&W.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(q,E,A,B,G,M,R,null,W));d.showDialog(R.container,450,240,!0,!0);R.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});
+d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();q=new GoogleSitesDialog(d,q);d.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=d.actions.addAction("scratchpad",
+function(){d.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});k=d.actions.addAction("search",function(){var q=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!q);isLocalStorage&&(mxSettings.settings.search=!q,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(d.actions.get("save").funct=function(q){u.isEditing()&&u.stopEditing();var E="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var A=d.createLoadMessage("save");A.xml=E;q&&(A.exit=!0);E=JSON.stringify(A)}(window.opener||window.parent).postMessage(E,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));q=d.getCurrentFile();null==q||q.constructor==
+EmbedFile||q.constructor==LocalFile&&null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var q=function(){d.editor.modified=!1;var E="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(E,
+"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,E){d.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],E),d.jpgSupported&&this.addMenuItems(q,["exportJpg"],E)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],E);this.addMenuItems(q,["exportSvg","-"],E);d.isOffline()||d.printPdfExport?this.addMenuItems(q,
+["exportPdf"],E):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],E);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],E);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],E);d.isOffline()||(q.addSeparator(E),this.addMenuItem(q,"export",E).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,E){function A(M){M.pickFile(function(H){d.spinner.spin(document.body,
+mxResources.get("loading"))&&M.getFile(H,function(F){var I="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),I="image/svg+xml");B(F.getData(),I,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},M==d.drive)},!0)}var B=mxUtils.bind(this,function(M,H,F){var I=u.view,R=u.getGraphBounds(),W=u.snap(Math.ceil(Math.max(0,R.x/I.scale-
+I.translate.x)+4*u.gridSize)),P=u.snap(Math.ceil(Math.max(0,(R.y+R.height)/I.scale-I.translate.y)+4*u.gridSize));"data:image/"==M.substring(0,11)?d.loadImage(M,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){d.resizeImage(V,M,mxUtils.bind(this,function(n,C,J){n=U?Math.min(1,Math.min(d.maxImageSize/C,d.maxImageSize/J)):1;d.importFile(M,H,W,P,Math.round(C*n),Math.round(J*n),F,function(T){d.spinner.stop();u.setSelectionCells(T);u.scrollCellToVisible(u.getSelectionCell())})}),U)});
+M.length>d.resampleThreshold?d.confirmImageResize(function(n){U=n;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(M,H,W,P,0,0,F,function(V){d.spinner.stop();u.setSelectionCells(V);u.scrollCellToVisible(u.getSelectionCell())})}),G=mxUtils.bind(this,function(M){var H="text/xml";/\.png$/i.test(M)?H="image/png":/\.jpe?g$/i.test(M)?H="image/jpg":/\.gif$/i.test(M)?H="image/gif":/\.pdf$/i.test(M)&&(H="application/pdf");return H});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},E):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},E):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},E,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},E):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},E);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},E);null!=d.trello?q.addItem(mxResources.get("trello")+
+"...",null,function(){A(d.trello)},E):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},E);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},E);d.isOffline()||(q.addSeparator(E),q.addItem(mxResources.get("url")+
+"...",null,function(){var M=new FilenameDialog(d,"",mxResources.get("import"),function(H){if(null!=H&&0<H.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(H)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H),function(I){B(I,F,H)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(M.container,300,80,!0,!0);M.init()},E))}))).isEnabled=t;
+this.put("theme",new Menu(mxUtils.bind(this,function(q,E){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},E);"kennedy"!=A&&"atlas"!=A&&"dark"!=A&&"min"!=A&&"sketch"!=A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(E);B=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},
+E);"kennedy"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},E);"min"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},E);"atlas"==A&&q.addCheckmark(B,Editor.checkmarkImage);if("dark"==A||!mxClient.IS_IE&&!mxClient.IS_IE11)B=q.addItem(mxResources.get("dark"),
+null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},E),"dark"==A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(E);B=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},E);"sketch"==A&&q.addCheckmark(B,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==
+LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,B){q.invalidFileHandle=null;q.fileHandle=A;q.title=B.name;q.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var E=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;E=new FilenameDialog(this.editorUi,E,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=q&&A!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(A,
+mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(E.container,340,96,!0,
+!0);E.init()}}));k.isEnabled=function(){return this.enabled&&t.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var E=d.getCopyFilename(q);q.constructor==DriveFile?(E=new CreateDialog(d,E,mxUtils.bind(this,function(A,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),A):("download"==B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&
+q.saveAs(A,mxUtils.bind(this,function(G){q.desc=G;q.save(!1,mxUtils.bind(this,function(){d.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),mxUtils.bind(this,function(G){d.handleError(G)})):d.createFile(A,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(E.container,420,380,!0,!0),
+E.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),E)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var E=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var A=0;A<q.desc.parents.length;A++)if(q.desc.parents[A].isRoot){E=!0;break}d.pickFolder(q.getMode(),mxUtils.bind(this,function(B){d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(B,mxUtils.bind(this,
+function(G){d.spinner.stop()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),null,!0,E)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,["publishLink"],E)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));d.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){d.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
+function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(E){d.handleError(E)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,E){var A=d.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(q,["liveImage","-"],E);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],E);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],E);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,
+"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),E)})));d.addInsertItem=function(q,E,A,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&q.addItem(A,null,mxUtils.bind(this,function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var G=new ParseDialog(d,A,B);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(d,A,B),d.showDialog(G.container,620,420,!0,!1);G.init()}),E,null,t())};
+var y=function(q,E,A,B){var G=new mxCell(q,new mxGeometry(0,0,E,A),B);G.vertex=!0;q=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([G],!0));G.geometry.x=q.x;G.geometry.y=q.y;u.getModel().beginUpdate();try{G=u.addCell(G),u.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{u.getModel().endUpdate()}u.scrollCellToVisible(G);u.setSelectionCell(G);u.container.focus();u.editAfterInsert&&u.startEditing(G);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(u.view.getState(G))},
+0);return G};d.actions.put("insertText",new Action(mxResources.get("text"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&u.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=t;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&y("",120,60,
+"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=t;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=t;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=t;d.addInsertMenuItems=
+mxUtils.bind(this,function(q,E,A){for(var B=0;B<A.length;B++)"-"==A[B]?q.addSeparator(E):d.addInsertItem(q,E,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),E);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],E);q.addSeparator(E);this.addSubmenu("insertLayout",q,E,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",q,E,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,E){d.addInsertMenuItems(q,E,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,E){d.addInsertMenuItems(q,E,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},E,null,t())})));
+this.put("openRecent",new Menu(function(q,E){var A=d.getRecent();if(null!=A){for(var B=0;B<A.length;B++)(function(G){var M=G.mode;M==App.MODE_GOOGLE?M="googleDrive":M==App.MODE_ONEDRIVE&&(M="oneDrive");q.addItem(G.title+" ("+mxResources.get(M)+")",null,function(){d.loadFile(G.id)},E)})(A[B]);q.addSeparator(E)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},E)}));this.put("openFrom",new Menu(function(q,E){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},
+E):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},E):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},
+E):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},E);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},E);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},E):g&&"function"===
+typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},E);d.isOffline()||(q.addSeparator(E),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,
+"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(B):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));d.showDialog(A.container,300,80,!0,!0);A.init()},E))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},E):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},E):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},E):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+E);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},E);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},E):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+
+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},E)})),this.put("openLibraryFrom",new Menu(function(q,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},E):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},E):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},E):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);q.addSeparator(E);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},E);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},E);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},E):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},E,null,!1);q.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},E);d.isOffline()||(q.addSeparator(E),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&d.spinner.spin(document.body,
+mxResources.get("loading"))){var G=B;d.editor.isCorsEnabledForUrl(B)||(G=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(G,function(M){if(200<=M.getStatus()&&299>=M.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,M.getText(),B))}catch(H){d.handleError(H,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
+d.showDialog(A.container,300,80,!0,!0);A.init()},E));"1"==urlParams.confLib&&(q.addSeparator(E),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},E))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+k=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));k=this.get("viewPanels");var L=k.funct;k.funct=
+function(q,E){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],E);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],E)};this.put("view",new Menu(mxUtils.bind(this,function(q,E){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],E);if(isLocalStorage||mxClient.IS_CHROMEAPP){var A=this.addMenuItem(q,"scratchpad",E);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(q,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",q,E);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),E);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",E);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),E);"1"!=urlParams.sketch&&this.addMenuItems(q,
+["-","fullscreen"],E)})));if(EditorUi.isElectronApp){var N="1"==urlParams.enableSpellCheck;k=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();N=!N;d.alert(mxResources.get("restartForChangeRequired"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return N});var K="1"==urlParams.enableStoreBkp;k=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();K=!K});k.setToggleAction(!0);k.setSelectedCallback(function(){return K});d.actions.addAction("openDevTools",function(){d.openDevTools()})}this.put("extras",
+new Menu(mxUtils.bind(this,function(q,E){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",q,E),q.addSeparator(E));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,E),q.addSeparator(E));if("undefined"!==typeof MathJax){var A=this.addMenuItem(q,"mathematicalTypesetting",E);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(q,["spellCheck","autoBkp"],E);this.addMenuItems(q,
+["copyConnect","collapseExpand","-"],E);"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],E),this.addMenuItems(q,["autosave"],E));q.addSeparator(E);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",E);this.addMenuItems(q,["-","editDiagram"],E);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(E);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&
+this.addMenuItems(q,["showStartScreen"],E);this.addMenuItems(q,["configuration"],E);EditorUi.isElectronApp&&this.addMenuItems(q,["openDevTools"],E);q.addSeparator(E);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function B(M){return{id:M.id,isExt:!0,url:M.downloadUrl,title:M.title,imgUrl:M.thumbnailLink,changedBy:M.lastModifyingUserName,lastModifiedOn:M.modifiedDate}}var G=new TemplatesDialog(d,function(M){console.log(arguments)},null,null,null,"user",function(M,H,F){var I=
+new Date;I.setDate(I.getDate()-7);d.drive.listFiles(null,I,F?!0:!1,function(R){for(var W=[],P=0;P<R.items.length;P++)W.push(B(R.items[P]));M(W)},H)},function(M,H,F,I){d.drive.listFiles(M,null,I?!0:!1,function(R){for(var W=[],P=0;P<R.items.length;P++)W.push(B(R.items[P]));H(W)},F)},function(M,H,F){d.drive.getFile(M.id,function(I){H(I.data)},F)},null,function(M){M({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(q,"templates",E))})));
+this.put("file",new Menu(mxUtils.bind(this,function(q,E){if("1"==urlParams.embed)this.addSubmenu("importFrom",q,E),this.addSubmenu("exportAs",q,E),this.addSubmenu("embed",q,E),"1"==urlParams.libraries&&(this.addMenuItems(q,["-"],E),this.addSubmenu("newLibrary",q,E),this.addSubmenu("openLibraryFrom",q,E)),d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],E),this.addMenuItems(q,["-","pageSetup","print","-","rename"],E),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?
+"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],E):(this.addMenuItems(q,["save"],E),"1"==urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],E))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],E);else{var A=this.editorUi.getCurrentFile();if(null!=A&&A.constructor==DriveFile){A.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],E);this.addMenuItems(q,["save","-","share"],E);var B=this.addMenuItem(q,"synchronize",E);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(E)}else this.addMenuItems(q,["new"],E);this.addSubmenu("openFrom",q,E);isLocalStorage&&this.addSubmenu("openRecent",q,E);null!=A&&A.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],E):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(q.addSeparator(E),B=this.addMenuItem(q,"synchronize",E),(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],E),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(q,["share","-"],E),this.addMenuItems(q,["rename"],E),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],E):(this.addMenuItems(q,["makeCopy"],E),null!=A&&A.constructor==OneDriveFile&&
+this.addMenuItems(q,["moveToFolder"],E)));q.addSeparator(E);this.addSubmenu("importFrom",q,E);this.addSubmenu("exportAs",q,E);q.addSeparator(E);this.addSubmenu("embed",q,E);this.addSubmenu("publish",q,E);q.addSeparator(E);this.addSubmenu("newLibrary",q,E);this.addSubmenu("openLibraryFrom",q,E);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],E);null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&
+null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B)&&!/(\.svg)$/i.test(B))&&this.addMenuItems(q,["-","properties"]));this.addMenuItems(q,["-","pageSetup"],E);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],E);this.addMenuItems(q,["-","close"])}})));l.prototype.execute=function(){var q=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));
+this.extFonts=this.previousExtFonts;for(var E=q.extFonts,A=0;null!=E&&A<E.length;A++){var B=document.getElementById("extFont_"+E[A].name);null!=B&&B.parentNode.removeChild(B)}q.extFonts=[];for(A=0;null!=this.previousExtFonts&&A<this.previousExtFonts.length;A++)this.ui.editor.graph.addExtFont(this.previousExtFonts[A].name,this.previousExtFonts[A].url);this.previousExtFonts=E};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,E){for(var A=mxUtils.bind(this,function(P,V,U,X,n){var C=d.editor.graph;
+X=this.styleChange(q,X||P,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[P,null!=V?encodeURIComponent(V):null,null]:[P],null,E,function(){"1"!=urlParams["ext-fonts"]?C.setFont(P,V):(document.execCommand("fontname",!1,P),C.addExtFont(P,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values",
+"1"!=urlParams["ext-fonts"]?[P,null!=V?encodeURIComponent(V):null,null]:[P],"cells",[C.cellEditor.getEditingCell()]))},function(){C.updateLabelElements(C.getSelectionCells(),function(J){J.removeAttribute("face");J.style.fontFamily=null;"PRE"==J.nodeName&&C.replaceElement(J,"div")});"1"==urlParams["ext-fonts"]&&C.addExtFont(P,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),
+mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(J){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[P.toLowerCase()];for(var T=0;T<this.customFonts.length;T++)if(this.customFonts[T].name==P&&this.customFonts[T].url==V){this.customFonts.splice(T,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Q=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Q&&0<Q.length)for(T=0;T<Q.length;T++)if(Q[T].name==P){Q.splice(T,
+1);break}var O=mxUtils.clone(this.customFonts);for(T=0;T<O.length;T++)if(O[T].name==P){O.splice(T,1);break}T=new l(this.editorUi,Q,O);this.editorUi.editor.graph.model.execute(T)}this.editorUi.hideCurrentMenu();mxEvent.consume(J)})));Graph.addFont(P,V);X.firstChild.nextSibling.style.fontFamily=P;null!=n&&X.setAttribute("title",n)}),B={},G=0;G<this.defaultFonts.length;G++){var M=this.defaultFonts[G];"string"===typeof M?A(M):null!=M.fontFamily&&null!=M.fontUrl&&(B[encodeURIComponent(M.fontFamily)+"@"+
+encodeURIComponent(M.fontUrl)]=!0,A(M.fontFamily,M.fontUrl))}q.addSeparator(E);if("1"!=urlParams["ext-fonts"]){M=function(P){var V=encodeURIComponent(P.name)+(null==P.url?"":"@"+encodeURIComponent(P.url));if(!B[V]){for(var U=P.name,X=0;null!=F[U.toLowerCase()];)U=P.name+" ("+ ++X+")";null==H[V]&&(I.push({name:P.name,url:P.url,label:U,title:P.url}),F[U.toLowerCase()]=P,H[V]=P)}};var H={},F={},I=[];for(G=0;G<this.customFonts.length;G++)M(this.customFonts[G]);for(var R in Graph.recentCustomFonts)M(Graph.recentCustomFonts[R]);
+I.sort(function(P,V){return P.label<V.label?-1:P.label>V.label?1:0});if(0<I.length){for(G=0;G<I.length;G++)A(I[G].name,I[G].url,!0,I[G].label,I[G].url);q.addSeparator(E)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),E);q.addSeparator(E)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){M={};var W=!1;for(G=0;G<this.customFonts.length;G++)M[this.customFonts[G].name]=
+!0;for(G=0;G<R.length;G++)M[R[G].name]||(this.customFonts.push(R[G]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=0;G<this.customFonts.length;G++)R=this.customFonts[G].name,M=this.customFonts[G].url,A(R,M,!0),this.editorUi.editor.graph.addExtFont(R,M,!0);q.addSeparator(E);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var P=new l(this.editorUi,[],[]);d.editor.graph.model.execute(P)}),
+E);q.addSeparator(E)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var P=this.editorUi.editor.graph,V=P.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",X=null;if("1"!=urlParams["ext-fonts"]&&P.isEditing()){var n=P.getSelectedEditingElement();null!=n&&(n=mxUtils.getCurrentStyle(n),null!=n&&(V=Graph.stripQuotes(n.fontFamily),X=Graph.getFontUrl(V,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else n=P.getView().getState(P.getSelectionCell()),
+null!=n&&(V=n.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(n=n.style.fontSource,null!=n&&(n=decodeURIComponent(n),Graph.isGoogleFontUrl(n)?U="g":(U="w",X=n))):(U=n.style.FType||U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,n=null,null!=X&&(n=X.find(function(J){return J.name==V})),X=null!=n?n.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var C=null;
+document.activeElement==P.cellEditor.textarea&&(C=P.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(J,T,Q){null!=C&&(P.cellEditor.restoreSelection(C),C=null);if(null!=J&&0<J.length)if("1"!=urlParams["ext-fonts"]&&P.isEditing())P.setFont(J,T);else{P.getModel().beginUpdate();try{P.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(P.setCellStyles(mxConstants.STYLE_FONTFAMILY,J),P.setCellStyles("fontSource",null!=T?encodeURIComponent(T):null),P.setCellStyles("FType",
+null)):(P.setCellStyles(mxConstants.STYLE_FONTFAMILY,J),"s"!=Q&&(P.setCellStyles("FType",Q),0==T.indexOf("http://")&&(T=PROXY_URL+"?url="+encodeURIComponent(T)),this.editorUi.editor.graph.addExtFont(J,T)));Q=!0;for(var O=0;O<this.customFonts.length;O++)if(this.customFonts[O].name==J){Q=!1;break}Q&&(this.customFonts.push({name:J,url:T}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{P.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,
+380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),E,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,f,l){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=l&&(f.viewState=l,this.neverShown=!1))}
@@ -12700,8 +12702,8 @@ EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.s
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(l){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(l))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(l){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(l)})));return f};
EditorUi.prototype.createControlTab=function(b,f,l){l=this.createTab(null!=l?l:!0);l.style.lineHeight=this.tabContainerHeight+"px";l.style.paddingTop=b+"px";l.style.cursor="pointer";l.style.width="30px";l.innerHTML=f;null!=l.firstChild&&null!=l.firstChild.style&&mxUtils.setOpacity(l.firstChild,40);return l};
EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var l=b.getElementsByTagName("div")[0];l.style.display="inline-block";l.style.marginTop="5px";l.style.width="21px";l.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var u=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(y){var A=c.addItem(this.pages[y].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[y])}),e),z=this.pages[y].getId();A.setAttribute("title",this.pages[y].getName()+" ("+(y+1)+"/"+this.pages.length+")"+(null!=z?" ["+z+"]":""));this.pages[y]==this.currentPage&&c.addCheckmark(A,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,function(){c.addItem(mxResources.get("insertPage"),
-null,mxUtils.bind(this,function(){this.insertPage()}),e)});f||g();if(this.editor.graph.isEnabled()){f||(c.addSeparator(e),k());var m=this.currentPage;if(null!=m){c.addSeparator(e);var q=m.getName();c.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(m)}),e);c.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(m,m.getName())}),e);f||c.addSeparator(e);c.addItem(mxResources.get("duplicateIt",[q]),null,mxUtils.bind(this,function(){this.duplicatePage(m,
+var u=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var z=c.addItem(this.pages[x].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),y=this.pages[x].getId();z.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(z,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,function(){c.addItem(mxResources.get("insertPage"),
+null,mxUtils.bind(this,function(){this.insertPage()}),e)});f||g();if(this.editor.graph.isEnabled()){f||(c.addSeparator(e),k());var m=this.currentPage;if(null!=m){c.addSeparator(e);var p=m.getName();c.addItem(mxResources.get("removeIt",[p]),null,mxUtils.bind(this,function(){this.removePage(m)}),e);c.addItem(mxResources.get("renameIt",[p]),null,mxUtils.bind(this,function(){this.renamePage(m,m.getName())}),e);f||c.addSeparator(e);c.addItem(mxResources.get("duplicateIt",[p]),null,mxUtils.bind(this,function(){this.duplicatePage(m,
mxResources.get("copyOf",[m.getName()]))}),e)}}f&&(c.addSeparator(e),k(),c.addSeparator(e),g())}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var t=mxEvent.getClientX(d),D=mxEvent.getClientY(d);u.popup(t,D,null,d);this.setCurrentMenu(u);mxEvent.consume(d)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.insertPage();mxEvent.consume(l)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,f,l,d){l=this.createTab(l);var u=b.getName()||mxResources.get("untitled"),t=b.getId();l.setAttribute("title",u+(null!=t?" ("+t+")":"")+" ["+d+"]");mxUtils.write(l,u);l.style.maxWidth=f+"px";l.style.width=f+"px";this.addTabListeners(b,l);42<f&&(l.style.textOverflow="ellipsis");return l};
@@ -12718,42 +12720,42 @@ e=new EmbedDialog(this,this.getLinkForPage(b,t,e));this.showDialog(e.container,4
d));return d};b.beforeDecode=function(f,l,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(l.getAttribute("relatedPage"));if(null==d.relatedPage){var u=l.ownerDocument.createElement("diagram");u.setAttribute("id",l.getAttribute("relatedPage"));u.setAttribute("name",l.getAttribute("name"));d.relatedPage=new DiagramPage(u);u=l.getAttribute("viewState");null!=u&&(d.relatedPage.viewState=JSON.parse(u),l.removeAttribute("viewState"));l=l.cloneNode(!0);u=l.firstChild;if(null!=u)for(d.relatedPage.root=f.decodeCell(u,
!1),d=u.nextSibling,u.parentNode.removeChild(u),u=d;null!=u;){d=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var t=u.getAttribute("id");null==f.lookup(t)&&f.decodeCell(u)}u.parentNode.removeChild(u);u=d}}return l};b.afterDecode=function(f,l,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,u,t,D,c){u=null!=u?u:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var e=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(d,t[g]);t=e;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(d,u){this.model.beginUpdate();try{var t=[];this.traverse(u,!0,mxUtils.bind(this,function(c,e){var g=null!=e&&this.isTreeEdge(e);g&&t.push(e);c==u||null!=e&&!g||t.push(c);return(null==e||g)&&(c==u||!this.model.isCollapsed(c))}));this.model.setCollapsed(u,d);for(var D=0;D<t.length;D++)this.model.setVisible(t[D],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,u,t,D,c,e){return this.model.filterCells(this.getEdges(d,
-u,t,D,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return A.isVertex(H)&&t(H)}function u(H){var S=
-!1;null!=H&&(S="1"==y.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),S="tree"==(null!=S?S.style:y.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=y.view.getState(H),y.view.getState(H),S=null!=(null!=S?S.style:y.getCellStyle(H)).childLayout);return S}function c(H){H=y.view.getState(H);if(null!=H){var S=y.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=y.view.getState(S[0]),null!=S&&(S=S.absolutePoints,
-null!=S&&0<S.length&&(S=S[S.length-1],null!=S)))){if(S.y==H.y&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(S.y==H.y+H.height&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(S.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(H,S){S=null!=S?S:!0;y.model.beginUpdate();try{var U=y.model.getParent(H),Q=y.getIncomingTreeEdges(H),W=y.cloneCells([Q[0],H]);y.model.setTerminal(W[0],y.model.getTerminal(Q[0],
-!0),!0);var V=c(H),X=U.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=S?H.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=S?H.geometry.height+10:-W[1].geometry.height-10;y.view.currentRoot!=U&&(W[1].geometry.x-=X.x,W[1].geometry.y-=X.y);var p=y.view.getState(H),C=y.view.scale;if(null!=p){var I=mxRectangle.fromRectangle(p);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?I.x+=(S?H.geometry.width+10:-W[1].geometry.width-10)*C:I.y+=(S?
-H.geometry.height+10:-W[1].geometry.height-10)*C;var T=y.getOutgoingTreeEdges(y.model.getTerminal(Q[0],!0));if(null!=T){for(var P=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,O=X=Q=0;O<T.length;O++){var R=y.model.getTerminal(T[O],!1);if(V==c(R)){var Y=y.view.getState(R);R!=H&&null!=Y&&(P&&S!=Y.getCenterX()<p.getCenterX()||!P&&S!=Y.getCenterY()<p.getCenterY())&&mxUtils.intersects(I,Y)&&(Q=10+Math.max(Q,(Math.min(I.x+I.width,Y.x+Y.width)-Math.max(I.x,Y.x))/C),X=10+Math.max(X,(Math.min(I.y+
-I.height,Y.y+Y.height)-Math.max(I.y,Y.y))/C))}}P?X=0:Q=0;for(O=0;O<T.length;O++)if(R=y.model.getTerminal(T[O],!1),V==c(R)&&(Y=y.view.getState(R),R!=H&&null!=Y&&(P&&S!=Y.getCenterX()<p.getCenterX()||!P&&S!=Y.getCenterY()<p.getCenterY()))){var da=[];y.traverse(Y.cell,!0,function(ha,Z){var ea=null!=Z&&y.isTreeEdge(Z);ea&&da.push(Z);(null==Z||ea)&&da.push(ha);return null==Z||ea});y.moveCells(da,(S?1:-1)*Q,(S?1:-1)*X)}}}return y.addCells(W,U)}finally{y.model.endUpdate()}}function g(H){y.model.beginUpdate();
-try{var S=c(H),U=y.getIncomingTreeEdges(H),Q=y.cloneCells([U[0],H]);y.model.setTerminal(U[0],Q[1],!1);y.model.setTerminal(Q[0],Q[1],!0);y.model.setTerminal(Q[0],H,!1);var W=y.model.getParent(H),V=W.geometry,X=[];y.view.currentRoot!=W&&(Q[1].geometry.x-=V.x,Q[1].geometry.y-=V.y);y.traverse(H,!0,function(I,T){var P=null!=T&&y.isTreeEdge(T);P&&X.push(T);(null==T||P)&&X.push(I);return null==T||P});var p=H.geometry.width+40,C=H.geometry.height+40;S==mxConstants.DIRECTION_SOUTH?p=0:S==mxConstants.DIRECTION_NORTH?
-(p=0,C=-C):S==mxConstants.DIRECTION_WEST?(p=-p,C=0):S==mxConstants.DIRECTION_EAST&&(C=0);y.moveCells(X,p,C);return y.addCells(Q,W)}finally{y.model.endUpdate()}}function k(H,S){y.model.beginUpdate();try{var U=y.model.getParent(H),Q=y.getIncomingTreeEdges(H),W=c(H);0==Q.length&&(Q=[y.createEdge(U,null,"",null,null,y.createCurrentEdgeStyle())],W=S);var V=y.cloneCells([Q[0],H]);y.model.setTerminal(V[0],H,!0);if(null==y.model.getTerminal(V[0],!1)){y.model.setTerminal(V[0],V[1],!1);var X=y.getCellStyle(V[1]).newEdgeStyle;
-if(null!=X)try{var p=JSON.parse(X),C;for(C in p)y.setCellStyles(C,p[C],[V[0]]),"edgeStyle"==C&&"elbowEdgeStyle"==p[C]&&y.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(Y){}}Q=y.getOutgoingTreeEdges(H);var I=U.geometry;S=[];y.view.currentRoot==U&&(I=new mxRectangle);for(X=0;X<Q.length;X++){var T=y.model.getTerminal(Q[X],!1);null!=T&&S.push(T)}var P=y.view.getBounds(S),O=y.view.translate,R=y.view.scale;W==mxConstants.DIRECTION_SOUTH?
-(V[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-V[1].geometry.width)/2:(P.x+P.width)/R-O.x-I.x+10,V[1].geometry.y+=V[1].geometry.height-I.y+40):W==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-V[1].geometry.width)/2:(P.x+P.width)/R-O.x+-I.x+10,V[1].geometry.y-=V[1].geometry.height+I.y+40):(V[1].geometry.x=W==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+I.x+40):V[1].geometry.x+(V[1].geometry.width-I.x+40),V[1].geometry.y=null==P?H.geometry.y+
-(H.geometry.height-V[1].geometry.height)/2:(P.y+P.height)/R-O.y+-I.y+10);return y.addCells(V,U)}finally{y.model.endUpdate()}}function m(H,S,U){H=y.getOutgoingTreeEdges(H);U=y.view.getState(U);var Q=[];if(null!=U&&null!=H){for(var W=0;W<H.length;W++){var V=y.view.getState(y.model.getTerminal(H[W],!1));null!=V&&(!S&&Math.min(V.x+V.width,U.x+U.width)>=Math.max(V.x,U.x)||S&&Math.min(V.y+V.height,U.y+U.height)>=Math.max(V.y,U.y))&&Q.push(V)}Q.sort(function(X,p){return S?X.x+X.width-p.x-p.width:X.y+X.height-
-p.y-p.height})}return Q}function q(H,S){var U=c(H),Q=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==Q&&U!=S?v.actions.get("selectParent").funct():U==S?(S=y.getOutgoingTreeEdges(H),null!=S&&0<S.length&&y.setSelectionCell(y.model.getTerminal(S[0],!1))):(U=y.getIncomingTreeEdges(H),null!=U&&0<U.length&&(Q=m(y.model.getTerminal(U[0],!0),Q,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(Q,H),0<=H&&(H+=S==mxConstants.DIRECTION_NORTH||
-S==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=Q.length-1&&y.setSelectionCell(Q[H].cell)))))}var v=this,y=v.editor.graph,A=y.getModel(),z=v.menus.createPopupMenu;v.menus.createPopupMenu=function(H,S,U){z.apply(this,arguments);if(1==y.getSelectionCount()){S=y.getSelectionCell();var Q=y.getOutgoingTreeEdges(S);H.addSeparator();0<Q.length&&(d(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));d(y.getSelectionCell())?(H.addSeparator(),
-0<y.getIncomingTreeEdges(S).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<y.model.getEdgeCount(S)&&this.addMenuItems(H,["selectConnections"],null,U)}};v.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var S=[],U=0;U<H.length;U++)S.push(y.model.getTerminal(H[U],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
-1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var S=[],U=0;U<H.length;U++)S.push(y.model.getTerminal(H[U],!1));y.setSelectionCells(S)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(H,S){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=S&&mxEvent.isAltDown(S))y.setSelectionCells(y.model.getTreeEdges(H,null==S||!mxEvent.isShiftDown(S),null==S||!mxEvent.isControlDown(S)));else{var U=[];y.traverse(H,!0,function(Q,W){var V=null!=W&&y.isTreeEdge(W);V&&U.push(W);null!=W&&!V||null!=S&&mxEvent.isShiftDown(S)||U.push(Q);return null==W||V})}y.setSelectionCells(U)}},null,null,"Alt+Shift+D");
-var L=y.removeCells;y.removeCells=function(H,S){S=null!=S?S:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));S&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],Q=0;Q<H.length;Q++){var W=H[Q];A.isEdge(W)&&t(W)&&(U.push(W),W=A.getTerminal(W,!1));if(d(W)){var V=[];y.traverse(W,!0,function(X,p){var C=null!=p&&y.isTreeEdge(p);C&&V.push(p);(null==p||C)&&V.push(X);return null==p||C});0<V.length&&(U=U.concat(V),W=y.getIncomingTreeEdges(H[Q]),H=H.concat(W))}else null!=W&&U.push(H[Q])}H=
-U;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(H,S,U){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,U))};var M=y.duplicateCells;y.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),Q=0;Q<U.length;Q++){var W=y.view.getState(U[Q]);if(null!=W&&d(W.cell)){var V=y.getIncomingTreeEdges(W.cell);for(W=0;W<V.length;W++)mxUtils.remove(V[W],H)}}this.model.beginUpdate();try{var X=M.call(this,H,S);if(X.length==H.length)for(Q=0;Q<H.length;Q++)if(d(H[Q])){var p=
-y.getIncomingTreeEdges(X[Q]);V=y.getIncomingTreeEdges(H[Q]);if(0==p.length&&0<V.length){var C=this.cloneCell(V[0]);this.addEdge(C,y.getDefaultParent(),this.model.getTerminal(V[0],!0),X[Q])}}}finally{this.model.endUpdate()}return X};var n=y.moveCells;y.moveCells=function(H,S,U,Q,W,V,X){var p=null;this.model.beginUpdate();try{var C=W,I=this.getCurrentCellStyle(W);if(null!=H&&d(W)&&"1"==mxUtils.getValue(I,"treeFolding","0")){for(var T=0;T<H.length;T++)if(d(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
-!0)){W=y.model.getParent(H[T]);break}if(null!=C&&W!=C&&null!=this.view.getState(H[0])){var P=y.getIncomingTreeEdges(H[0]);if(0<P.length){var O=y.view.getState(y.model.getTerminal(P[0],!0));if(null!=O){var R=y.view.getState(C);null!=R&&(S=(R.getCenterX()-O.getCenterX())/y.view.scale,U=(R.getCenterY()-O.getCenterY())/y.view.scale)}}}}p=n.apply(this,arguments);if(null!=p&&null!=H&&p.length==H.length)for(T=0;T<p.length;T++)if(this.model.isEdge(p[T]))d(C)&&0>mxUtils.indexOf(p,this.model.getTerminal(p[T],
-!0))&&this.model.setTerminal(p[T],C,!0);else if(d(H[T])&&(P=y.getIncomingTreeEdges(H[T]),0<P.length))if(!Q)d(C)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],C,!0);else if(0==y.getIncomingTreeEdges(p[T]).length){I=C;if(null==I||I==y.model.getParent(H[T]))I=y.model.getTerminal(P[0],!0);Q=this.cloneCell(P[0]);this.addEdge(Q,y.getDefaultParent(),I,p[T])}}finally{this.model.endUpdate()}return p};if(null!=v.sidebar){var x=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(H,S,U,Q){var W=y.model,V=null;W.beginUpdate();try{if(V=x.apply(this,arguments),d(H))for(var X=0;X<V.length;X++)if(W.isEdge(V[X])&&null==W.getTerminal(V[X],!0)){W.setTerminal(V[X],H,!0);var p=y.getCellGeometry(V[X]);p.points=null;null!=p.getTerminalPoint(!0)&&p.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return V}}var K={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},B=v.onKeyDown;v.onKeyDown=function(H){try{if(y.isEnabled()&&
-!y.isEditing()&&d(y.getSelectionCell())&&1==y.getSelectionCount()){var S=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?S=mxEvent.isShiftDown(H)?g(y.getSelectionCell()):k(y.getSelectionCell()):13==H.which&&(S=e(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=S&&0<S.length)1==S.length&&y.model.isEdge(S[0])?y.setSelectionCell(y.model.getTerminal(S[0],!1)):y.setSelectionCell(S[S.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(y.view.getState(y.getSelectionCell())),
-y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var U=K[H.keyCode];null!=U&&(U.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(Q){v.handleError(Q)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var F=y.connectVertex;y.connectVertex=function(H,S,U,Q,W,V,X){var p=y.getIncomingTreeEdges(H);if(d(H)){var C=c(H),I=C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return C==S||0==p.length?k(H,S):I==T?g(H):e(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};y.getSubtree=function(H){var S=
-[H];!u(H)&&!d(H)||D(H)||y.traverse(H,!0,function(U,Q){var W=null!=Q&&y.isTreeEdge(Q);W&&0>mxUtils.indexOf(S,Q)&&S.push(Q);(null==Q||W)&&0>mxUtils.indexOf(S,U)&&S.push(U);return null==Q||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(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(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var E=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,S){E.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),u=this.graph;return d.concat([this.addEntry("tree container",
+u,t,D,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(I){return z.isVertex(I)&&t(I)}function u(I){var R=
+!1;null!=I&&(R="1"==x.getCurrentCellStyle(I).treeMoving);return R}function t(I){var R=!1;null!=I&&(I=z.getParent(I),R=x.view.getState(I),R="tree"==(null!=R?R.style:x.getCellStyle(I)).containerType);return R}function D(I){var R=!1;null!=I&&(I=z.getParent(I),R=x.view.getState(I),x.view.getState(I),R=null!=(null!=R?R.style:x.getCellStyle(I)).childLayout);return R}function c(I){I=x.view.getState(I);if(null!=I){var R=x.getIncomingTreeEdges(I.cell);if(0<R.length&&(R=x.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
+null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==I.y&&Math.abs(R.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==I.y+I.height&&Math.abs(R.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(I,R){R=null!=R?R:!0;x.model.beginUpdate();try{var W=x.model.getParent(I),P=x.getIncomingTreeEdges(I),V=x.cloneCells([P[0],I]);x.model.setTerminal(V[0],x.model.getTerminal(P[0],
+!0),!0);var U=c(I),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?I.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?I.geometry.height+10:-V[1].geometry.height-10;x.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var n=x.view.getState(I),C=x.view.scale;if(null!=n){var J=mxRectangle.fromRectangle(n);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?J.x+=(R?I.geometry.width+10:-V[1].geometry.width-10)*C:J.y+=(R?
+I.geometry.height+10:-V[1].geometry.height-10)*C;var T=x.getOutgoingTreeEdges(x.model.getTerminal(P[0],!0));if(null!=T){for(var Q=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,O=X=P=0;O<T.length;O++){var S=x.model.getTerminal(T[O],!1);if(U==c(S)){var Y=x.view.getState(S);S!=I&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY())&&mxUtils.intersects(J,Y)&&(P=10+Math.max(P,(Math.min(J.x+J.width,Y.x+Y.width)-Math.max(J.x,Y.x))/C),X=10+Math.max(X,(Math.min(J.y+
+J.height,Y.y+Y.height)-Math.max(J.y,Y.y))/C))}}Q?X=0:P=0;for(O=0;O<T.length;O++)if(S=x.model.getTerminal(T[O],!1),U==c(S)&&(Y=x.view.getState(S),S!=I&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY()))){var da=[];x.traverse(Y.cell,!0,function(ha,Z){var ea=null!=Z&&x.isTreeEdge(Z);ea&&da.push(Z);(null==Z||ea)&&da.push(ha);return null==Z||ea});x.moveCells(da,(R?1:-1)*P,(R?1:-1)*X)}}}return x.addCells(V,W)}finally{x.model.endUpdate()}}function g(I){x.model.beginUpdate();
+try{var R=c(I),W=x.getIncomingTreeEdges(I),P=x.cloneCells([W[0],I]);x.model.setTerminal(W[0],P[1],!1);x.model.setTerminal(P[0],P[1],!0);x.model.setTerminal(P[0],I,!1);var V=x.model.getParent(I),U=V.geometry,X=[];x.view.currentRoot!=V&&(P[1].geometry.x-=U.x,P[1].geometry.y-=U.y);x.traverse(I,!0,function(J,T){var Q=null!=T&&x.isTreeEdge(T);Q&&X.push(T);(null==T||Q)&&X.push(J);return null==T||Q});var n=I.geometry.width+40,C=I.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?n=0:R==mxConstants.DIRECTION_NORTH?
+(n=0,C=-C):R==mxConstants.DIRECTION_WEST?(n=-n,C=0):R==mxConstants.DIRECTION_EAST&&(C=0);x.moveCells(X,n,C);return x.addCells(P,V)}finally{x.model.endUpdate()}}function k(I,R){x.model.beginUpdate();try{var W=x.model.getParent(I),P=x.getIncomingTreeEdges(I),V=c(I);0==P.length&&(P=[x.createEdge(W,null,"",null,null,x.createCurrentEdgeStyle())],V=R);var U=x.cloneCells([P[0],I]);x.model.setTerminal(U[0],I,!0);if(null==x.model.getTerminal(U[0],!1)){x.model.setTerminal(U[0],U[1],!1);var X=x.getCellStyle(U[1]).newEdgeStyle;
+if(null!=X)try{var n=JSON.parse(X),C;for(C in n)x.setCellStyles(C,n[C],[U[0]]),"edgeStyle"==C&&"elbowEdgeStyle"==n[C]&&x.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}P=x.getOutgoingTreeEdges(I);var J=W.geometry;R=[];x.view.currentRoot==W&&(J=new mxRectangle);for(X=0;X<P.length;X++){var T=x.model.getTerminal(P[X],!1);null!=T&&R.push(T)}var Q=x.view.getBounds(R),O=x.view.translate,S=x.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(U[1].geometry.x=null==Q?I.geometry.x+(I.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/S-O.x-J.x+10,U[1].geometry.y+=U[1].geometry.height-J.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==Q?I.geometry.x+(I.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/S-O.x+-J.x+10,U[1].geometry.y-=U[1].geometry.height+J.y+40):(U[1].geometry.x=V==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+J.x+40):U[1].geometry.x+(U[1].geometry.width-J.x+40),U[1].geometry.y=null==Q?I.geometry.y+
+(I.geometry.height-U[1].geometry.height)/2:(Q.y+Q.height)/S-O.y+-J.y+10);return x.addCells(U,W)}finally{x.model.endUpdate()}}function m(I,R,W){I=x.getOutgoingTreeEdges(I);W=x.view.getState(W);var P=[];if(null!=W&&null!=I){for(var V=0;V<I.length;V++){var U=x.view.getState(x.model.getTerminal(I[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&P.push(U)}P.sort(function(X,n){return R?X.x+X.width-n.x-n.width:X.y+X.height-
+n.y-n.height})}return P}function p(I,R){var W=c(I),P=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST)==P&&W!=R?v.actions.get("selectParent").funct():W==R?(R=x.getOutgoingTreeEdges(I),null!=R&&0<R.length&&x.setSelectionCell(x.model.getTerminal(R[0],!1))):(W=x.getIncomingTreeEdges(I),null!=W&&0<W.length&&(P=m(x.model.getTerminal(W[0],!0),P,I),I=x.view.getState(I),null!=I&&(I=mxUtils.indexOf(P,I),0<=I&&(I+=R==mxConstants.DIRECTION_NORTH||
+R==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=P.length-1&&x.setSelectionCell(P[I].cell)))))}var v=this,x=v.editor.graph,z=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(I,R,W){y.apply(this,arguments);if(1==x.getSelectionCount()){R=x.getSelectionCell();var P=x.getOutgoingTreeEdges(R);I.addSeparator();0<P.length&&(d(x.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,W),this.addMenuItems(I,["selectDescendants"],null,W));d(x.getSelectionCell())?(I.addSeparator(),
+0<x.getIncomingTreeEdges(R).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,W)):0<x.model.getEdgeCount(R)&&this.addMenuItems(I,["selectConnections"],null,W)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getOutgoingTreeEdges(I);if(null!=I){for(var R=[],W=0;W<I.length;W++)R.push(x.model.getTerminal(I[W],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&&
+1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=x.getOutgoingTreeEdges(x.model.getTerminal(I[0],!0)),null!=I)){for(var R=[],W=0;W<I.length;W++)R.push(x.model.getTerminal(I[W],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getIncomingTreeEdges(I);null!=I&&0<I.length&&x.setSelectionCell(x.model.getTerminal(I[0],
+!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(I,R){I=x.getSelectionCell();if(x.isEnabled()&&x.model.isVertex(I)){if(null!=R&&mxEvent.isAltDown(R))x.setSelectionCells(x.model.getTreeEdges(I,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var W=[];x.traverse(I,!0,function(P,V){var U=null!=V&&x.isTreeEdge(V);U&&W.push(V);null!=V&&!U||null!=R&&mxEvent.isShiftDown(R)||W.push(P);return null==V||U})}x.setSelectionCells(W)}},null,null,"Alt+Shift+D");
+var L=x.removeCells;x.removeCells=function(I,R){R=null!=R?R:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));R&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var W=[],P=0;P<I.length;P++){var V=I[P];z.isEdge(V)&&t(V)&&(W.push(V),V=z.getTerminal(V,!1));if(d(V)){var U=[];x.traverse(V,!0,function(X,n){var C=null!=n&&x.isTreeEdge(n);C&&U.push(n);(null==n||C)&&U.push(X);return null==n||C});0<U.length&&(W=W.concat(U),V=x.getIncomingTreeEdges(I[P]),I=I.concat(V))}else null!=V&&W.push(I[P])}I=
+W;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(I,R,W){return d(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var N=x.duplicateCells;x.duplicateCells=function(I,R){I=null!=I?I:this.getSelectionCells();for(var W=I.slice(0),P=0;P<W.length;P++){var V=x.view.getState(W[P]);if(null!=V&&d(V.cell)){var U=x.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],I)}}this.model.beginUpdate();try{var X=N.call(this,I,R);if(X.length==I.length)for(P=0;P<I.length;P++)if(d(I[P])){var n=
+x.getIncomingTreeEdges(X[P]);U=x.getIncomingTreeEdges(I[P]);if(0==n.length&&0<U.length){var C=this.cloneCell(U[0]);this.addEdge(C,x.getDefaultParent(),this.model.getTerminal(U[0],!0),X[P])}}}finally{this.model.endUpdate()}return X};var K=x.moveCells;x.moveCells=function(I,R,W,P,V,U,X){var n=null;this.model.beginUpdate();try{var C=V,J=this.getCurrentCellStyle(V);if(null!=I&&d(V)&&"1"==mxUtils.getValue(J,"treeFolding","0")){for(var T=0;T<I.length;T++)if(d(I[T])||x.model.isEdge(I[T])&&null==x.model.getTerminal(I[T],
+!0)){V=x.model.getParent(I[T]);break}if(null!=C&&V!=C&&null!=this.view.getState(I[0])){var Q=x.getIncomingTreeEdges(I[0]);if(0<Q.length){var O=x.view.getState(x.model.getTerminal(Q[0],!0));if(null!=O){var S=x.view.getState(C);null!=S&&(R=(S.getCenterX()-O.getCenterX())/x.view.scale,W=(S.getCenterY()-O.getCenterY())/x.view.scale)}}}}n=K.apply(this,arguments);if(null!=n&&null!=I&&n.length==I.length)for(T=0;T<n.length;T++)if(this.model.isEdge(n[T]))d(C)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[T],
+!0))&&this.model.setTerminal(n[T],C,!0);else if(d(I[T])&&(Q=x.getIncomingTreeEdges(I[T]),0<Q.length))if(!P)d(C)&&0>mxUtils.indexOf(I,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],C,!0);else if(0==x.getIncomingTreeEdges(n[T]).length){J=C;if(null==J||J==x.model.getParent(I[T]))J=x.model.getTerminal(Q[0],!0);P=this.cloneCell(Q[0]);this.addEdge(P,x.getDefaultParent(),J,n[T])}}finally{this.model.endUpdate()}return n};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(I,R,W,P){var V=x.model,U=null;V.beginUpdate();try{if(U=q.apply(this,arguments),d(I))for(var X=0;X<U.length;X++)if(V.isEdge(U[X])&&null==V.getTerminal(U[X],!0)){V.setTerminal(U[X],I,!0);var n=x.getCellGeometry(U[X]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(I){try{if(x.isEnabled()&&
+!x.isEditing()&&d(x.getSelectionCell())&&1==x.getSelectionCount()){var R=null;0<x.getIncomingTreeEdges(x.getSelectionCell()).length&&(9==I.which?R=mxEvent.isShiftDown(I)?g(x.getSelectionCell()):k(x.getSelectionCell()):13==I.which&&(R=e(x.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=R&&0<R.length)1==R.length&&x.model.isEdge(R[0])?x.setSelectionCell(x.model.getTerminal(R[0],!1)):x.setSelectionCell(R[R.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(x.view.getState(x.getSelectionCell())),
+x.startEditingAtCell(x.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var W=E[I.keyCode];null!=W&&(W.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(p(x.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(I))}}catch(P){v.handleError(P)}mxEvent.isConsumed(I)||A.apply(this,arguments)};var B=x.connectVertex;x.connectVertex=function(I,R,W,P,V,U,X){var n=x.getIncomingTreeEdges(I);if(d(I)){var C=c(I),J=C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST,T=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return C==R||0==n.length?k(I,R):J==T?g(I):e(I,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return B.apply(this,arguments)};x.getSubtree=function(I){var R=
+[I];!u(I)&&!d(I)||D(I)||x.traverse(I,!0,function(W,P){var V=null!=P&&x.isTreeEdge(P);V&&0>mxUtils.indexOf(R,P)&&R.push(P);(null==P||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==P||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(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(I){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);
+this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(I)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){H.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),u=this.graph;return d.concat([this.addEntry("tree container",
function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.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 c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);t.insert(e);t.insert(D);t.insert(c);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
t.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');D.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);g.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;D.insertEdge(q,!0);m.insertEdge(q,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-v.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");y.geometry.relative=!0;y.edge=!0;D.insertEdge(y,!0);v.insertEdge(y,!1);t.insert(e);t.insert(k);t.insert(q);t.insert(y);t.insert(D);t.insert(c);t.insert(g);t.insert(m);t.insert(v);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",
+m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);m.insertEdge(p,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+v.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;D.insertEdge(x,!0);v.insertEdge(x,!1);t.insert(e);t.insert(k);t.insert(p);t.insert(x);t.insert(D);t.insert(c);t.insert(g);t.insert(m);t.insert(v);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;t.insertEdge(D,!1);return sb.createVertexTemplateFromCells([t,D],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;t.insertEdge(D,!1);return sb.createVertexTemplateFromCells([t,D],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -12764,27 +12766,27 @@ k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);g.insertEdge(k,!1);t.insert(
D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;t.insertEdge(D,!1);return sb.createVertexTemplateFromCells([t,D],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;t.insertEdge(D,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([D,e,t,c],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(B,F){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){F="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new t(B,mxResources.get("format"),F,N,240,G,function(E){var H=
-B.createFormat(E);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=F?F:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=u();var J=B.createFormat(B.formatElt);J.init();B.formatElt.style.border="none";B.formatElt.style.width=
-"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function f(B,F){function G(H,S){var U=B.menus.get(H);H=E.addMenu(S,mxUtils.bind(this,function(){U.funct.apply(this,arguments)}));H.style.cssText=
-"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";F.appendChild(H);return H}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";
-J.innerHTML="+";N.appendChild(J);mxUtils.write(N,mxResources.get("moreShapes"));F.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var E=new Menubar(B,F);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-N.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),N.appendChild(J),F.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",J=document.createElement("span"),
-J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),N.appendChild(J),F.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("openLibrary").funct)):(N=G("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=G("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight=
-"6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");F.appendChild(B.sidebar.container);F.style.overflow="hidden"}function l(B,F){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){F=Math.min(G.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new t(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-N)/2):56,F-6,N-6,function(J){f(B,J)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);B.getLocalData("sidebar",function(J){B.sidebar.showEntries(J,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=F?F:!B.sidebarWindow.window.isVisible())}else null==
-B.sidebarElt&&(B.sidebarElt=u(),f(B,B.sidebarElt),B.sidebarElt.style.border="none",B.sidebarElt.style.width="210px",B.sidebarElt.style.borderRight="1px solid gray"),G=B.diagramContainer.parentNode,null!=B.sidebarElt.parentNode?(B.sidebarElt.parentNode.removeChild(B.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(B.sidebarElt),G.style.left=B.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var u=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},t=function(B,F,G,N,J,E,H){var S=u();H(S);this.window=new mxWindow(F,S,G,N,J,E,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(U,Q){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,V=this.table.firstChild.firstChild.firstChild;U=Math.max(0,Math.min(U,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-V.clientWidth-2));Q=Math.max(0,Math.min(Q,W-V.clientHeight-2));this.getX()==U&&this.getY()==Q||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(U){null==U&&(U=window.event);return null!=U&&B.isSelectionAllowed(U)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
+EditorUi.initMinimalTheme=function(){function b(A,B){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.formatWindow){B="1"==urlParams.sketch?Math.max(10,A.diagramContainer.clientWidth-241):Math.max(10,A.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);A.formatWindow=new t(A,mxResources.get("format"),B,M,240,G,function(F){var I=
+A.createFormat(F);I.init();A.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});A.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.formatWindow.window.fit()}));A.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else A.formatWindow.window.setVisible(null!=B?B:!A.formatWindow.window.isVisible())}else{if(null==A.formatElt){A.formatElt=u();var H=A.createFormat(A.formatElt);H.init();A.formatElt.style.border="none";A.formatElt.style.width=
+"240px";A.formatElt.style.borderLeft="1px solid gray";A.formatElt.style.right="0px";A.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}))}G=A.diagramContainer.parentNode;null!=A.formatElt.parentNode?(A.formatElt.parentNode.removeChild(A.formatElt),G.style.right="0px"):(G.parentNode.appendChild(A.formatElt),G.style.right=A.formatElt.style.width)}}function f(A,B){function G(I,R){var W=A.menus.get(I);I=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));I.style.cssText=
+"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";I.className="geTitle";B.appendChild(I);return I}var M=document.createElement("div");M.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";M.className="geTitle";var H=document.createElement("span");H.style.fontSize="18px";H.style.marginRight="5px";
+H.innerHTML="+";M.appendChild(H);mxUtils.write(M,mxResources.get("moreShapes"));B.appendChild(M);mxEvent.addListener(M,"click",function(){A.actions.get("shapes").funct()});var F=new Menubar(A,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=A.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+M.className="geTitle",H=document.createElement("span"),H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("newLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("newLibrary").funct),M=document.createElement("div"),M.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",M.className="geTitle",H=document.createElement("span"),
+H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("openLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("openLibrary").funct)):(M=G("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=G("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight=
+"6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");B.appendChild(A.sidebar.container);B.style.overflow="hidden"}function l(A,B){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.sidebarWindow){B=Math.min(G.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);A.sidebarWindow=new t(A,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-M)/2):56,B-6,M-6,function(H){f(A,H)});A.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.sidebarWindow.window.fit()}));A.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);A.sidebarWindow.window.setVisible(!0);A.getLocalData("sidebar",function(H){A.sidebar.showEntries(H,null,!0)});A.restoreLibraries()}else A.sidebarWindow.window.setVisible(null!=B?B:!A.sidebarWindow.window.isVisible())}else null==
+A.sidebarElt&&(A.sidebarElt=u(),f(A,A.sidebarElt),A.sidebarElt.style.border="none",A.sidebarElt.style.width="210px",A.sidebarElt.style.borderRight="1px solid gray"),G=A.diagramContainer.parentNode,null!=A.sidebarElt.parentNode?(A.sidebarElt.parentNode.removeChild(A.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(A.sidebarElt),G.style.left=A.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(A){}var u=function(){var A=document.createElement("div");A.className="geSidebarContainer";A.style.position="absolute";A.style.width="100%";A.style.height="100%";A.style.border="1px solid whiteSmoke";A.style.overflowX="hidden";A.style.overflowY="auto";return A},t=function(A,B,G,M,H,F,I){var R=u();I(R);this.window=new mxWindow(B,R,G,M,H,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(W,P){var V=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;W=Math.max(0,Math.min(W,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));P=Math.max(0,Math.min(P,V-U.clientHeight-2));this.getX()==W&&this.getY()==P||mxWindow.prototype.setLocation.apply(this,
+arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&A.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(B){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(B);null==urlParams.dark&&(mxSettings.settings.darkMode=B,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var D=document.createElement("link");D.setAttribute("rel","stylesheet");D.setAttribute("href",STYLE_PATH+"/dark.css");D.setAttribute("charset","UTF-8");D.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(B){if(Editor.darkMode!=B){var F=this.editor.graph;Editor.darkMode=B;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";F.view.gridColor=Editor.isDarkMode()?F.view.defaultDarkGridColor:F.view.defaultGridColor;F.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";F.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";F.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";F.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";F.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";F.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";F.loadStylesheet();null!=this.actions.layersWindow&&(B=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,B&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=F.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=F.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=F.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-F.shapeForegroundColor;Graph.prototype.defaultThemeName=F.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+EditorUi.prototype.setDarkMode=function(A){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(A);null==urlParams.dark&&(mxSettings.settings.darkMode=A,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var D=document.createElement("link");D.setAttribute("rel","stylesheet");D.setAttribute("href",STYLE_PATH+"/dark.css");D.setAttribute("charset","UTF-8");D.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(A){if(Editor.darkMode!=A){var B=this.editor.graph;Editor.darkMode=A;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";B.view.gridColor=Editor.isDarkMode()?B.view.defaultDarkGridColor:B.view.defaultGridColor;B.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";B.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";B.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";B.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";B.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.loadStylesheet();null!=this.actions.layersWindow&&(A=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,A&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=B.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=B.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=B.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+B.shapeForegroundColor;Graph.prototype.defaultThemeName=B.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;c.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==D.parentNode&&document.getElementsByTagName("head")[0].appendChild(D):null!=D.parentNode&&D.parentNode.removeChild(D)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -12794,139 +12796,139 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var c=document.createElement("style");c.type="text/css";c.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(c);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(B,
-F){null!=F.shortcut&&900>d&&!mxClient.IS_IOS?B.firstChild.nextSibling.setAttribute("title",F.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var B=this.userElement;B.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+B.style.display;B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.userImage+")";B.style.backgroundPosition="center center";
-B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";B.style.cssFloat="right";B.setAttribute("title",mxResources.get("changeUser"));if("none"!=B.style.display){B.style.display="inline-block";var F=this.getCurrentFile();if(null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var N=F.getRealtimeError();F=F.getRealtimeState();var J=mxResources.get("realtimeCollaboration");1==F?(G.src=Editor.syncImage,J+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,J=null!=N&&null!=N.message?J+(" ("+N.message+")"):J+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",J);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=
-this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var B=document.createElement("div");B.style.display="inline-block";B.style.position="relative";B.style.marginTop="6px";B.style.marginRight="4px";var F=document.createElement("a");F.className="geMenuItem gePrimaryBtn";F.style.marginLeft="8px";F.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(F,G);F.setAttribute("title",G);mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));B.appendChild(F)}}else mxUtils.write(F,mxResources.get("save")),F.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),B.appendChild(F),"1"==urlParams.saveAndExit&&(F=document.createElement("a"),
-mxUtils.write(F,mxResources.get("saveAndExit")),F.setAttribute("title",mxResources.get("saveAndExit")),F.className="geMenuItem",F.style.marginLeft="6px",F.style.padding="6px",mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),B.appendChild(F));"1"!=urlParams.noExitBtn&&(F=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(F,G),F.setAttribute("title",G),F.className="geMenuItem",
-F.style.marginLeft="6px",F.style.padding="6px",mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),B.appendChild(F));this.buttonContainer.appendChild(B);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,F){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-F.height/2+16;return G}var N=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(B,F,G){var N=this.editorUi.editor.graph;B.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(B.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==N.getSelectionCount()?
-(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(B,N.isCellCollapsed(F)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],
-null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,F,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,
+B){null!=B.shortcut&&900>d&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",B.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var A=this.userElement;A.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.userImage+")";A.style.backgroundPosition="center center";
+A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";A.style.cssFloat="right";A.setAttribute("title",mxResources.get("changeUser"));if("none"!=A.style.display){A.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
+"12px";var M=B.getRealtimeError();B=B.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==B?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);A.style.paddingRight="4px";A.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var A=
+this.shareButton;A.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.shareImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,G);B.setAttribute("title",G);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));A.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),A.appendChild(B),"1"==urlParams.saveAndExit&&(B=document.createElement("a"),
+mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),A.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,G),B.setAttribute("title",G),B.className="geMenuItem",
+B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),A.appendChild(B));this.buttonContainer.appendChild(A);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(A,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,A)){var G=mxUtils.getOffset(this.editorUi.picker);
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=A.offsetTop-B.height/2+16;return G}var M=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=G.x-16;M.y+=G.y;return M};var x=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(A,B,G){var M=this.editorUi.editor.graph;A.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(A.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(A,["-","lockUnlock"],null,G)):1==M.getSelectionCount()?
+(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(A,M.isCellCollapsed(B)?["expand"]:["collapse"],null,G),this.addMenuItems(A,["collapsible","-","lockUnlock","enterGroup"],null,G),A.addSeparator(),this.addSubmenu("layout",A)):M.isSelectionEmpty()&&M.isEnabled()?(A.addSeparator(),this.addMenuItems(A,["editData"],null,G),A.addSeparator(),this.addSubmenu("layout",A),this.addSubmenu("insert",A),this.addMenuItems(A,["-","exitGroup"],null,G)):M.isEnabled()&&this.addMenuItems(A,["-","lockUnlock"],
+null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(A,B,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(A,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(A){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=A?A:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var y=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);z.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){L.apply(this,arguments);if(B){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=F&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=F||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var M=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=M.apply(this,arguments);var F=this.editorUi,G=F.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,E){F.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:J?
-"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};F.addListener("sketchModeChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});B.appendChild(N)}return B};var n=Menus.prototype.init;Menus.prototype.init=function(){n.apply(this,arguments);var B=this.editorUi,F=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
-mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("forkme").visible="1"!=urlParams.sketch;B.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(Q){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
-G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(Q){B.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(Q){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){F.popupMenuHandler.hideMenu();
-B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var Q=new ParseDialog(B,"Insert from Text");B.showDialog(Q.container,620,420,!0,!1);Q.init()}));B.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var Q=new ParseDialog(B,"Insert from Text","formatSql");B.showDialog(Q.container,620,420,!0,!1);Q.init()}));B.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(B)},
-null,null,Editor.ctrlKey+"+Shift+K"));B.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(B)})).shortcut=B.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var Q=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(Q.container,620,420,!0,!1);Q.init()}));B.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var Q=
-new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(Q.container,620,420,!0,!1);Q.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(Q,W){var V=this.editorUi.editor.graph,X=V.getSelectionCell();N.call(this,Q,X,null,W);this.addMenuItems(Q,["editTooltip"],W);V.model.isVertex(X)&&this.addMenuItems(Q,["editGeometry"],W);this.addMenuItems(Q,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(Q,W,V,X){Q.addSeparator();this.addSubmenu("editCell",
-Q,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(Q,W){var V=B.getCurrentFile();B.menus.addMenuItems(Q,["new"],W);B.menus.addSubmenu("openFrom",Q,W);isLocalStorage&&this.addSubmenu("openRecent",Q,W);Q.addSeparator(W);null!=V&&V.constructor==DriveFile?B.menus.addMenuItems(Q,["save","rename","makeCopy","moveToFolder"],W):(B.menus.addMenuItems(Q,["save","saveAs","-","rename"],W),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(Q,
-["upload"],W):B.menus.addMenuItems(Q,["makeCopy"],W));Q.addSeparator(W);null!=V&&(V.isRevisionHistorySupported()&&B.menus.addMenuItems(Q,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||V.constructor==LocalFile&&null==V.fileHandle||B.menus.addMenuItems(Q,["synchronize"],W));B.menus.addMenuItems(Q,["autosave"],W);if(null!=V&&(Q.addSeparator(W),V.isRealtimeEnabled()&&V.isRealtimeSupported()&&this.addMenuItems(Q,["showRemoteCursors","shareCursor"],W),V.constructor==DriveFile&&B.menus.addMenuItems(Q,
-["share"],W),null!=B.fileNode&&"1"!=urlParams.embedInline)){var X=null!=V.getTitle()?V.getTitle():B.defaultFilename;(V.constructor==DriveFile&&null!=V.sync&&V.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(Q,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(Q,W){var V=B.getCurrentFile();B.menus.addSubmenu("extras",Q,W,mxResources.get("preferences"));Q.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)B.menus.addMenuItems(Q,
-"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||B.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&B.menus.addMenuItems(Q,["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||B.mode==App.MODE_ATLAS)B.menus.addMenuItems(Q,["saveAndExit"],W),null!=V&&V.isRevisionHistorySupported()&&B.menus.addMenuItems(Q,["revisionHistory"],W);Q.addSeparator(W)}else B.mode==App.MODE_ATLAS?B.menus.addMenuItems(Q,
-["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(B.menus.addMenuItems(Q,["new"],W),B.menus.addSubmenu("openFrom",Q,W),isLocalStorage&&this.addSubmenu("openRecent",Q,W),Q.addSeparator(W),null!=V&&(V.isRealtimeEnabled()&&V.isRealtimeSupported()&&this.addMenuItems(Q,["showRemoteCursors","shareCursor"],W),V.constructor==DriveFile&&B.menus.addMenuItems(Q,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||V.constructor==LocalFile||B.menus.addMenuItems(Q,["synchronize"],
-W)),Q.addSeparator(W),B.menus.addSubmenu("save",Q,W)):B.menus.addSubmenu("file",Q,W));B.menus.addSubmenu("exportAs",Q,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?B.menus.addMenuItems(Q,["import"],W):"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",Q,W);Q.addSeparator(W);"1"!=urlParams.sketch&&B.menus.addMenuItems(Q,["outline"],W);B.commentsSupported()&&B.menus.addMenuItems(Q,["comments"],W);B.menus.addMenuItems(Q,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||
-mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(Q,["print"],W);"1"!=urlParams.sketch&&null!=V&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(V=null!=V.getTitle()?V.getTitle():B.defaultFilename,/(\.html)$/i.test(V)||/(\.svg)$/i.test(V)||this.addMenuItems(Q,["-","properties"]));Q.addSeparator(W);B.menus.addSubmenu("help",Q,W);"1"==urlParams.embed||B.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(Q,["-","exit"],W):"1"!=urlParams.noFileMenu&&
-B.menus.addMenuItems(Q,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(Q,W){var V=B.getCurrentFile();null!=V&&V.constructor==DriveFile?B.menus.addMenuItems(Q,["save","makeCopy","-","rename","moveToFolder"],W):(B.menus.addMenuItems(Q,["save","saveAs","-","rename"],W),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(Q,["upload"],W):B.menus.addMenuItems(Q,["makeCopy"],W));B.menus.addMenuItems(Q,["-","autosave"],W);null!=V&&V.isRevisionHistorySupported()&&
-B.menus.addMenuItems(Q,["-","revisionHistory"],W)})));var J=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(Q,W){J.funct(Q,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.menus.addMenuItems(Q,["publishLink"],W);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(Q.addSeparator(W),B.menus.addSubmenu("embed",Q,W))})));var E=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(Q,W){B.menus.addInsertTableCellItem(Q,W)})));if("1"==urlParams.sketch){var H=
-this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(Q,W){H.funct(Q,W);this.addMenuItems(Q,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(Q,W){null!=E&&B.menus.addSubmenu("language",Q,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",Q,W);B.menus.addSubmenu("units",Q,W);Q.addSeparator(W);"1"!=urlParams.sketch&&B.menus.addMenuItems(Q,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
-W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItems(Q,["-","showStartScreen","search","scratchpad"],W);Q.addSeparator(W);"1"==urlParams.sketch?B.menus.addMenuItems(Q,"configuration - copyConnect collapseExpand tooltips -".split(" "),W):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(Q,"configuration",W),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(Q,"plugins",
-W),Q.addSeparator(W),B.mode!=App.MODE_ATLAS&&this.addMenuItems(Q,["fullscreen"],W));("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(Q,["toggleDarkMode"],W);Q.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(Q,W){B.menus.addMenuItems(Q,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var Q=this.get("insert"),W=Q.funct;Q.funct=function(V,
-X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(V,["insertTemplate"],X),B.menus.addMenuItems(V,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertLayout",V,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",V,X,mxResources.get("advanced"))):(W.apply(this,arguments),B.menus.addSubmenu("table",V,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),U=function(Q,W,V,X){Q.addItem(V,
-null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(B,V,X);B.showDialog(p.container,620,420,!0,!1);p.init()}),W)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(Q,W){for(var V=0;V<S.length;V++)"-"==S[V]?Q.addSeparator(W):U(Q,W,mxResources.get(S[V])+"...",S[V])})))};EditorUi.prototype.installFormatToolbar=function(B){var F=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-F.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var x=!1;EditorUi.prototype.initFormatWindow=function(){if(!x&&null!=this.formatWindow){x=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width=
-"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,
-ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),U);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ca));E.menus.menuCreated(ia,ma,"geMenuItem");null!=ja?
-(ma.style.backgroundImage="url("+ja+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ba||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function F(ca,ba,ja,ia,ma,qa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":
-"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow="none",oa.style.padding="6px",oa.style.margin="0px");null!=E.statusContainer?S.insertBefore(oa,E.statusContainer):S.appendChild(oa);null!=qa?(oa.style.backgroundImage="url("+qa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat=
+null);y.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(A){L.apply(this,arguments);if(A){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var N=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(A){A=N.apply(this,arguments);var B=this.editorUi,G=B.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var M=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(H,F){B.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:H?
+"1":null},G.getVerticesAndEdges())},{install:function(H){this.listener=function(){H(Editor.sketchMode)};B.addListener("sketchModeChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});A.appendChild(M)}return A};var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var A=this.editorUi,B=A.editor.graph;A.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";A.actions.get("createShape").label=mxResources.get("shape")+"...";A.actions.get("outline").label=
+mxResources.get("outline")+"...";A.actions.get("layers").label=mxResources.get("layers")+"...";A.actions.get("tags").label=mxResources.get("tags")+"...";A.actions.get("forkme").visible="1"!=urlParams.sketch;A.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;A.actions.get("comments").label=mxResources.get("comments")+"...";var G=A.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(P){A.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
+G=A.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(P){A.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(P){A.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});A.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){B.popupMenuHandler.hideMenu();
+A.showImportCsvDialog()}));A.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var P=new ParseDialog(A,"Insert from Text");A.showDialog(P.container,620,420,!0,!1);P.init()}));A.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var P=new ParseDialog(A,"Insert from Text","formatSql");A.showDialog(P.container,620,420,!0,!1);P.init()}));A.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(A)},
+null,null,Editor.ctrlKey+"+Shift+K"));A.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(A)})).shortcut=A.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!A.isOffline()&&A.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var P=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(P.container,620,420,!0,!1);P.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var P=
+new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(P.container,620,420,!0,!1);P.init()}));var M=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(P,V){var U=this.editorUi.editor.graph,X=U.getSelectionCell();M.call(this,P,X,null,V);this.addMenuItems(P,["editTooltip"],V);U.model.isVertex(X)&&this.addMenuItems(P,["editGeometry"],V);this.addMenuItems(P,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(P,V,U,X){P.addSeparator();this.addSubmenu("editCell",
+P,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(P,V){var U=A.getCurrentFile();A.menus.addMenuItems(P,["new"],V);A.menus.addSubmenu("openFrom",P,V);isLocalStorage&&this.addSubmenu("openRecent",P,V);P.addSeparator(V);null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(P,["save","rename","makeCopy","moveToFolder"],V):(A.menus.addMenuItems(P,["save","saveAs","-","rename"],V),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,
+["upload"],V):A.menus.addMenuItems(P,["makeCopy"],V));P.addSeparator(V);null!=U&&(U.isRevisionHistorySupported()&&A.menus.addMenuItems(P,["revisionHistory"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||A.menus.addMenuItems(P,["synchronize"],V));A.menus.addMenuItems(P,["autosave"],V);if(null!=U&&(P.addSeparator(V),U.constructor==DriveFile&&A.menus.addMenuItems(P,["share"],V),null!=A.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():
+A.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(P,["-","properties"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(P,V){var U=A.getCurrentFile();A.menus.addSubmenu("extras",P,V,mxResources.get("preferences"));P.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)A.menus.addMenuItems(P,"new open - synchronize - save saveAs -".split(" "),V);else if("1"==urlParams.embed||A.mode==
+App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&A.menus.addMenuItems(P,["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||A.mode==App.MODE_ATLAS)A.menus.addMenuItems(P,["saveAndExit"],V),null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(P,["revisionHistory"],V);P.addSeparator(V)}else A.mode==App.MODE_ATLAS?A.menus.addMenuItems(P,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(A.menus.addMenuItems(P,
+["new"],V),A.menus.addSubmenu("openFrom",P,V),isLocalStorage&&this.addSubmenu("openRecent",P,V),P.addSeparator(V),null!=U&&(U.constructor==DriveFile&&A.menus.addMenuItems(P,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||A.menus.addMenuItems(P,["synchronize"],V)),P.addSeparator(V),A.menus.addSubmenu("save",P,V)):A.menus.addSubmenu("file",P,V));A.menus.addSubmenu("exportAs",P,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?A.menus.addMenuItems(P,["import"],V):
+"1"!=urlParams.noFileMenu&&A.menus.addSubmenu("importFrom",P,V);P.addSeparator(V);"1"!=urlParams.sketch&&A.menus.addMenuItems(P,["outline"],V);A.commentsSupported()&&A.menus.addMenuItems(P,["comments"],V);A.menus.addMenuItems(P,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||A.menus.addMenuItems(P,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=A.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():
+A.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(P,["-","properties"]));P.addSeparator(V);A.menus.addSubmenu("help",P,V);"1"==urlParams.embed||A.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||A.mode==App.MODE_ATLAS)&&A.menus.addMenuItems(P,["-","exit"],V):"1"!=urlParams.noFileMenu&&A.menus.addMenuItems(P,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(P,V){var U=A.getCurrentFile();null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(P,["save",
+"makeCopy","-","rename","moveToFolder"],V):(A.menus.addMenuItems(P,["save","saveAs","-","rename"],V),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,["upload"],V):A.menus.addMenuItems(P,["makeCopy"],V));A.menus.addMenuItems(P,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(P,["-","revisionHistory"],V)})));var H=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(P,V){H.funct(P,V);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||A.menus.addMenuItems(P,["publishLink"],V);A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(P.addSeparator(V),A.menus.addSubmenu("embed",P,V))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(P,V){A.menus.addInsertTableCellItem(P,V)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(P,V){I.funct(P,V);this.addMenuItems(P,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,
+function(P,V){null!=F&&A.menus.addSubmenu("language",P,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&A.mode!=App.MODE_ATLAS&&A.menus.addSubmenu("theme",P,V);A.menus.addSubmenu("units",P,V);P.addSeparator(V);"1"!=urlParams.sketch&&A.menus.addMenuItems(P,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItems(P,["-",
+"showStartScreen","search","scratchpad"],V);P.addSeparator(V);"1"==urlParams.sketch?A.menus.addMenuItems(P,"configuration - copyConnect collapseExpand tooltips -".split(" "),V):(A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(P,"configuration",V),!A.isOfflineApp()&&isLocalStorage&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(P,"plugins",V));var U=A.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(P,["-","showRemoteCursors","shareCursor","-"],V);P.addSeparator(V);
+"1"!=urlParams.sketch&&A.mode!=App.MODE_ATLAS&&this.addMenuItems(P,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(P,["toggleDarkMode"],V);P.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(P,V){A.menus.addMenuItems(P,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var P=this.get("insert"),V=P.funct;P.funct=function(U,
+X){"1"==urlParams.sketch?(A.insertTemplateEnabled&&!A.isOffline()&&A.menus.addMenuItems(U,["insertTemplate"],X),A.menus.addMenuItems(U,["insertImage","insertLink","-"],X),A.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),A.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(V.apply(this,arguments),A.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(P,V,U,X){P.addItem(U,
+null,mxUtils.bind(this,function(){var n=new CreateGraphDialog(A,U,X);A.showDialog(n.container,620,420,!0,!1);n.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(P,V){for(var U=0;U<R.length;U++)"-"==R[U]?P.addSeparator(V):W(P,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(A){var B=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,H){0<B.getSelectionCount()?(A.appendChild(G),G.innerHTML="Selected: "+B.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;this.formatWindow.window.setClosable(!1);var A=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){A.apply(this,arguments);this.minimized?(this.div.style.width=
+"90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function A(ca,
+ba,ja){var ia=F.menus.get(ca),ma=P.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),W);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ca));F.menus.menuCreated(ia,ma,"geMenuItem");null!=ja?
+(ma.style.backgroundImage="url("+ja+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ba||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function B(ca,ba,ja,ia,ma,qa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow="none",oa.style.padding="6px",oa.style.margin="0px");null!=F.statusContainer?R.insertBefore(oa,F.statusContainer):R.appendChild(oa);null!=qa?(oa.style.backgroundImage="url("+qa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat=
"no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(oa,"click",function(na){"disabled"!=oa.getAttribute("disabled")&&ba(na);mxEvent.consume(na)});null==ja&&(oa.style.marginRight="4px");null!=ia&&oa.setAttribute("title",ia);null!=ma&&(ca=function(){ma.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):
-(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ma.addListener("stateChanged",ca),H.addListener("enabledChanged",ca),ca());return oa}function G(ca,ba,ja){ja=document.createElement("div");ja.className="geMenuItem";ja.style.display="inline-block";ja.style.verticalAlign="top";ja.style.marginRight="6px";ja.style.padding="0 4px 0 4px";ja.style.height="30px";ja.style.position="relative";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.boxShadow="none");for(var ia=0;ia<ca.length;ia++)null!=
-ca[ia]&&("1"==urlParams.sketch&&(ca[ia].style.padding="10px 8px",ca[ia].style.width="30px"),ca[ia].style.margin="0px",ca[ia].style.boxShadow="none",ja.appendChild(ca[ia]));null!=ba&&mxUtils.setOpacity(ja,ba);null!=E.statusContainer&&"1"!=urlParams.sketch?S.insertBefore(ja,E.statusContainer):S.appendChild(ja);return ja}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(O.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ca=S.firstChild;null!=ca;){var ba=ca.nextSibling;
-"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=ba}U=S.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>d||"1"==urlParams.sketch;var ja=null;ca||(ja=B("diagram"));ba=ca?B("diagram",null,Editor.drawLogoImage):null;null!=ba&&(ja=ba);G([ja,F(mxResources.get("shapes"),E.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),E.actions.get("image"),ca?Editor.shapesImage:null),F(mxResources.get("format"),
-E.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+E.actions.get("formatPanel").shortcut+")",E.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);ba=B("insert",!0,ca?I:null);G([ba,F(mxResources.get("delete"),E.actions.get("delete").funct,null,mxResources.get("delete"),E.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=d&&(G([Oa,Ia],60),520<=d&&G([pa,640<=d?F("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ba,Editor.zoomInImage):
-null,640<=d?F("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ua,Editor.zoomOutImage):null],60))}null!=ja&&(mxEvent.disableContextMenu(ja),mxEvent.addGestureListeners(ja,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&E.appIconClicked(ia)}),null,null));ba=E.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?
-(null==ya&&(ba=Q.addMenu("",ba.funct),ba.setAttribute("title",mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",S.appendChild(ba),
-ya=ba),E.buttonContainer.style.paddingRight="34px"):(E.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}K.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,
-!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==E.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),ja=E.embedViewport.x+E.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),qa=E.embedViewport.y+
-E.embedViewport.height;this.div.style.left=Math.max(E.embedViewport.x,Math.min(ca,ja-ba))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ia,qa-ma))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));E=this;var H=E.editor.graph;E.toolbar=this.createToolbar(E.createDiv("geToolbar"));E.defaultLibraryName=mxResources.get("untitledLibrary");var S=document.createElement("div");S.className="geMenubarContainer";var U=null,Q=new Menubar(E,
-S);E.statusContainer=E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor="default";var W=E.hideCurrentMenu;E.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var V=E.descriptorChanged;E.descriptorChanged=function(){V.apply(this,arguments);var ca=E.getCurrentFile();
-if(null!=ca&&null!=ca.getTitle()){var ba=ca.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);S.setAttribute("title",ca.getTitle()+(null!=ba?" ("+ba+")":""))}else S.removeAttribute("title")};E.setStatusText(E.editor.getStatus());S.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-S.appendChild(E.buttonContainer);E.menubarContainer=E.buttonContainer;E.tabContainer=document.createElement("div");E.tabContainer.className="geTabContainer";E.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";J=E.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";E.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";E.titlebar=document.createElement("div");E.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var p=document.createElement("div");p.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";E.titlebar.appendChild(p);J.appendChild(E.titlebar)}var C=
-E.menus.get("viewZoom"),I="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null;p=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});E.addListener("darkModeChanged",p);E.addListener("sketchModeChanged",p);var R=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)O.style.left=
-"10px",O.style.top="10px",P.style.left="10px",P.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",E.diagramContainer.setAttribute("data-bounds",E.diagramContainer.style.top+" "+E.diagramContainer.style.left+" "+E.diagramContainer.style.width+" "+E.diagramContainer.style.height),E.diagramContainer.style.top="0px",E.diagramContainer.style.left="0px",E.diagramContainer.style.bottom="0px",E.diagramContainer.style.right="0px",E.diagramContainer.style.width="",E.diagramContainer.style.height=
-"";else{var ca=E.diagramContainer.getAttribute("data-bounds");if(null!=ca){E.diagramContainer.style.background="transparent";E.diagramContainer.removeAttribute("data-bounds");var ba=H.getGraphBounds();ca=ca.split(" ");E.diagramContainer.style.top=ca[0];E.diagramContainer.style.left=ca[1];E.diagramContainer.style.width=ba.width+50+"px";E.diagramContainer.style.height=ba.height+46+"px";E.diagramContainer.style.bottom="";E.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:E.diagramContainer.getBoundingClientRect()}),"*");E.refresh()}O.style.left=E.diagramContainer.offsetLeft+"px";O.style.top=E.diagramContainer.offsetTop-O.offsetHeight-4+"px";P.style.display="";P.style.left=E.diagramContainer.offsetLeft-P.offsetWidth-4+"px";P.style.top=E.diagramContainer.offsetTop+"px";T.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=O.style.top;T.style.right="";E.bottomResizer.style.left=E.diagramContainer.offsetLeft+(E.diagramContainer.offsetWidth-
-E.bottomResizer.offsetWidth)/2+"px";E.bottomResizer.style.top=E.diagramContainer.offsetTop+E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight/2-1+"px";E.rightResizer.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-E.rightResizer.offsetWidth/2-1+"px";E.rightResizer.style.top=E.diagramContainer.offsetTop+(E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight)/2+"px"}E.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";E.rightResizer.style.visibility=
-E.bottomResizer.style.visibility;S.style.display="none";O.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});p=mxUtils.bind(this,function(){Y();b(E,!0);E.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+
-ca.width+4,ca.y)});E.addListener("inlineFullscreenChanged",Y);E.addListener("editInlineStart",p);"1"==urlParams.embedInline&&E.addListener("darkModeChanged",p);E.addListener("editInlineStop",mxUtils.bind(this,function(ca){E.diagramContainer.style.width="10px";E.diagramContainer.style.height="10px";E.diagramContainer.style.border="";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";O.style.visibility="hidden";T.style.visibility="hidden";P.style.display="none"}));if(null!=
-E.hoverIcons){var da=E.hoverIcons.update;E.hoverIcons.update=function(){H.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=H.freehand){var ha=H.freehand.createStyle;H.freehand.createStyle=function(ca){return ha.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){P.className="geToolbarContainer";T.className="geToolbarContainer";O.className="geToolbarContainer";S.className="geToolbarContainer";E.picker=P;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(S,"mouseenter",function(){E.statusContainer.style.display=
-"inline-block"}),mxEvent.addListener(S,"mouseleave",function(){Z||(E.statusContainer.style.display="none")}));var ea=mxUtils.bind(this,function(ca){null!=E.notificationBtn&&(null!=ca?E.notificationBtn.setAttribute("title",ca):E.notificationBtn.removeAttribute("title"))});S.style.visibility=20>S.clientWidth?"hidden":"";E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus());if("1"!=urlParams.embed)if(E.statusContainer.style.display="inline-block",Z=!0,
-1==E.statusContainer.children.length&&""==E.editor.getStatus())S.style.visibility="hidden";else{if(0==E.statusContainer.children.length||1==E.statusContainer.children.length&&"function"===typeof E.statusContainer.firstChild.getAttribute&&null==E.statusContainer.firstChild.getAttribute("class")){var ca=null!=E.statusContainer.firstChild&&"function"===typeof E.statusContainer.firstChild.getAttribute?E.statusContainer.firstChild.getAttribute("title"):E.editor.getStatus();ea(ca);var ba=E.getCurrentFile();
-ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(ba)+"..."?(E.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',E.statusContainer.style.display="inline-block",Z=!0):6<E.buttonContainer.clientWidth&&(E.statusContainer.style.display="none",Z=!1)}else E.statusContainer.style.display="inline-block",ea(null),Z=!0;S.style.visibility=20>S.clientWidth&&!Z?"hidden":""}}));ka=B("diagram",null,Editor.menuImage);
-ka.style.boxShadow="none";ka.style.padding="6px";ka.style.margin="0px";O.appendChild(ka);mxEvent.disableContextMenu(ka);mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);E.statusContainer.style.position="";E.statusContainer.style.display="none";E.statusContainer.style.margin="0px";E.statusContainer.style.padding="6px 0px";
-E.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";E.statusContainer.style.display="inline-block";E.statusContainer.style.textOverflow="ellipsis";E.buttonContainer.style.position="";E.buttonContainer.style.paddingRight="0px";E.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,la=mxUtils.bind(this,function(){P.innerHTML="";if(!va){var ca=function(ia,ma,qa){ia=F("",ia.funct,null,ma,ia,qa);ia.style.width="40px";ia.style.opacity="0.7";return ba(ia,null,"pointer")},ba=function(ia,ma,qa){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=qa?qa:"default";ia.style.margin="2px 0px";P.appendChild(ia);mxUtils.br(P);
-return ia};ba(E.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ba(E.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"),!0,!1,null,!0),mxResources.get("note"));ba(E.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ba(E.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ia=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-ia.geometry.setTerminalPoint(new mxPoint(0,0),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,0),!1);ia.geometry.points=[];ia.geometry.relative=!0;ia.edge=!0;ba(E.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,ia.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ia=ia.clone();ia.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ia.geometry.width=H.defaultEdgeLength+20;ia.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,20),!1);ia=ba(E.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ia.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ia.style.paddingBottom="14px";ia.style.marginBottom="14px"})();ca(E.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var ja=E.actions.get("toggleShapes");ca(ja,mxResources.get("shapes")+
-" ("+ja.shortcut+")",I);ka=B("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ba(ka,null,"pointer");ka=B("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ba(ka,null,"pointer")}"1"!=urlParams.embedInline&&P.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(P.style,
-"transform","translate(0, -50%)"),P.style.padding="8px 6px 4px",P.style.top="50%",P.style.bottom="",P.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,la()):(P.innerHTML="",P.appendChild(aa),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",P.style.padding="0px",P.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
-"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));la();E.addListener("darkModeChanged",la);E.addListener("sketchModeChanged",la)}else E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus())}));if(null!=C){var Aa=function(ca){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(ca)||mxEvent.isShiftDown(ca)?E.actions.get("customZoom").funct():E.actions.get("smartFit").funct()},Ba=E.actions.get("zoomIn"),
-ua=E.actions.get("zoomOut"),Da=E.actions.get("resetView");p=E.actions.get("fullscreen");var Fa=E.actions.get("undo"),Ka=E.actions.get("redo"),Oa=F("",Fa.funct,null,mxResources.get("undo")+" ("+Fa.shortcut+")",Fa,Editor.undoImage),Ia=F("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=F("",p.funct,null,mxResources.get("fullscreen"),p,Editor.fullscreenImage);if(null!=T){C=function(){ta.style.display=null!=E.pages&&("0"!=urlParams.pages||1<E.pages.length||Editor.pagesVisible)?
-"inline-block":"none"};Da=function(){ta.innerHTML="";if(null!=E.currentPage){mxUtils.write(ta,E.currentPage.getName());var ca=null!=E.pages?E.pages.length:1,ba=E.getPageIndex(E.currentPage);ba=null!=ba?ba+1:1;var ja=E.currentPage.getId();ta.setAttribute("title",E.currentPage.getName()+" ("+ba+"/"+ca+")"+(null!=ja?" ["+ja+"]":""))}};Ea.parentNode.removeChild(Ea);var Ca=E.actions.get("delete"),Ma=F("",Ca.funct,null,mxResources.get("delete"),Ca,Editor.trashImage);Ma.style.opacity="0.1";O.appendChild(Ma);
-Ca.addListener("stateChanged",function(){Ma.style.opacity=Ca.enabled?"":"0.1"});var za=function(){Oa.style.display=0<E.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ia.style.display=Oa.style.display;Oa.style.opacity=Fa.enabled?"":"0.1";Ia.style.opacity=Ka.enabled?"":"0.1"};O.appendChild(Oa);O.appendChild(Ia);Fa.addListener("stateChanged",za);Ka.addListener("stateChanged",za);za();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft=
-"";ta.style.top="";ta.style.left="";ta.style.height="100%";ta.style.lineHeight="";ta.style.borderStyle="none";ta.style.padding="3px 0";ta.style.margin="0px";ta.style.background="";ta.style.border="";ta.style.boxShadow="none";ta.style.verticalAlign="top";ta.style.width="auto";ta.style.maxWidth="160px";ta.style.position="relative";ta.style.padding="6px";ta.style.textOverflow="ellipsis";ta.style.opacity="0.8";T.appendChild(ta);E.editor.addListener("pagesPatched",Da);E.editor.addListener("pageSelected",
-Da);E.editor.addListener("pageRenamed",Da);E.editor.addListener("fileLoaded",Da);Da();E.addListener("fileDescriptorChanged",C);E.addListener("pagesVisibleChanged",C);E.editor.addListener("pagesPatched",C);C();C=F("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ua,Editor.zoomOutImage);T.appendChild(C);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
-"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Aa);Aa=F("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ba,Editor.zoomInImage);T.appendChild(Aa);p.visible&&(T.appendChild(Ea),mxEvent.addListener(document,
-"fullscreenchange",function(){Ea.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(p=E.actions.get("exit"),T.appendChild(F("",p.funct,null,mxResources.get("exit"),p,Editor.closeImage)));E.tabContainer.style.visibility="hidden";S.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-O.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(O);X.appendChild(T);P.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(P.style.touchAction="none");X.appendChild(P);window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var pa=F("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Da,Editor.zoomFitImage);S.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";ka=Q.addMenu("100%",
-C.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(E.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(E.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
-"59px";ka.style.right="0px";ka.style.bottom="0px";ka.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ka.style.backgroundPosition="right 6px center";ka.style.backgroundRepeat="no-repeat";X.appendChild(ka)}(function(ca){var ba=mxUtils.bind(this,function(){ca.innerHTML="";mxUtils.write(ca,Math.round(100*E.editor.graph.view.scale)+"%")});E.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);E.editor.addListener("resetGraphView",ba);E.editor.addListener("pageSelected",ba)})(ka);var sa=
-E.setGraphEnabled;E.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(S);X.appendChild(E.diagramContainer);J.appendChild(X);E.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(E.tabContainer);
-var ya=null;N();mxEvent.addListener(window,"resize",function(){N();null!=E.sidebarWindow&&E.sidebarWindow.window.fit();null!=E.formatWindow&&E.formatWindow.window.fit();null!=E.actions.outlineWindow&&E.actions.outlineWindow.window.fit();null!=E.actions.layersWindow&&E.actions.layersWindow.window.fit();null!=E.menus.tagsWindow&&E.menus.tagsWindow.window.fit();null!=E.menus.findWindow&&E.menus.findWindow.window.fit();null!=E.menus.findReplaceWindow&&E.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";P.style.transform="";mxEvent.addGestureListeners(E.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==E.diagramContainer.parentNode&&(E.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),E.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor=
-"row-resize";E.diagramContainer.parentNode.appendChild(J);E.bottomResizer=J;var wa=null,ra=null,xa=null,fa=null;mxEvent.addGestureListeners(J,function(ca){fa=parseInt(E.diagramContainer.style.height);ra=mxEvent.getClientY(ca);H.popupMenuHandler.hideMenu();mxEvent.consume(ca)});J=J.cloneNode(!1);J.style.cursor="col-resize";E.diagramContainer.parentNode.appendChild(J);E.rightResizer=J;mxEvent.addGestureListeners(J,function(ca){xa=parseInt(E.diagramContainer.style.width);wa=mxEvent.getClientX(ca);H.popupMenuHandler.hideMenu();
-mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ba=!1;null!=wa&&(E.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(ca)-wa)+"px",ba=!0);null!=ra&&(E.diagramContainer.style.height=Math.max(20,fa+mxEvent.getClientY(ca)-ra)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:E.diagramContainer.getBoundingClientRect()}),"*"),R(),E.refresh())},function(ca){null==wa&&null==
-ra||mxEvent.consume(ca);ra=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";O.style.visibility="hidden";T.style.visibility="hidden";P.style.display="none"}"1"==urlParams.prefetchFonts&&E.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,u,t,D){var c=u.y,e=u.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=u){var m=this,q=new mxCellState,v=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+e;q.y=d.y+c;q.width=d.width;q.height=d.height;for(var A=[],z=[],L=0;L<this.states.length;L++){var M=this.states[L];M instanceof mxCellState&&(D||!this.graph.isCellSelected(M.cell))&&((q.x>=M.x&&q.x<=M.x+M.width||M.x>=q.x&&M.x<=q.x+q.width)&&(q.y>
-M.y+M.height+4||q.y+q.height+4<M.y)?A.push(M):(q.y>=M.y&&q.y<=M.y+M.height||M.y>=q.y&&M.y<=q.y+q.height)&&(q.x>M.x+M.width+4||q.x+q.width+4<M.x)&&z.push(M))}var n=0,x=0,K=M=0,B=0,F=0,G=0,N=0,J=5*v;if(1<A.length){A.push(q);A.sort(function(U,Q){return U.y-Q.y});var E=!1;L=q==A[0];v=q==A[A.length-1];if(!L&&!v)for(L=1;L<A.length-1;L++)if(q==A[L]){v=A[L-1];L=A[L+1];M=x=K=(L.y-v.y-v.height-q.height)/2;break}for(L=0;L<A.length-1;L++){v=A[L];var H=A[L+1],S=q==v||q==H;H=H.y-v.y-v.height;E|=q==v;if(0==x&&0==
-n)x=H,n=1;else if(Math.abs(x-H)<=(S||1==L&&E?y:0))n+=1;else if(1<n&&E){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!E)n=0,M=x=0!=K?K:0,A.splice(0,0==L?1:L),L=-1;else break;0!=M||S||(x=M=H)}3==A.length&&A[1]==q&&(M=0)}if(1<z.length){z.push(q);z.sort(function(U,Q){return U.x-Q.x});E=!1;L=q==z[0];v=q==z[z.length-1];if(!L&&!v)for(L=1;L<z.length-1;L++)if(q==z[L]){v=z[L-1];L=z[L+1];G=F=N=(L.x-v.x-v.width-q.width)/2;break}for(L=0;L<z.length-1;L++){v=z[L];H=z[L+1];S=q==v||q==H;H=H.x-v.x-v.width;E|=q==v;
-if(0==F&&0==B)F=H,B=1;else if(Math.abs(F-H)<=(S||1==L&&E?y:0))B+=1;else if(1<B&&E){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!E)B=0,G=F=0!=N?N:0,z.splice(0,0==L?1:L),L=-1;else break;0!=G||S||(F=G=H)}3==z.length&&z[1]==q&&(G=0)}y=function(U,Q,W,V){var X=[];if(V){V=J;var p=0}else V=0,p=J;X.push(new mxPoint(U.x-V,U.y-p));X.push(new mxPoint(U.x+V,U.y+p));X.push(U);X.push(Q);X.push(new mxPoint(Q.x-V,Q.y-p));X.push(new mxPoint(Q.x+V,Q.y+p));if(null!=W)return W.points=X,W;U=new mxPolyline(X,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(m.graph.getView().getOverlayPane());return U};F=function(U,Q){if(U&&null!=m.guidesArrHor)for(U=0;U<m.guidesArrHor.length;U++)m.guidesArrHor[U].node.style.visibility="hidden";if(Q&&null!=m.guidesArrVer)for(U=0;U<m.guidesArrVer.length;U++)m.guidesArrVer[U].node.style.visibility="hidden"};if(1<B&&B==z.length-1){B=[];N=m.guidesArrHor;g=[];e=0;L=z[0]==q?1:0;E=z[L].y+z[L].height;if(0<G)for(L=0;L<z.length-1;L++)v=
-z[L],H=z[L+1],q==v?(e=H.x-v.width-G,g.push(new mxPoint(e+v.width+J,E)),g.push(new mxPoint(H.x-J,E))):q==H?(g.push(new mxPoint(v.x+v.width+J,E)),e=v.x+v.width+G,g.push(new mxPoint(e-J,E))):(g.push(new mxPoint(v.x+v.width+J,E)),g.push(new mxPoint(H.x-J,E)));else v=z[0],L=z[2],e=v.x+v.width+(L.x-v.x-v.width-q.width)/2,g.push(new mxPoint(v.x+v.width+J,E)),g.push(new mxPoint(e-J,E)),g.push(new mxPoint(e+q.width+J,E)),g.push(new mxPoint(L.x-J,E));for(L=0;L<g.length;L+=2)z=g[L],G=g[L+1],z=y(z,G,null!=N?
-N[L/2]:null),z.node.style.visibility="visible",z.redraw(),B.push(z);for(L=g.length/2;null!=N&&L<N.length;L++)N[L].destroy();m.guidesArrHor=B;e-=d.x;g=!0}else F(!0);if(1<n&&n==A.length-1){B=[];N=m.guidesArrVer;k=[];c=0;L=A[0]==q?1:0;n=A[L].x+A[L].width;if(0<M)for(L=0;L<A.length-1;L++)v=A[L],H=A[L+1],q==v?(c=H.y-v.height-M,k.push(new mxPoint(n,c+v.height+J)),k.push(new mxPoint(n,H.y-J))):q==H?(k.push(new mxPoint(n,v.y+v.height+J)),c=v.y+v.height+M,k.push(new mxPoint(n,c-J))):(k.push(new mxPoint(n,v.y+
-v.height+J)),k.push(new mxPoint(n,H.y-J)));else v=A[0],L=A[2],c=v.y+v.height+(L.y-v.y-v.height-q.height)/2,k.push(new mxPoint(n,v.y+v.height+J)),k.push(new mxPoint(n,c-J)),k.push(new mxPoint(n,c+q.height+J)),k.push(new mxPoint(n,L.y-J));for(L=0;L<k.length;L+=2)z=k[L],G=k[L+1],z=y(z,G,null!=N?N[L/2]:null,!0),z.node.style.visibility="visible",z.redraw(),B.push(z);for(L=k.length/2;null!=N&&L<N.length;L++)N[L].destroy();m.guidesArrVer=B;c-=d.y;k=!0}else F(!1,!0)}if(g||k)return q=new mxPoint(e,c),A=b.call(this,
-d,q,t,D),g&&!k?q.y=A.y:k&&!g&&(q.x=A.x),A.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var u=this.guidesArrVer,t=this.guidesArrHor;if(null!=u)for(var D=0;D<u.length;D++)u[D].node.style.visibility=d?"visible":"hidden";if(null!=
-t)for(D=0;D<t.length;D++)t[D].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,u=this.guidesArrHor;if(null!=d){for(var t=0;t<d.length;t++)d[t].destroy();this.guidesArrVer=null}if(null!=u){for(t=0;t<u.length;t++)u[t].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function u(){var n=b.diagramContainer;m.style.top=n.offsetTop-e+"px";m.style.left=n.offsetLeft-e+"px";m.style.width=(l?0:n.offsetWidth)+e+"px";m.style.height=(l?n.offsetHeight:0)+e+"px"}function t(n,x,K){if(null!=D)return n;var B;return function(){var F=this,G=arguments,N=K&&!B;clearTimeout(B);B=setTimeout(function(){B=null;K||n.apply(F,G)},x);N&&n.apply(F,G)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ma.addListener("stateChanged",ca),I.addListener("enabledChanged",ca),ca());return oa}function G(ca,ba,ja){ja=document.createElement("div");ja.className="geMenuItem";ja.style.display="inline-block";ja.style.verticalAlign="top";ja.style.marginRight="6px";ja.style.padding="0 4px 0 4px";ja.style.height="30px";ja.style.position="relative";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.boxShadow="none");for(var ia=0;ia<ca.length;ia++)null!=
+ca[ia]&&("1"==urlParams.sketch&&(ca[ia].style.padding="10px 8px",ca[ia].style.width="30px"),ca[ia].style.margin="0px",ca[ia].style.boxShadow="none",ja.appendChild(ca[ia]));null!=ba&&mxUtils.setOpacity(ja,ba);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(ja,F.statusContainer):R.appendChild(ja);return ja}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(O.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px");else{for(var ca=R.firstChild;null!=ca;){var ba=ca.nextSibling;
+"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=ba}W=R.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>d||"1"==urlParams.sketch;var ja=null;ca||(ja=A("diagram"));ba=ca?A("diagram",null,Editor.drawLogoImage):null;null!=ba&&(ja=ba);G([ja,B(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ca?Editor.shapesImage:null),B(mxResources.get("format"),
+F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);ba=A("insert",!0,ca?J:null);G([ba,B(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=d&&(G([Oa,Ia],60),520<=d&&G([pa,640<=d?B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ba,Editor.zoomInImage):
+null,640<=d?B("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ua,Editor.zoomOutImage):null],60))}null!=ja&&(mxEvent.disableContextMenu(ja),mxEvent.addGestureListeners(ja,mxUtils.bind(this,function(ia){(mxEvent.isShiftDown(ia)||mxEvent.isAltDown(ia)||mxEvent.isMetaDown(ia)||mxEvent.isControlDown(ia)||mxEvent.isPopupTrigger(ia))&&F.appIconClicked(ia)}),null,null));ba=F.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?
+(null==ya&&(ba=P.addMenu("",ba.funct),ba.setAttribute("title",mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ba),
+ya=ba),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}E.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var H=document.createElement("div");H.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+H.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(H);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),ja=F.embedViewport.x+F.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),qa=F.embedViewport.y+
+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(ca,ja-ba))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ia,qa-ma))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
+(this.initFormatWindow(),H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>H)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var I=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,P=new Menubar(F,
+R);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var ca=F.getCurrentFile();
+if(null!=ca&&null!=ca.getTitle()){var ba=ca.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);R.setAttribute("title",ca.getTitle()+(null!=ba?" ("+ba+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";H=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var n=document.createElement("div");n.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(n);H.appendChild(F.titlebar)}var C=
+F.menus.get("viewZoom"),J="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null;n=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});F.addListener("darkModeChanged",n);F.addListener("sketchModeChanged",n);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)O.style.left=
+"10px",O.style.top="10px",Q.style.left="10px",Q.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
+"";else{var ca=F.diagramContainer.getAttribute("data-bounds");if(null!=ca){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var ba=I.getGraphBounds();ca=ca.split(" ");F.diagramContainer.style.top=ca[0];F.diagramContainer.style.left=ca[1];F.diagramContainer.style.width=ba.width+50+"px";F.diagramContainer.style.height=ba.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}O.style.left=F.diagramContainer.offsetLeft+"px";O.style.top=F.diagramContainer.offsetTop-O.offsetHeight-4+"px";Q.style.display="";Q.style.left=F.diagramContainer.offsetLeft-Q.offsetWidth-4+"px";Q.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=O.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
+F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
+F.bottomResizer.style.visibility;R.style.display="none";O.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});n=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+
+ca.width+4,ca.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",n);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",n);F.addListener("editInlineStop",mxUtils.bind(this,function(ca){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";O.style.visibility="hidden";T.style.visibility="hidden";Q.style.display="none"}));if(null!=
+F.hoverIcons){var da=F.hoverIcons.update;F.hoverIcons.update=function(){I.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=I.freehand){var ha=I.freehand.createStyle;I.freehand.createStyle=function(ca){return ha.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";T.className="geToolbarContainer";O.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=Q;var Z=!1;"1"!=urlParams.embed&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display=
+"inline-block"}),mxEvent.addListener(R,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var ea=mxUtils.bind(this,function(ca){null!=F.notificationBtn&&(null!=ca?F.notificationBtn.setAttribute("title",ca):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed)if(F.statusContainer.style.display="inline-block",Z=!0,
+1==F.statusContainer.children.length&&""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ca=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();ea(ca);var ba=F.getCurrentFile();
+ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(ba)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",ea(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));ka=A("diagram",null,Editor.menuImage);
+ka.style.boxShadow="none";ka.style.padding="6px";ka.style.margin="0px";O.appendChild(ka);mxEvent.disableContextMenu(ka);mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";
+F.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,la=mxUtils.bind(this,function(){Q.innerHTML="";if(!va){var ca=function(ia,ma,qa){ia=B("",ia.funct,null,ma,ia,qa);ia.style.width="40px";ia.style.opacity="0.7";return ba(ia,null,"pointer")},ba=function(ia,ma,qa){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=qa?qa:"default";ia.style.margin="2px 0px";Q.appendChild(ia);mxUtils.br(Q);
+return ia};ba(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ba(F.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"),!0,!1,null,!0),mxResources.get("note"));ba(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ba(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ia=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+ia.geometry.setTerminalPoint(new mxPoint(0,0),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,0),!1);ia.geometry.points=[];ia.geometry.relative=!0;ia.edge=!0;ba(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,ia.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ia=ia.clone();ia.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ia.geometry.width=I.defaultEdgeLength+20;ia.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);ia.geometry.setTerminalPoint(new mxPoint(ia.geometry.width,20),!1);ia=ba(F.sidebar.createEdgeTemplateFromCells([ia],ia.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ia.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ia.style.paddingBottom="14px";ia.style.marginBottom="14px"})();ca(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var ja=F.actions.get("toggleShapes");ca(ja,mxResources.get("shapes")+
+" ("+ja.shortcut+")",J);ka=A("table",null,Editor.calendarImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ba(ka,null,"pointer");ka=A("insert",null,Editor.plusImage);ka.style.boxShadow="none";ka.style.opacity="0.7";ka.style.padding="6px";ka.style.margin="0px";ka.style.width="37px";ba(ka,null,"pointer")}"1"!=urlParams.embedInline&&Q.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(Q.style,
+"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),va=!1,la()):(Q.innerHTML="",Q.appendChild(aa),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",Q.style.padding="0px",Q.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));la();F.addListener("darkModeChanged",la);F.addListener("sketchModeChanged",la)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=C){var Aa=function(ca){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(ca)||mxEvent.isShiftDown(ca)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Ba=F.actions.get("zoomIn"),
+ua=F.actions.get("zoomOut"),Da=F.actions.get("resetView");n=F.actions.get("fullscreen");var Fa=F.actions.get("undo"),Ka=F.actions.get("redo"),Oa=B("",Fa.funct,null,mxResources.get("undo")+" ("+Fa.shortcut+")",Fa,Editor.undoImage),Ia=B("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=B("",n.funct,null,mxResources.get("fullscreen"),n,Editor.fullscreenImage);if(null!=T){C=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
+"inline-block":"none"};Da=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var ca=null!=F.pages?F.pages.length:1,ba=F.getPageIndex(F.currentPage);ba=null!=ba?ba+1:1;var ja=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ba+"/"+ca+")"+(null!=ja?" ["+ja+"]":""))}};Ea.parentNode.removeChild(Ea);var Ca=F.actions.get("delete"),Ma=B("",Ca.funct,null,mxResources.get("delete"),Ca,Editor.trashImage);Ma.style.opacity="0.1";O.appendChild(Ma);
+Ca.addListener("stateChanged",function(){Ma.style.opacity=Ca.enabled?"":"0.1"});var za=function(){Oa.style.display=0<F.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";Ia.style.display=Oa.style.display;Oa.style.opacity=Fa.enabled?"":"0.1";Ia.style.opacity=Ka.enabled?"":"0.1"};O.appendChild(Oa);O.appendChild(Ia);Fa.addListener("stateChanged",za);Ka.addListener("stateChanged",za);za();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft=
+"";ta.style.top="";ta.style.left="";ta.style.height="100%";ta.style.lineHeight="";ta.style.borderStyle="none";ta.style.padding="3px 0";ta.style.margin="0px";ta.style.background="";ta.style.border="";ta.style.boxShadow="none";ta.style.verticalAlign="top";ta.style.width="auto";ta.style.maxWidth="160px";ta.style.position="relative";ta.style.padding="6px";ta.style.textOverflow="ellipsis";ta.style.opacity="0.8";T.appendChild(ta);F.editor.addListener("pagesPatched",Da);F.editor.addListener("pageSelected",
+Da);F.editor.addListener("pageRenamed",Da);F.editor.addListener("fileLoaded",Da);Da();F.addListener("fileDescriptorChanged",C);F.addListener("pagesVisibleChanged",C);F.editor.addListener("pagesPatched",C);C();C=B("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ua,Editor.zoomOutImage);T.appendChild(C);var ka=document.createElement("div");ka.innerHTML="100%";ka.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");ka.style.display=
+"inline-block";ka.style.cursor="pointer";ka.style.textAlign="center";ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.verticalAlign="top";ka.style.padding="6px 0";ka.style.fontSize="14px";ka.style.width="40px";ka.style.opacity="0.4";T.appendChild(ka);mxEvent.addListener(ka,"click",Aa);Aa=B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ba,Editor.zoomInImage);T.appendChild(Aa);n.visible&&(T.appendChild(Ea),mxEvent.addListener(document,
+"fullscreenchange",function(){Ea.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(n=F.actions.get("exit"),T.appendChild(B("",n.funct,null,mxResources.get("exit"),n,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+O.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(O);X.appendChild(T);Q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(Q.style.touchAction="none");X.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var pa=B("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Da,Editor.zoomFitImage);R.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";ka=P.addMenu("100%",
+C.funct);ka.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ka.style.whiteSpace="nowrap";ka.style.paddingRight="10px";ka.style.textDecoration="none";ka.style.textDecoration="none";ka.style.overflow="hidden";ka.style.visibility="hidden";ka.style.textAlign="center";ka.style.cursor="pointer";ka.style.height=parseInt(F.tabContainerHeight)-1+"px";ka.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ka.style.position="absolute";ka.style.display="block";ka.style.fontSize="12px";ka.style.width=
+"59px";ka.style.right="0px";ka.style.bottom="0px";ka.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ka.style.backgroundPosition="right 6px center";ka.style.backgroundRepeat="no-repeat";X.appendChild(ka)}(function(ca){var ba=mxUtils.bind(this,function(){ca.innerHTML="";mxUtils.write(ca,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);F.editor.addListener("resetGraphView",ba);F.editor.addListener("pageSelected",ba)})(ka);var sa=
+F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(F.diagramContainer);H.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
+var ya=null;M();mxEvent.addListener(window,"resize",function(){M();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";Q.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),F.sendEmbeddedSvgExport())});H=document.createElement("div");H.style.position="absolute";H.style.width="10px";H.style.height="10px";H.style.borderRadius="5px";H.style.border="1px solid gray";H.style.background="#ffffff";H.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(H);F.bottomResizer=H;var wa=null,ra=null,xa=null,fa=null;mxEvent.addGestureListeners(H,function(ca){fa=parseInt(F.diagramContainer.style.height);ra=mxEvent.getClientY(ca);I.popupMenuHandler.hideMenu();mxEvent.consume(ca)});H=H.cloneNode(!1);H.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(H);F.rightResizer=H;mxEvent.addGestureListeners(H,function(ca){xa=parseInt(F.diagramContainer.style.width);wa=mxEvent.getClientX(ca);I.popupMenuHandler.hideMenu();
+mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ba=!1;null!=wa&&(F.diagramContainer.style.width=Math.max(20,xa+mxEvent.getClientX(ca)-wa)+"px",ba=!0);null!=ra&&(F.diagramContainer.style.height=Math.max(20,fa+mxEvent.getClientY(ca)-ra)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(ca){null==wa&&null==
+ra||mxEvent.consume(ca);ra=wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";O.style.visibility="hidden";T.style.visibility="hidden";Q.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,u,t,D){var c=u.y,e=u.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=u){var m=this,p=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);p.x=d.x+e;p.y=d.y+c;p.width=d.width;p.height=d.height;for(var z=[],y=[],L=0;L<this.states.length;L++){var N=this.states[L];N instanceof mxCellState&&(D||!this.graph.isCellSelected(N.cell))&&((p.x>=N.x&&p.x<=N.x+N.width||N.x>=p.x&&N.x<=p.x+p.width)&&(p.y>
+N.y+N.height+4||p.y+p.height+4<N.y)?z.push(N):(p.y>=N.y&&p.y<=N.y+N.height||N.y>=p.y&&N.y<=p.y+p.height)&&(p.x>N.x+N.width+4||p.x+p.width+4<N.x)&&y.push(N))}var K=0,q=0,E=N=0,A=0,B=0,G=0,M=0,H=5*v;if(1<z.length){z.push(p);z.sort(function(W,P){return W.y-P.y});var F=!1;L=p==z[0];v=p==z[z.length-1];if(!L&&!v)for(L=1;L<z.length-1;L++)if(p==z[L]){v=z[L-1];L=z[L+1];N=q=E=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<z.length-1;L++){v=z[L];var I=z[L+1],R=p==v||p==I;I=I.y-v.y-v.height;F|=p==v;if(0==q&&0==
+K)q=I,K=1;else if(Math.abs(q-I)<=(R||1==L&&F?x:0))K+=1;else if(1<K&&F){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!F)K=0,N=q=0!=E?E:0,z.splice(0,0==L?1:L),L=-1;else break;0!=N||R||(q=N=I)}3==z.length&&z[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(W,P){return W.x-P.x});F=!1;L=p==y[0];v=p==y[y.length-1];if(!L&&!v)for(L=1;L<y.length-1;L++)if(p==y[L]){v=y[L-1];L=y[L+1];G=B=M=(L.x-v.x-v.width-p.width)/2;break}for(L=0;L<y.length-1;L++){v=y[L];I=y[L+1];R=p==v||p==I;I=I.x-v.x-v.width;F|=p==v;
+if(0==B&&0==A)B=I,A=1;else if(Math.abs(B-I)<=(R||1==L&&F?x:0))A+=1;else if(1<A&&F){y=y.slice(0,L+1);break}else if(3<=y.length-L&&!F)A=0,G=B=0!=M?M:0,y.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(B=G=I)}3==y.length&&y[1]==p&&(G=0)}x=function(W,P,V,U){var X=[];if(U){U=H;var n=0}else U=0,n=H;X.push(new mxPoint(W.x-U,W.y-n));X.push(new mxPoint(W.x+U,W.y+n));X.push(W);X.push(P);X.push(new mxPoint(P.x-U,P.y-n));X.push(new mxPoint(P.x+U,P.y+n));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(m.graph.getView().getOverlayPane());return W};B=function(W,P){if(W&&null!=m.guidesArrHor)for(W=0;W<m.guidesArrHor.length;W++)m.guidesArrHor[W].node.style.visibility="hidden";if(P&&null!=m.guidesArrVer)for(W=0;W<m.guidesArrVer.length;W++)m.guidesArrVer[W].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];M=m.guidesArrHor;g=[];e=0;L=y[0]==p?1:0;F=y[L].y+y[L].height;if(0<G)for(L=0;L<y.length-1;L++)v=
+y[L],I=y[L+1],p==v?(e=I.x-v.width-G,g.push(new mxPoint(e+v.width+H,F)),g.push(new mxPoint(I.x-H,F))):p==I?(g.push(new mxPoint(v.x+v.width+H,F)),e=v.x+v.width+G,g.push(new mxPoint(e-H,F))):(g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(I.x-H,F)));else v=y[0],L=y[2],e=v.x+v.width+(L.x-v.x-v.width-p.width)/2,g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(e-H,F)),g.push(new mxPoint(e+p.width+H,F)),g.push(new mxPoint(L.x-H,F));for(L=0;L<g.length;L+=2)y=g[L],G=g[L+1],y=x(y,G,null!=M?
+M[L/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=g.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrHor=A;e-=d.x;g=!0}else B(!0);if(1<K&&K==z.length-1){A=[];M=m.guidesArrVer;k=[];c=0;L=z[0]==p?1:0;K=z[L].x+z[L].width;if(0<N)for(L=0;L<z.length-1;L++)v=z[L],I=z[L+1],p==v?(c=I.y-v.height-N,k.push(new mxPoint(K,c+v.height+H)),k.push(new mxPoint(K,I.y-H))):p==I?(k.push(new mxPoint(K,v.y+v.height+H)),c=v.y+v.height+N,k.push(new mxPoint(K,c-H))):(k.push(new mxPoint(K,v.y+
+v.height+H)),k.push(new mxPoint(K,I.y-H)));else v=z[0],L=z[2],c=v.y+v.height+(L.y-v.y-v.height-p.height)/2,k.push(new mxPoint(K,v.y+v.height+H)),k.push(new mxPoint(K,c-H)),k.push(new mxPoint(K,c+p.height+H)),k.push(new mxPoint(K,L.y-H));for(L=0;L<k.length;L+=2)y=k[L],G=k[L+1],y=x(y,G,null!=M?M[L/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=k.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrVer=A;c-=d.y;k=!0}else B(!1,!0)}if(g||k)return p=new mxPoint(e,c),z=b.call(this,
+d,p,t,D),g&&!k?p.y=z.y:k&&!g&&(p.x=z.x),z.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;B(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var u=this.guidesArrVer,t=this.guidesArrHor;if(null!=u)for(var D=0;D<u.length;D++)u[D].node.style.visibility=d?"visible":"hidden";if(null!=
+t)for(D=0;D<t.length;D++)t[D].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,u=this.guidesArrHor;if(null!=d){for(var t=0;t<d.length;t++)d[t].destroy();this.guidesArrVer=null}if(null!=u){for(t=0;t<u.length;t++)u[t].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function u(){var K=b.diagramContainer;m.style.top=K.offsetTop-e+"px";m.style.left=K.offsetLeft-e+"px";m.style.width=(l?0:K.offsetWidth)+e+"px";m.style.height=(l?K.offsetHeight:0)+e+"px"}function t(K,q,E){if(null!=D)return K;var A;return function(){var B=this,G=arguments,M=E&&!A;clearTimeout(A);A=setTimeout(function(){A=null;E||K.apply(B,G)},q);M&&K.apply(B,G)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
c=window.cancelAnimationFrame||window.mozCancelAnimationFrame,e=this.RULER_THICKNESS,g=this;this.unit=f;var k=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},m=document.createElement("div");m.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){k=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};m.style.background=k.bkgClr;m.style[l?"borderRight":"borderBottom"]="0.5px solid "+k.strokeClr;m.style.borderLeft="0.5px solid "+k.strokeClr});this.updateStyle();document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=b.refresh;b.refresh=
-function(n){g.editorUiRefresh.apply(b,arguments);u()};u();var q=document.createElement("canvas");q.width=m.offsetWidth;q.height=m.offsetHeight;m.style.overflow="hidden";q.style.position="relative";m.appendChild(q);var v=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=m;this.canvas=q;var A=function(n,x,K,B,F){n=Math.round(n);x=Math.round(x);K=Math.round(K);B=Math.round(B);v.beginPath();v.moveTo(n+.5,x+.5);v.lineTo(K+.5,B+.5);v.stroke();F&&(l?(v.save(),v.translate(n,x),
-v.rotate(-Math.PI/2),v.fillText(F,0,0),v.restore()):v.fillText(F,n,x))},z=function(){v.clearRect(0,0,q.width,q.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var n=y.view.scale,x=y.view.getBackgroundPageBounds(),K=y.view.translate,B=y.pageVisible;K=B?e+(l?x.y-y.container.scrollTop:x.x-y.container.scrollLeft):e+(l?K.y*n-y.container.scrollTop:K.x*n-y.container.scrollLeft);var F=0;B&&(F=y.getPageLayout(),F=l?F.y*y.pageFormat.height:
-F.x*y.pageFormat.width);var G;switch(g.unit){case mxConstants.POINTS:var N=G=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=n||4<=n?8:16,N=mxConstants.PIXELS_PER_INCH/G,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var E=N;2<=n?E=N/(2*Math.floor(n/2)):.5>=n&&(E=N*Math.floor(1/n/2)*(g.unit==
-mxConstants.MILLIMETERS?2:1));N=null;x=B?Math.min(K+(l?x.height:x.width),l?q.height:q.width):l?q.height:q.width;if(B)if(v.fillStyle=k.outBkgClr,l){var H=K-e;0<H&&v.fillRect(0,e,e,H);x<q.height&&v.fillRect(0,x,e,q.height)}else H=K-e,0<H&&v.fillRect(e,0,H,e),x<q.width&&v.fillRect(x,0,q.width,e);v.fillStyle=k.fontClr;for(B=B?K:K%(E*n);B<=x;B+=E*n)if(H=Math.round((B-K)/n/E),!(B<e||H==N)){N=H;var S=null;0==H%G&&(S=g.formatText(F+H*E)+"");l?A(e-J[Math.abs(H)%G],B,e,B,S):A(B,e-J[Math.abs(H)%G],B,e,S)}v.lineWidth=
-1;A(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,M=function(){null!=D?(null!=c&&c(L),L=D(z)):z()};this.drawRuler=M;this.sizeListener=f=t(function(){var n=y.container;l?(n=n.offsetHeight+e,q.height!=n&&(q.height=n,m.style.height=n+"px",M())):(n=n.offsetWidth+e,q.width!=n&&(q.width=n,m.style.width=n+"px",M()))},10);this.pageListener=function(){M()};this.scrollListener=d=t(function(){var n=l?y.container.scrollTop:y.container.scrollLeft;g.lastScroll!=n&&(g.lastScroll=n,M())},10);
-this.unitListener=function(n,x){g.setUnit(x.getProperty("unit"))};y.addListener(mxEvent.SIZE,f);y.container.addEventListener("scroll",d);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(n){k=n;m.style.background=k.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(n,x,K,B){if(l&&4<n.height||
-!l&&4<n.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(V){}var F=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=n.y+F.y+e-this.graph.container.scrollTop;var N=0;var J=G+n.height/2;var E=e/2;var H=G+n.height;var S=0;var U=v.getImageData(N,G-1,e,
-3);A(N,G,e,G);G--;var Q=v.getImageData(E,J-1,e,3);A(E,J,e,J);J--;var W=v.getImageData(S,H-1,e,3);A(S,H,e,H);H--}else G=0,N=n.x+F.x+e-this.graph.container.scrollLeft,J=e/2,E=N+n.width/2,H=0,S=N+n.width,U=v.getImageData(N-1,G,3,e),A(N,G,N,e),N--,Q=v.getImageData(E-1,J,3,e),A(E,J,E,e),E--,W=v.getImageData(S-1,H,3,e),A(S,H,S,e),S--;if(null==g.guidePart||g.guidePart.x1!=N||g.guidePart.y1!=G)g.guidePart={imgData1:U,x1:N,y1:G,imgData2:Q,x2:E,y2:J,imgData3:W,x3:S,y3:H}}catch(V){}}else F=g.origGuideMove.apply(this,
-arguments);return F};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var n=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(x){}return n}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(K){g.editorUiRefresh.apply(b,arguments);u()};u();var p=document.createElement("canvas");p.width=m.offsetWidth;p.height=m.offsetHeight;m.style.overflow="hidden";p.style.position="relative";m.appendChild(p);var v=p.getContext("2d");this.ui=b;var x=b.editor.graph;this.graph=x;this.container=m;this.canvas=p;var z=function(K,q,E,A,B){K=Math.round(K);q=Math.round(q);E=Math.round(E);A=Math.round(A);v.beginPath();v.moveTo(K+.5,q+.5);v.lineTo(E+.5,A+.5);v.stroke();B&&(l?(v.save(),v.translate(K,q),
+v.rotate(-Math.PI/2),v.fillText(B,0,0),v.restore()):v.fillText(B,K,q))},y=function(){v.clearRect(0,0,p.width,p.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var K=x.view.scale,q=x.view.getBackgroundPageBounds(),E=x.view.translate,A=x.pageVisible;E=A?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?E.y*K-x.container.scrollTop:E.x*K-x.container.scrollLeft);var B=0;A&&(B=x.getPageLayout(),B=l?B.y*x.pageFormat.height:
+B.x*x.pageFormat.width);var G;switch(g.unit){case mxConstants.POINTS:var M=G=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=K||4<=K?8:16,M=mxConstants.PIXELS_PER_INCH/G,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=M;2<=K?F=M/(2*Math.floor(K/2)):.5>=K&&(F=M*Math.floor(1/K/2)*(g.unit==
+mxConstants.MILLIMETERS?2:1));M=null;q=A?Math.min(E+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(A)if(v.fillStyle=k.outBkgClr,l){var I=E-e;0<I&&v.fillRect(0,e,e,I);q<p.height&&v.fillRect(0,q,e,p.height)}else I=E-e,0<I&&v.fillRect(e,0,I,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(A=A?E:E%(F*K);A<=q;A+=F*K)if(I=Math.round((A-E)/K/F),!(A<e||I==M)){M=I;var R=null;0==I%G&&(R=g.formatText(B+I*F)+"");l?z(e-H[Math.abs(I)%G],A,e,A,R):z(A,e-H[Math.abs(I)%G],A,e,R)}v.lineWidth=
+1;z(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,N=function(){null!=D?(null!=c&&c(L),L=D(y)):y()};this.drawRuler=N;this.sizeListener=f=t(function(){var K=x.container;l?(K=K.offsetHeight+e,p.height!=K&&(p.height=K,m.style.height=K+"px",N())):(K=K.offsetWidth+e,p.width!=K&&(p.width=K,m.style.width=K+"px",N()))},10);this.pageListener=function(){N()};this.scrollListener=d=t(function(){var K=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=K&&(g.lastScroll=K,N())},10);
+this.unitListener=function(K,q){g.setUnit(q.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(K){k=K;m.style.background=k.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(K,q,E,A){if(l&&4<K.height||
+!l&&4<K.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(U){}var B=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=K.y+B.y+e-this.graph.container.scrollTop;var M=0;var H=G+K.height/2;var F=e/2;var I=G+K.height;var R=0;var W=v.getImageData(M,G-1,e,
+3);z(M,G,e,G);G--;var P=v.getImageData(F,H-1,e,3);z(F,H,e,H);H--;var V=v.getImageData(R,I-1,e,3);z(R,I,e,I);I--}else G=0,M=K.x+B.x+e-this.graph.container.scrollLeft,H=e/2,F=M+K.width/2,I=0,R=M+K.width,W=v.getImageData(M-1,G,3,e),z(M,G,M,e),M--,P=v.getImageData(F-1,H,3,e),z(F,H,F,e),F--,V=v.getImageData(R-1,I,3,e),z(R,I,R,e),R--;if(null==g.guidePart||g.guidePart.x1!=M||g.guidePart.y1!=G)g.guidePart={imgData1:W,x1:M,y1:G,imgData2:P,x2:F,y2:H,imgData3:V,x3:R,y3:I}}catch(U){}}else B=g.origGuideMove.apply(this,
+arguments);return B};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var K=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(q){}return K}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,f){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var u=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
function(t){u=null!=b.currentMenu;mxEvent.consume(t)}),null,mxUtils.bind(this,function(t){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(t)||mxEvent.isPopupTrigger(t))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!u){var D=new mxPopupMenu(mxUtils.bind(this,function(g,k){b.menus.addMenuItems(g,["points","inches","millimeters","meters"],k)}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=
!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);b.resetCurrentMenu();D.destroy()});var c=mxEvent.getClientX(t),e=mxEvent.getClientY(t);D.popup(c,e,null,t);b.setCurrentMenu(D,d)}mxEvent.consume(t)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],t,D=[],c,e=!1,g=!0,k=!0,m=!0,q=!0,v=[],y=!1,A=!0,z=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},M=!1;this.setClosedPath=function(J){e=J};this.setAutoClose=function(J){g=J};this.setAutoInsert=
-function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){y=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){n(!0)};this.isDrawing=function(){return y};var x=mxUtils.bind(this,function(J){if(d){var E=c.length,H=A&&0<D.length&&null!=c&&2>c.length;H||D.push.apply(D,c);c=[];D.push(null);u.push(d);d=null;(H||k)&&this.stopDrawing();k&&2<=E&&this.startDrawing();mxEvent.consume(J)}}),K=new mxCell;K.edge=!0;var B=function(){var J=b.getCurrentCellStyle(K);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var E=";fillColor=none;";M&&(E=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+E};this.stopDrawing=function(){if(0<u.length){if(M){for(var J=[],E=0;E<D.length;E++)null!=D[E]&&J.push([D[E].x,D[E].y]);J=PerfectFreehand.getStroke(J,L);D=[];for(E=0;E<J.length;E++)D.push({x:J[E][0],y:J[E][1]});D.push(null)}J=D[0].x;var H=D[0].x,S=D[0].y,U=D[0].y;for(E=1;E<D.length;E++)null!=D[E]&&(J=Math.max(J,D[E].x),H=Math.min(H,D[E].x),S=Math.max(S,
-D[E].y),U=Math.min(U,D[E].y));J-=H;S-=U;if(0<J&&0<S){var Q=100/J,W=100/S;D.map(function(I){if(null==I)return I;I.x=(I.x-H)*Q;I.y=(I.y-U)*W;return I});var V='<shape strokewidth="inherit"><foreground>',X=0;for(E=0;E<D.length;E++){var p=D[E];if(null==p){p=!1;X=D[X];var C=D[E-1];!e&&g&&(p=X.x-C.x,C=X.y-C.y,p=Math.sqrt(p*p+C*C)<=b.tolerance);if(e||p)V+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';V+="</path>"+(q||e||p?"<fillstroke/>":"<stroke/>");X=E+1}else V=E==X?V+('<path><move x="'+p.x.toFixed(2)+
-'" y="'+p.y.toFixed(2)+'"/>'):V+('<line x="'+p.x.toFixed(2)+'" y="'+p.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){E=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;X=b.view.translate;E=new mxCell("",new mxGeometry(H/V-X.x,U/V-X.y,J/V,S/V),E);E.vertex=1;b.model.beginUpdate();try{E=b.addCell(E),b.fireEvent(new mxEventObject("cellsInserted","cells",[E])),b.fireEvent(new mxEventObject("freehandInserted","cell",E))}finally{b.model.endUpdate()}z&&
-b.setSelectionCells([E])}}for(E=0;E<u.length;E++)u[E].parentNode.removeChild(u[E]);d=null;u=[];D=[]}n(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,E){J=E.getProperty("eventName");E=E.getProperty("event");J==mxEvent.MOUSE_MOVE&&y&&(null!=E.sourceState&&E.sourceState.setCursor("crosshair"),E.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,E){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(J=E.getEvent(),y&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var S=B();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",M?S:"none");d.setAttribute("stroke",S);d.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(S=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",S=S.split(" ").map(function(U){return parseFloat(U)*H}).join(" "),d.setAttribute("stroke-dasharray",S));v=[];J=F(J);G(J);
-t="M"+J.x+" "+J.y;D.push(J);c=[];d.setAttribute("d",M?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],L):t);f.appendChild(d);E.consume()}}),mouseMove:mxUtils.bind(this,function(J,E){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=E.getEvent();J=F(J);G(J);var H=N(0);if(H)if(D.push(H),M){var S=[];for(H=0;H<D.length;H++)S.push([D[H].x,D[H].y]);c=[];for(var U=2;U<v.length;U+=2)H=N(U),S.push([H.x,H.y]),c.push(H);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(S,L))}else{t+=" L"+
-H.x+" "+H.y;S="";c=[];for(U=2;U<v.length;U+=2)H=N(U),S+=" L"+H.x+" "+H.y,c.push(H);d.setAttribute("d",t+S)}m&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(J,E){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x(E.getEvent()),E.consume())})});var F=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(v.push(J);v.length>l;)v.shift()},N=
-function(J){var E=v.length;if(1===E%2||E>=l){var H=0,S=0,U,Q=0;for(U=J;U<E;U++)Q++,J=v[U],H+=J.x,S+=J.y;return{x:H/Q,y:S/Q}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,l,d,u){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=u};DrawioComment=function(b,f,l,d,u,t,D){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=u;this.isResolved=t;this.user=D;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,u){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],t,D=[],c,e=!1,g=!0,k=!0,m=!0,p=!0,v=[],x=!1,z=!0,y=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},N=!1;this.setClosedPath=function(H){e=H};this.setAutoClose=function(H){g=H};this.setAutoInsert=
+function(H){k=H};this.setAutoScroll=function(H){m=H};this.setOpenFill=function(H){p=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){l=H};this.setPerfectFreehandMode=function(H){N=H};this.setBrushSize=function(H){L.size=H};this.getBrushSize=function(){return L.size};var K=function(H){x=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){K(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(H){if(d){var F=c.length,I=z&&0<D.length&&null!=c&&2>c.length;I||D.push.apply(D,c);c=[];D.push(null);u.push(d);d=null;(I||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(H)}}),E=new mxCell;E.edge=!0;var A=function(){var H=b.getCurrentCellStyle(E);H=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var F=";fillColor=none;";N&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+F};this.stopDrawing=function(){if(0<u.length){if(N){for(var H=[],F=0;F<D.length;F++)null!=D[F]&&H.push([D[F].x,D[F].y]);H=PerfectFreehand.getStroke(H,L);D=[];for(F=0;F<H.length;F++)D.push({x:H[F][0],y:H[F][1]});D.push(null)}H=D[0].x;var I=D[0].x,R=D[0].y,W=D[0].y;for(F=1;F<D.length;F++)null!=D[F]&&(H=Math.max(H,D[F].x),I=Math.min(I,D[F].x),R=Math.max(R,
+D[F].y),W=Math.min(W,D[F].y));H-=I;R-=W;if(0<H&&0<R){var P=100/H,V=100/R;D.map(function(J){if(null==J)return J;J.x=(J.x-I)*P;J.y=(J.y-W)*V;return J});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<D.length;F++){var n=D[F];if(null==n){n=!1;X=D[X];var C=D[F-1];!e&&g&&(n=X.x-C.x,C=X.y-C.y,n=Math.sqrt(n*n+C*C)<=b.tolerance);if(e||n)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(p||e||n?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+n.x.toFixed(2)+
+'" y="'+n.y.toFixed(2)+'"/>'):U+('<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(I/U-X.x,W/U-X.y,H/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}y&&
+b.setSelectionCells([F])}}for(F=0;F<u.length;F++)u[F].parentNode.removeChild(u[F]);d=null;u=[];D=[]}K(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,F){H=F.getProperty("eventName");F=F.getProperty("event");H==mxEvent.MOUSE_MOVE&&x&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(H=F.getEvent(),x&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var I=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);I=Math.max(1,I*b.view.scale);var R=A();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",N?R:"none");d.setAttribute("stroke",R);d.setAttribute("stroke-width",I);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*I}).join(" "),d.setAttribute("stroke-dasharray",R));v=[];H=B(H);G(H);
+t="M"+H.x+" "+H.y;D.push(H);c=[];d.setAttribute("d",N?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],L):t);f.appendChild(d);F.consume()}}),mouseMove:mxUtils.bind(this,function(H,F){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=F.getEvent();H=B(H);G(H);var I=M(0);if(I)if(D.push(I),N){var R=[];for(I=0;I<D.length;I++)R.push([D[I].x,D[I].y]);c=[];for(var W=2;W<v.length;W+=2)I=M(W),R.push([I.x,I.y]),c.push(I);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{t+=" L"+
+I.x+" "+I.y;R="";c=[];for(W=2;W<v.length;W+=2)I=M(W),R+=" L"+I.x+" "+I.y,c.push(I);d.setAttribute("d",t+R)}m&&(I=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-I.x,H.y-I.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(H,F){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q(F.getEvent()),F.consume())})});var B=function(H){return mxUtils.convertPoint(b.container,mxEvent.getClientX(H),mxEvent.getClientY(H))},G=function(H){for(v.push(H);v.length>l;)v.shift()},M=
+function(H){var F=v.length;if(1===F%2||F>=l){var I=0,R=0,W,P=0;for(W=H;W<F;W++)P++,H=v[W],I+=H.x,R+=H.y;return{x:I/P,y:R/P}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,l,d,u){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=u};DrawioComment=function(b,f,l,d,u,t,D){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=u;this.isResolved=t;this.user=D;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,u){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index be3ce174..68d77523 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -109,7 +109,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"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.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:"18.0.7",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.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:"18.0.8",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]"!==
@@ -1935,7 +1935,7 @@ function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};
Editor=function(b,e,k,n,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=n||this.createGraph(e,k);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(t){this.status=t;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(t,F){t=null!=F?F.getProperty("edit"):null;null!=t&&t.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+function(){return this.status};this.graphChangeListener=function(t,E){t=null!=E?E.getProperty("edit"):null;null!=t&&t.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -1968,7 +1968,7 @@ Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";
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.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.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),n=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(n,mxUtils.bind(this,function(D,t,F){D=n.substring(D+8,D+8+F);"zTXt"==t?(F=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,F)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(e=D))):"tEXt"==t&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
+Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),n=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(n,mxUtils.bind(this,function(D,t,E){D=n.substring(D+8,D+8+E);"zTXt"==t?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(e=D))):"tEXt"==t&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
D[0]||"mxfile"==D[0])&&(e=D[1]));if(null!=e||"IDAT"==t)return!0}))}catch(D){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
@@ -1985,89 +1985,89 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,n,D,t,F,d,f,g,m){var q=f?57:0,y=k,E=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
+function Dialog(b,e,k,n,D,t,E,d,f,g,l){var q=f?57:0,y=k,F=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";aa+=H.x;da+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+
"px",da+=b.embedViewport.y,aa+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(aa,da,k,n);aa=D.x;da=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
-g();null!=qa&&(y=k=qa.w,E=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));da=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(E,G-C);qa=this.getPosition(aa,da,k,n);aa=qa.x;da=qa.y;ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.width=k+"px";ba.style.height=
-n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!l)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
+g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));da=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(aa,da,k,n);aa=qa.x;da=qa.y;ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.width=k+"px";ba.style.height=
+n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,n,D,t,F,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var E=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
-E.className="geBtn";k.appendChild(E);null!=F&&(n=mxUtils.button(F,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){E.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(E){var C=F.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=F.checked?1:parseInt(m.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
-G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();E&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(F);var f=document.createElement("span");mxUtils.write(f,
-" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(E){F.checked=!F.checked;g.checked=!F.checked;mxEvent.consume(E)});mxEvent.addListener(F,"change",function(){g.checked=!F.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
-d.appendChild(f);mxEvent.addListener(f,"click",function(E){g.checked=!g.checked;F.checked=!g.checked;mxEvent.consume(E)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
-mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");F.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,l){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=l&&l()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=E.checked?1:parseInt(l.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var l=document.createElement("input");l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.setAttribute("size","4");l.setAttribute("disabled","disabled");l.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);
b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,n,D,t,F){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
+PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(E.setAttribute("src",G.src),E.style.display=""):(E.removeAttribute("src"),E.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
-"100%";D.style.height="100%";var t=document.createElement("tbody");var F=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");F.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);F.appendChild(d);t.appendChild(F);F=document.createElement("tr");d=document.createElement("td");
-mxUtils.write(d,mxResources.get("background")+":");F.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(aa){m=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});F.appendChild(d);t.appendChild(F);F=document.createElement("tr");
-d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");F.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var E=document.createElement("img");E.setAttribute("valign","middle");E.style.verticalAlign="middle";E.style.border="1px solid lightGray";E.style.borderRadius="4px";E.style.marginRight="14px";E.style.maxWidth="100px";E.style.cursor="pointer";E.style.height=
-"60px";E.style.padding="4px";var C=n.backgroundImage,H=function(G){b.showBackgroundImageDialog(function(aa,da){da||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",H);mxEvent.addListener(E,"click",H);k();d.appendChild(E);d.appendChild(y);F.appendChild(d);t.appendChild(F);F=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
-"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
-d.appendChild(H);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);t.appendChild(F);D.appendChild(t);this.container=D};
+var PageSetupDialog=function(b){function e(){null==l||l==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=l,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
+mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var l=n.background;e();mxEvent.addListener(g,
+"click",function(G){b.pickColor(l||"none",function(aa){l=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
+"60px";F.style.padding="4px";var C=n.backgroundImage,H=function(G){b.showBackgroundImageDialog(function(aa,da){da||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",H);mxEvent.addListener(F,"click",H);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
+"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,l,C,f.get());G.ignoreColor=n.background==l;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
+d.appendChild(H);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,O,X){if(X||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(O=0;O<C.length;O++)X=C[O],da?"custom"==X.key&&(d.value=X.key,da=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,qa=F.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
-"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
-var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";f.appendChild(F);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var E={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];E[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
-G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var ba=k,Y=function(qa,O){qa=E[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&F.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));O&&da||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){F.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(F,
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",l.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+"checked"),d.value="custom",f.style.display="none",l.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
+var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var l=document.createElement("div");l.style.marginLeft=
+"4px";l.style.width="210px";l.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";l.appendChild(q);mxUtils.write(l," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";l.appendChild(y);mxUtils.write(l," in");f.style.display="none";l.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];F[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
+G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(l);var ba=k,Y=function(qa,O){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,l.style.display="none",f.style.display=""):(f.style.display="none",l.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));O&&da||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(qa){da="custom"==d.value;Y(qa,!0)});Y();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:y}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,n,D,t,F,d,f,g,m,q){f=null!=f?f:!0;var y=document.createElement("table"),E=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
-G.setAttribute("value",e||"");G.style.marginLeft="4px";G.style.width=null!=q?q+"px":"180px";var aa=mxUtils.button(k,function(){if(null==t||t(G.value))f&&b.hideDialog(),n(G.value)});aa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==F)if(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var da=y.parentNode;if(null!=da){var ba=null;mxEvent.addListener(da,"dragleave",function(Y){null!=ba&&(ba.style.backgroundColor=
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,l,q){f=null!=f?f:!0;var y=document.createElement("table"),F=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
+G.setAttribute("value",e||"");G.style.marginLeft="4px";G.style.width=null!=q?q+"px":"180px";var aa=mxUtils.button(k,function(){if(null==t||t(G.value))f&&b.hideDialog(),n(G.value)});aa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var da=y.parentNode;if(null!=da){var ba=null;mxEvent.addListener(da,"dragleave",function(Y){null!=ba&&(ba.style.backgroundColor=
"",ba=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(da,"dragover",mxUtils.bind(this,function(Y){null==ba&&(!mxClient.IS_IE||10<document.documentMode)&&(ba=G,ba.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(da,"drop",mxUtils.bind(this,function(Y){null!=ba&&(ba.style.backgroundColor="",ba=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(G.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")),aa.click());
-Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==F)E.appendChild(C),null!=m&&(H.appendChild(FilenameDialog.createTypeHint(b,G,m)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
-":"),C.appendChild(H),H=document.createElement("td"),H.style.whiteSpace="nowrap",C.appendChild(H),e=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",H.appendChild(e),G.style.width=null!=q?q-40+"px":"190px",C.appendChild(H),E.appendChild(C)));null!=F&&(C=document.createElement("tr"),H=document.createElement("td"),H.colSpan=2,H.appendChild(F),C.appendChild(H),E.appendChild(C));C=document.createElement("tr");H=document.createElement("td");H.colSpan=
-2;H.style.paddingTop=null!=m?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&H.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(m);
-C.appendChild(H);E.appendChild(C);y.appendChild(E);this.container=y};FilenameDialog.filenameHelpLink=null;
+Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==E)F.appendChild(C),null!=l&&(H.appendChild(FilenameDialog.createTypeHint(b,G,l)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
+":"),C.appendChild(H),H=document.createElement("td"),H.style.whiteSpace="nowrap",C.appendChild(H),e=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",H.appendChild(e),G.style.width=null!=q?q-40+"px":"190px",C.appendChild(H),F.appendChild(C)));null!=E&&(C=document.createElement("tr"),H=document.createElement("td"),H.colSpan=2,H.appendChild(E),C.appendChild(H),F.appendChild(C));C=document.createElement("tr");H=document.createElement("td");H.colSpan=
+2;H.style.paddingTop=null!=l?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});l.className="geBtn";b.editor.cancelFirst&&H.appendChild(l);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(l);
+C.appendChild(H);F.appendChild(C);y.appendChild(F);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
-k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var F=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
+k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
D();return n};
-FilenameDialog.createFileTypes=function(b,e,k){var n=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");n.appendChild(D)}mxEvent.addListener(n,"change",function(t){t=k[n.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=t&&(t="drawio."+t);e.value=0<F?e.value.substring(0,F+1)+t:e.value+"."+t;"createEvent"in
-document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dispatchEvent(t)):e.fireEvent("onchange")});b=function(t){t=e.value.toLowerCase();for(var F=0,d=0;d<k.length;d++){var f=k[d].extension,g=null;"drawio"!=f&&(g=f,f=".drawio."+f);if(t.substring(t.length-f.length-1)=="."+f||null!=g&&t.substring(t.length-g.length-1)=="."+g){F=d;break}}n.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return n};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=F.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(F.container),f.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){F.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(g)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,d=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",m="";if(F.isGridEnabled()||F.gridVisible){m=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",m=F.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
-")";var q=f=0;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);m=-Math.round(m-mxUtils.mod(this.translate.x*this.scale-f,m))+"px "+-Math.round(m-mxUtils.mod(this.translate.y*this.scale-q,m))+"px"}f=F.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=m,F.view.backgroundPageShape.node.style.backgroundImage=g,F.view.backgroundPageShape.node.style.backgroundColor=d,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(F.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(F){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
-" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+F,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(F,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,E=this.view.getBackgroundPageBounds();
-d=E.width;f=E.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),H=(F=F&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=F?Math.ceil(d/C.width)-1:0,aa=E.x+d,da=E.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(E.x),
-Math.round(E.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(E.y+(qa+1)*C.height))]:[new mxPoint(Math.round(E.x+(qa+1)*C.width),Math.round(E.y)),new mxPoint(Math.round(E.x+(qa+1)*C.width),Math.round(da))];null!=ba[qa]?(ba[qa].points=O,ba[qa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[qa]=O)}for(qa=Y;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Y,ba.length-Y)}});
-F(this.horizontalPageBreaks);F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var F=k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),d=0<F.width?F.x/this.scale-this.translate.x:0,f=0<F.height?F.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
-m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+F.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+F.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(E){mxEvent.consume(E)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,d,f){var g=this.graph.model.getParent(F);if(d){var m=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(F)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(F))}else if(m=t.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var d=this.graph.getModel(),f=d.getParent(F),g=this.graph.view.getState(f),m=this.graph.isCellSelected(F);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=f;f=d.getParent(f)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.useCssTransforms&&(this.lazyZoomDelay=
+FilenameDialog.createFileTypes=function(b,e,k){var n=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");n.appendChild(D)}mxEvent.addListener(n,"change",function(t){t=k[n.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=t&&(t="drawio."+t);e.value=0<E?e.value.substring(0,E+1)+t:e.value+"."+t;"createEvent"in
+document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dispatchEvent(t)):e.fireEvent("onchange")});b=function(t){t=e.value.toLowerCase();for(var E=0,d=0;d<k.length;d++){var f=k[d].extension,g=null;"drawio"!=f&&(g=f,f=".drawio."+f);if(t.substring(t.length-f.length-1)=="."+f||null!=g&&t.substring(t.length-g.length-1)=="."+g){E=d;break}}n.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return n};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=E.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(E.container),f.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){E.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(g)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",l="";if(E.isGridEnabled()||E.gridVisible){l=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",l=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
+")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);l=-Math.round(l-mxUtils.mod(this.translate.x*this.scale-f,l))+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-q,l))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=l,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=l,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],l=1;l<this.gridSteps;l++){var q=l*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,l=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
+d=F.width;f=F.height;var C=new mxRectangle(g*l.x,g*l.y,q.width*y,q.height*y),H=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,aa=F.x+d,da=F.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(da))];null!=ba[qa]?(ba[qa].points=O,ba[qa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[qa]=O)}for(qa=Y;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Y,ba.length-Y)}});
+E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var l=this.graph.getCellGeometry(d[g]);if(null!=l&&l.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
+l=this.graph.pageScale,q=g.width*l;g=g.height*l;l=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+l*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-l)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,l,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,d,f){var g=this.graph.model.getParent(E);if(d){var l=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);l=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=l&&l.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(l=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))l=g,this.graph.isTable(l)||(l=this.graph.model.getParent(l)),l=!this.graph.selectionCellsHandler.isHandled(l)||this.graph.isCellSelected(l)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return l};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),l=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);l=l||q;if(q||!l&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.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(I,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),Q=[],R=[],fa;for(fa in V)Q.push(V[fa]),R.push(fa);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",Q,"cells",[I]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
-n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
-["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(t,F[e])&&t.push(F[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
-"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<m.length;ra++){var sa=m[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
+n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
+["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<l.length;e++)for(k=0;k<l[e].length;k++)t.push(l[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<l.length;ra++){var sa=l[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
va&&("shape"!=va||Na)&&(!Na||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Qa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));Q.setStyle(J,Ca)}}finally{Q.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
function(I){null==I&&(I=window.event);return n.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(I){if(null!=I){var V=mxEvent.getSource(I);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
-!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var E=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();E.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
+!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||n.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(I)!=n.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(I){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(I.getEvent()))&&
(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(I){return aa.apply(this,arguments)||13==I.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I)||mxClient.IS_SF&&mxEvent.isShiftDown(I))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,qa=null,O=null,
@@ -2076,7 +2076,7 @@ Y=I;qa=Q;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=f
"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(I,V){try{ja.apply(this,arguments),X()}catch(Q){ea.handleError(Q)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(I){}var U=n.fireMouseEvent;n.fireMouseEvent=function(I,V,Q){I==mxEvent.MOUSE_DOWN&&
this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,V,Q){this.menus.createPopupMenu(I,V,Q)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(I,V){var Q=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
(Q.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(Q[Q.length-1]))},0));q(Q)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var Q=V.getProperty("cells"),R=I=!1;if(0<Q.length)for(var fa=0;fa<Q.length&&(I=n.getModel().isVertex(Q[fa])||I,!(R=n.getModel().isEdge(Q[fa])||R)||!I);fa++);else R=I=!0;Q=V.getProperty("keys");V=V.getProperty("values");for(fa=0;fa<Q.length;fa++){var la=0<=mxUtils.indexOf(f,Q[fa]);if("strokeColor"!=
-Q[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(F,Q[fa]))R||0<=mxUtils.indexOf(g,Q[fa])?null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,Q[fa])&&(null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,Q[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,Q[fa]))null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=
+Q[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(E,Q[fa]))R||0<=mxUtils.indexOf(g,Q[fa])?null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,Q[fa])&&(null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,Q[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,Q[fa]))null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=
V[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&
(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",n.currentEdgeStyle.shape,n.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
@@ -2085,7 +2085,7 @@ null!=Q&&(I=Q.style[mxConstants.STYLE_FONTFAMILY]||I,V=Q.style[mxConstants.STYLE
mxUtils.bind(this,function(I){null!=this.currentMenu&&mxEvent.getSource(I)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var F=n(b,4);if(null!=e&&e(t-8,F,k))break;value=n(b,k);n(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var n=b.getRubberband();null!=n&&n.cancel()}));mxEvent.addListener(b.container,
@@ -2093,23 +2093,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),n=!0,D=0;D<e.length;D++){var t=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(t,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,n),n=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),F=D.getIndex(n),d=null,f=1,g=1,m=0,q=F<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,F+1),t):null;m<e.length-1;){var y=e[++m];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=F+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,F+g),t):null);var E=this.editor.graph.view.getState(y);
-if(y==k.getChildAt(n,t+f)&&null!=E&&1==mxUtils.getValue(E.style,"colspan",1)&&1==mxUtils.getValue(E.style,"rowspan",1))f++;else break}m==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,l=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;l<e.length-1;){var y=e[++l];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(y);
+if(y==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}l==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,n){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var t=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=t:b.x!=t&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),t=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==t,k.mergeStyle(e.style,b.style,n))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(f,g){"mouseDown"==g.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var n=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?F.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,E,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(m.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
-H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var E=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-E.x;E=b.container.scrollTop+m.y-E.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,E,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
-function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,E,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var l=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.x,l.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,l){var q=l.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(l.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
+H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.getGraphX(),l.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var l=
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");l=l.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+l.x-F.x;F=b.container.scrollTop+l.y-F.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
+function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,l,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,F,d){var f=null;if(null!=F&&0<F.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>F.length?35*F.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);k=mxUtils.bind(this,function(y){var E=document.createElement("a");E.className="geItem";E.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(E);null!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,E,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(E,"click",function(){var C=m.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-y.geometry.width/2);C.geometry.y=m.snap(Math.round(e/m.view.scale)-m.view.translate.y-y.geometry.height/2);m.model.beginUpdate();try{m.addCell(C)}finally{m.model.endUpdate()}m.setSelectionCell(C);
-m.scrollCellToVisible(C);m.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(F.length,4):F.length);D++)k(F[D]);F=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<F&&(f.style.top=Math.max(m.container.scrollTop+22,e-F)+"px");F=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<F&&(f.style.left=Math.max(m.container.scrollLeft+22,b-F)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,l=this.editor.graph;f=document.createElement("div");D=l.view.getState(k);var q=null==k||null!=D&&l.isTransparentState(D)?null:l.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=l.background&&l.background!=mxConstants.NONE&&(f.style.backgroundColor=l.background);l.container.appendChild(f);k=mxUtils.bind(this,function(y){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,F,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(F,"click",function(){var C=l.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=l.snap(Math.round(b/l.view.scale)-l.view.translate.x-y.geometry.width/2);C.geometry.y=l.snap(Math.round(e/l.view.scale)-l.view.translate.y-y.geometry.height/2);l.model.beginUpdate();try{l.addCell(C)}finally{l.model.endUpdate()}l.setSelectionCell(C);
+l.scrollCellToVisible(C);l.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(l.container.scrollTop+l.container.offsetHeight);0<E&&(f.style.top=Math.max(l.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(l.container.scrollLeft+l.container.offsetWidth);0<E&&(f.style.left=Math.max(l.container.scrollLeft+22,b-E)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,n,D,t){return this.editor.graph.createVertex(null,null,t||"",0,0,n||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2122,9 +2122,9 @@ EditorUi.prototype.getCssClassForMarker=function(b,e,k,n){return"flexArrow"==e?n
k==mxConstants.ARROW_DIAMOND_THIN?"1"==n?"geSprite geSprite-"+b+"thindiamond":"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==k?"geSprite geSprite-"+b+"openasync":"dash"==k?"geSprite geSprite-"+b+"dash":"cross"==k?"geSprite geSprite-"+b+"cross":"async"==k?"1"==n?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==k||"circlePlus"==k?"1"==n||"circle"==k?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==k?"geSprite geSprite-"+b+"erone":"ERmandOne"==
k?"geSprite geSprite-"+b+"eronetoone":"ERmany"==k?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==k?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==k?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==k?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var F=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||t.getSelectionCells();F=t.getExportableCells(t.model.getTopmostCells(F));for(var d={},f=t.createCellLookup(F),g=t.cloneCells(F,null,d),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
-0),y=0;y<g.length;y++){m.add(q,g[y]);var E=t.view.getState(F[y]);if(null!=E){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(F[y])&&null==f[mxObjectIdentity.get(m.getParent(F[y]))]&&(C.offset=null,C.relative=!1,C.x=E.x/E.view.scale-E.view.translate.x,C.y=E.y/E.view.scale-E.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(t){var F=
-null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,F){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),l=new mxGraphModel,q=l.getChildAt(l.getRoot(),
+0),y=0;y<g.length;y++){l.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!l.isEdge(E[y])&&null==f[mxObjectIdentity.get(l.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
+null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Q=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Q.x*R.width),this.scale*(this.translate.y+Q.y*R.height),this.scale*Q.width*R.width,
this.scale*Q.height*R.height)};b.getPreferredPageSize=function(Q,R,fa){Q=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,Q.width*R.width,Q.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(Q,R,fa,la){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;la=null!=la?la:0;var ra=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
@@ -2132,13 +2132,13 @@ W=mxRectangle.fromRectangle(ra);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/
P)b.view.scaleAndTranslate(Q,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*Q/N,b.container.scrollLeft=S*Q/N;else if(0!=fa||0!=la)ra=b.view.translate,b.view.setTranslate(Math.floor(ra.x+fa/N),Math.floor(ra.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Q){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Q){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var F=0;t=mxUtils.bind(this,function(Q,R,fa){F++;
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(Q,R,fa){E++;
var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Q);null!=fa&&la.setAttribute("title",fa);Q=document.createElement("img");Q.setAttribute("border","0");Q.setAttribute("src",R);Q.style.width="36px";Q.style.filter="invert(100%)";la.appendChild(Q);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(Q){window.location.href=D.backBtn.url;mxEvent.consume(Q)}),
Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(Q){this.actions.get("previousPage").funct();mxEvent.consume(Q)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
-mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,E=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=E&&(window.clearTimeout(E),E=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);y=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),600)}),Q||200)}),H=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",l)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
+mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),Q||200)}),H=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var R=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
"4px 2px 4px 2px";this.layersDialog.style.left=R.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));R=mxUtils.getCurrentStyle(this.editor.graph.container);
this.layersDialog.style.zIndex=R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Q)}),Editor.layersImage,mxResources.get("layers")),aa=b.getModel();aa.addListener(mxEvent.CHANGE,function(){G.style.display=1<aa.getChildCount(aa.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,
@@ -2183,7 +2183,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,n=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,n);k.addListener(mxEvent.UNDO,n);k.addListener(mxEvent.REDO,n);k.addListener(mxEvent.CLEAR,n);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);n()};var t=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,d){t.apply(this,arguments);n()};n()};
+this.editor.graph.cellEditor.stopEditing=function(E,d){t.apply(this,arguments);n()};n()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),n="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<n.length;D++)this.actions.get(n[D]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
@@ -2192,10 +2192,10 @@ this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.
this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);n=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(n);this.actions.get("collapse").setEnabled(n);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var n=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(n=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
-e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+n;t=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
-t+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+n;t=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
+t+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=this.diagramContainer.style.right,D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2205,18 +2205,18 @@ 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";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=F){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-F.x:F.y-y.y)-k));mxEvent.consume(q);d!=m()&&(f=!0,g=null)}}function t(q){D(q);F=d=null}var F=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){F=new mxPoint(mxEvent.getClientX(q),
-mxEvent.getClientY(q));d=m();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=m();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-E.x:E.y-y.y)-k));mxEvent.consume(q);d!=l()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var l=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
+mxEvent.getClientY(q));d=l();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=l();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
EditorUi.prototype.handleError=function(b,e,k,n,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var t=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,t,k,null,null,null,null,null,null,null,null,n?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,n,D,t,F,d,f,g,m,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,F,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,m||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,F,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,F,d,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,l,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,l||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(F){this.handleError(F)}};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,n=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(t){k.cellEditor.restoreSelection(n);e(t)},function(){k.cellEditor.restoreSelection(n)});this.showDialog(b.container,230,D,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var n=b.lastIndexOf("&lt;/mxGraphModel&gt;");n>k&&(e=b.substring(k,n+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(k=n)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),F="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=F.lastIndexOf("%3E");
-0<=d&&d<F.length-3&&(F=F.substring(0,d+3))}catch(m){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(F);this.isCompatibleString(g)&&(F=g)}catch(m){}}catch(m){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){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(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+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(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),E="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=E.lastIndexOf("%3E");
+0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(l){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(l){}}catch(l){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){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(n){n.text().then(function(D){b(D)})["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"),
@@ -2226,18 +2226,18 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(b,e,k){var n=this.editor.graph;if(n.isEnabled()){n.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&e&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(n),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(n.getModel().endUpdate(),null!=k&&k())}}};
-EditorUi.prototype.showImageDialog=function(b,e,k,n){n=this.editor.graph.cellEditor;var D=n.saveSelection(),t=mxUtils.prompt(b,e);n.restoreSelection(D);if(null!=t&&0<t.length){var F=new Image;F.onload=function(){k(t,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=t}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.showImageDialog=function(b,e,k,n){n=this.editor.graph.cellEditor;var D=n.saveSelection(),t=mxUtils.prompt(b,e);n.restoreSelection(D);if(null!=t&&0<t.length){var E=new Image;E.onload=function(){k(t,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=t}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(n){n=new ChangePageSetup(this,null,n);n.ignoreColor=!0;this.editor.graph.model.execute(n)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(q,y,E){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),H=0<C.length?C[0]:null;if(null!=H)if(E){n.getModel().beginUpdate();try{for(H=0;H<C.length;H++)if(n.getModel().isVertex(C[H])&&n.isCellResizable(C[H])){var G=n.getCellGeometry(C[H]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[H],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getView().scale;E=null;1==n.getSelectionCount()&&n.model.isVertex(H)&&null!=n.layoutManager&&!n.isCellLocked(H)&&(E=n.layoutManager.getLayout(G));if(null!=E&&E.constructor==mxStackLayout)y=G.getIndex(H),37==q||38==q?n.model.add(G,H,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,H,Math.min(n.model.getChildCount(G),y+1));else{var da=n.graphHandler;null!=da&&(null==da.first&&da.start(H,0,0,C),null!=da.first&&(H=C=0,37==q?C=-y:
-38==q?H=-y:39==q?C=y:40==q&&(H=y),da.currentDx+=C*aa,da.currentDy+=H*aa,da.checkPreview(),da.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=da.first){var ba=da.roundLength(da.currentDx/aa),Y=da.roundLength(da.currentDy/aa);da.moveCells(da.cells,ba,Y);da.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
-90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var F=null,d={37:mxConstants.DIRECTION_WEST,
-38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var E=n.connectVertex(n.getSelectionCell(),
-d[q.keyCode],n.defaultEdgeLength,q,!0);null!=E&&0<E.length&&(1==E.length&&n.model.isEdge(E[0])?n.setSelectionCell(n.model.getTerminal(E[0],!1)):n.setSelectionCell(E[E.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
-mxUtils.bind(this,function(q,y,E,C){var H=this.actions.get(E);null!=H&&(E=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,E):D.bindControlKey(q,E):C?D.bindShiftKey(q,E):D.bindKey(q,E))});var g=this,m=D.escape;D.escape=function(q){m.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
+EditorUi.prototype.createKeyHandler=function(b){function e(q,y,F){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),H=0<C.length?C[0]:null;if(null!=H)if(F){n.getModel().beginUpdate();try{for(H=0;H<C.length;H++)if(n.getModel().isVertex(C[H])&&n.isCellResizable(C[H])){var G=n.getCellGeometry(C[H]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[H],
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(H)&&null!=n.layoutManager&&!n.isCellLocked(H)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(H),37==q||38==q?n.model.add(G,H,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,H,Math.min(n.model.getChildCount(G),y+1));else{var da=n.graphHandler;null!=da&&(null==da.first&&da.start(H,0,0,C),null!=da.first&&(H=C=0,37==q?C=-y:
+38==q?H=-y:39==q?C=y:40==q&&(H=y),da.currentDx+=C*aa,da.currentDy+=H*aa,da.checkPreview(),da.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=da.first){var ba=da.roundLength(da.currentDx/aa),Y=da.roundLength(da.currentDy/aa);da.moveCells(da.cells,ba,Y);da.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
+38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
+d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
+mxUtils.bind(this,function(q,y,F,C){var H=this.actions.get(F);null!=H&&(F=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,l=D.escape;D.escape=function(q){l.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){n.isEnabled()&&n.foldCells(!0)}),D.bindControlKey(35,function(){n.isEnabled()&&n.foldCells(!1)}),D.bindControlKey(13,function(){g.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"formatPanel",!0),
@@ -2247,31 +2247,31 @@ null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var n=0;n<b.length;n++)k=k.replace(new RegExp("&"+b[n][0]+";","g"),"&#"+b[n][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof F?t(m,g):t.call(F,m,g):m,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,l;g<d;)l=D[g],f[g]=t?"undefined"===typeof E?t(l,g):t.call(E,l,g):l,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
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,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!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(I){I=this.getCurrentCellStyle(I);
-return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(F=new mxPoint(I.getGraphX(),I.getGraphY()),m=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
+return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),l=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(Q.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(R=this.selectionCellsHandler.getHandler(Q.cell),null==R||null==R.getHandleForEvent(I))){var fa=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),la=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;fa.grow(la);if(this.isTableCell(Q.cell)&&!this.isCellSelected(Q.cell)&&!(mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()-R))){var ra=this.model.getParent(Q.cell);R=this.model.getParent(ra);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=ra&&mxUtils.intersects(fa,
new mxRectangle(Q.x,Q.y-la,Q.width,u))||this.model.getChildAt(ra,0)!=Q.cell&&mxUtils.intersects(fa,new mxRectangle(Q.x-la,Q.y,u,Q.height))||mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+Q.height-la,Q.width,u))||mxUtils.intersects(fa,new mxRectangle(Q.x+Q.width-la,Q.y,u,Q.height)))ra=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,I.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(I),null!=la&&(R.start(I.getGraphX(),I.getGraphY(),la),R.blockDelayedSelection=
!ra,I.consume()))}}for(;!I.isConsumed()&&null!=Q&&(this.isTableCell(Q.cell)||this.isTableRow(Q.cell)||this.isTable(Q.cell));)this.isSwimlane(Q.cell)&&(R=this.getActualStartSize(Q.cell),(0<R.x||0<R.width)&&mxUtils.intersects(fa,new mxRectangle(Q.x+(R.x-R.width-1)*V+(0==R.x?Q.width:0),Q.y,1,Q.height))||(0<R.y||0<R.height)&&mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+(R.y-R.height-1)*V+(0==R.y?Q.height:0),Q.width,1)))&&(this.selectCellForEvent(Q.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(Q.cell),
-null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var Q in I)if(null!=I[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=F&&null!=f&&null!=d){if(Q=f,Math.abs(F.x-
-V.getGraphX())>R||Math.abs(F.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
-mxEvent.LABEL_HANDLE||0==I||null!=Q.visibleSourceState||I==fa.bends.length-1||null!=Q.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=Q.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(F.x,F.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
-R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(Q,F.x,F.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,fa),this.selectCellForEvent(Q.cell,V.getEvent())):this.isCellSelected(Q.cell)||fa.destroy());
-m=!1;F=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var Q in I)if(null!=I[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(Q=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
+mxEvent.LABEL_HANDLE||0==I||null!=Q.visibleSourceState||I==fa.bends.length-1||null!=Q.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=Q.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(E.x,E.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
+R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(Q,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,fa),this.selectCellForEvent(Q.cell,V.getEvent())):this.isCellSelected(Q.cell)||fa.destroy());
+l=!1;E=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
null!=Q.visibleTargetState)I=this.view.getEdgeStyle(Q),fa="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(Q)&&(V=mxUtils.findNearestSegment(Q,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(fa=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;I=new mxRectangle(V.getGraphX(),V.getGraphY());I.grow(R);if(this.isTableCell(Q.cell)&&(V=this.model.getParent(Q.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
new mxRectangle(Q.x,Q.y-2,Q.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(Q.x,Q.y+Q.height-2,Q.width,4)))fa="row-resize";else if(mxUtils.intersects(I,new mxRectangle(Q.x-2,Q.y,4,Q.height))&&this.model.getChildAt(V,0)!=Q.cell||mxUtils.intersects(I,new mxRectangle(Q.x+Q.width-2,Q.y,4,Q.height)))fa="col-resize";for(V=Q;null==fa&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
-la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&Q.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=F=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&Q.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
function(I){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(V=1!=I.style.html?mxUtils.htmlEntities(V,!1):I.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(I,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],Q=this.graph.pageFormat,R=this.graph.pageScale,fa=Q.width*R;Q=Q.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
ra=this.graph.getPageLayout(),u=0;u<ra.width;u++)V.push(new mxRectangle(((ra.x+u)*fa+R.x)*la,(ra.y*Q+R.y)*la,fa*la,Q*la));for(u=1;u<ra.height;u++)V.push(new mxRectangle((ra.x*fa+R.x)*la,((ra.y+u)*Q+R.y)*la,fa*la,Q*la));I=V.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,V){return null==I.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(I){this.previewColor="#000000"==this.graph.background?
"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var V=y.apply(this,arguments),Q=new mxDictionary,R=[],fa=0;fa<V.length;fa++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[fa])&&this.graph.isCellSelected(V[fa])?this.graph.model.getParent(V[fa]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[fa])&&this.graph.isCellSelected(V[fa])?V[fa]:
-this.graph.getCompositeParent(V[fa]);null==la||Q.get(la)||(Q.put(la,!0),R.push(la))}return R};var E=this.graphHandler.start;this.graphHandler.start=function(I,V,Q,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+this.graph.getCompositeParent(V[fa]);null==la||Q.get(la)||(Q.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,Q,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var I=this.currentState;aa.apply(this,arguments);I!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(I){return mxEvent.isShiftDown(I.getEvent())&&mxEvent.isAltDown(I.getEvent())?!1:
null!=this.currentState&&I.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(I){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(I){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
mxClient.IS_FF&&mxClient.IS_WIN&&null==I.getState()&&mxEvent.isTouchEvent(I.getEvent())};var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=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=qa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(I){return mxEvent.isMouseEvent(I.getEvent())};
@@ -2286,6 +2286,8 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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.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,n,D){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!=n&&null!=D?'viewBox="0 0 '+n+" "+D+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
+Graph.createSvgNode=function(b,e,k,n,D){var t=mxUtils.createXmlDocument(),E=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"svg"):t.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==t.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",k+"px");E.setAttribute("height",n+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+n);t.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,n){var D=document.createElement("canvas");D.width=e;D.height=k;var t=document.createElement("img");t.onload=mxUtils.bind(this,function(){D.getContext("2d").drawImage(t,0,0);n(D.toDataURL())});t.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
Graph.zapGremlins=function(b){for(var e=0,k=[],n=0;n<b.length;n++){var D=b.charCodeAt(n);(32<=D||9==D||10==D||13==D)&&65535!=D&&65534!=D||(k.push(b.substring(e,n)),e=n+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,n=0;n<k;n++)e+=String.fromCharCode(b[n]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
@@ -2295,33 +2297,33 @@ Graph.fadeNodes=function(b,e,k,n,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(
Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};Graph.domPurify=function(b,e){return DOMPurify.sanitize(b,{IN_PLACE:e,ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=n.substring(D);Graph.sanitizeNode(k);var t=k.getElementsByTagName("svg");if(0<t.length){if(e||null!=t[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{n=
-e=1;var F=t[0].getAttribute("width"),d=t[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(F)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/F,n=parseFloat(g[3])/d)}var m=t[0].getBBox();0<m.width&&0<m.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",m.x+" "+m.y+" "+m.width+" "+m.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-m.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",m.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+e=1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var l=t[0].getBBox();0<l.width&&0<l.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",l.x+" "+l.y+" "+l.width+" "+l.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+l.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",l.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,F=null,d=mxUtils.bind(this,function(m){t=!0;F=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=F&&Math.abs(F.x-mxEvent.getClientX(m))<D&&Math.abs(F.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(t)for(var q=mxEvent.getSource(m);null!=
-q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,m);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(m){mxEvent.consume(m)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(l){t=!0;E=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l))}),f=mxUtils.bind(this,function(l){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(l))<D&&Math.abs(E.y-mxEvent.getClientY(l))<D}),g=mxUtils.bind(this,function(l){if(t)for(var q=mxEvent.getSource(l);null!=
+q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,l);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(l){mxEvent.consume(l)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
n&&this.graph.isCustomLink(n)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(n)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,n){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
-null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=
-function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var d=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(F){return"1"==mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=
-mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,d){F=null!=F?F:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return F&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(F){for(var d={},f=0;f<F.length;f++){var g=this.view.getState(F[f]);this.mergeStyle(g.style,
-d,0==f)}return d};Graph.prototype.mergeStyle=function(F,d,f){if(null!=F){var g={},m;for(m in F){var q=F[m];null!=q&&(g[m]=!0,null==d[m]&&f?d[m]=q:d[m]!=q&&delete d[m])}for(m in d)g[m]||delete d[m]}};Graph.prototype.getStartEditingCell=function(F,d){d=this.getCellStyle(F);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==d)&&""==this.getLabel(F)&&0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),d=this.getCellStyle(F),d=parseInt(mxUtils.getValue(d,
-mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==d)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(d=0;d<this.model.getChildCount(F);d++){var f=this.model.getChildAt(F,d);if(this.isCellEditable(f)){F=f;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(F,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(F,d)};Graph.prototype.updateCellStyles=
-function(F,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),m;for(m in F){var q=F[m];g[m]!=q&&this.setCellStyles(m,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
-mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,d,f,g,m,q){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,d,f,g,m,q){g=null!=g?g:!0;m=null!=m?m:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
-y;y--){var E=this.model.getChildAt(f,y),C=this.getScaledCellAt(F,d,E,g,m,q);if(null!=C)return C;if(this.isCellVisible(E)&&(m&&this.model.isEdge(E)||g&&this.model.isVertex(E))&&(C=this.view.getState(E),null!=C&&(null==q||!q(C,F,d))&&this.intersects(C,F,d)))return E}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,
-"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var d=this.getCellGeometry(F);null!=d&&d.relative;)F=this.getModel().getParent(F),d=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var d=new mxDictionary,f=[],g=0;g<F.length;g++){var m=this.getCompositeParent(F[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
-this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}return f};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var d=this.model.getParent(F);if(!this.model.isVertex(d))break;F=d}return F};Graph.prototype.filterSelectionCells=function(F){var d=this.getSelectionCells();if(null!=F){for(var f=[],g=0;g<d.length;g++)F(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var d=
-this.currentScale,f=this.currentTranslate;F=new mxRectangle((F.x+2*f.x)*d-f.x,(F.y+2*f.y)*d-f.y,F.width*d,F.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;F=new mxRectangle((F.x+d.x)*f,(F.y+d.y)*f,F.width*f,F.height*
-f)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
-this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var d=[],f=0;f<F.length;f++)this.isTableRow(F[f])||this.isTableCell(F[f])||d.push(F[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=n.apply(this,arguments);for(var d=[],f=0;f<F.length;f++)this.isTable(F[f])||
-this.isTableRow(F[f])||this.isTableCell(F[f])||d.push(F[f]);return d};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var d=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;F.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=F.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,d=this.scale,f=this.translate;F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);F&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(F,d,f){var g=this.useCssTransforms,m=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=m,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
+null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=
+function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var d=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(E){return"1"==mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=
+mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,d){E=null!=E?E:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return E&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(E){for(var d={},f=0;f<E.length;f++){var g=this.view.getState(E[f]);this.mergeStyle(g.style,
+d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},l;for(l in E){var q=E[l];null!=q&&(g[l]=!0,null==d[l]&&f?d[l]=q:d[l]!=q&&delete d[l])}for(l in d)g[l]||delete d[l]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
+mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(d=0;d<this.model.getChildCount(E);d++){var f=this.model.getChildAt(E,d);if(this.isCellEditable(f)){E=f;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(E,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(E,d)};Graph.prototype.updateCellStyles=
+function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),l;for(l in E){var q=E[l];g[l]!=q&&this.setCellStyles(l,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
+mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,l,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,l,q){g=null!=g?g:!0;l=null!=l?l:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
+y;y--){var F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,l,q);if(null!=C)return C;if(this.isCellVisible(F)&&(l&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
+"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var l=this.getCompositeParent(E[g]);this.isTableCell(l)&&(l=this.graph.model.getParent(l));
+this.isTableRow(l)&&(l=this.graph.model.getParent(l));null==l||d.get(l)||(d.put(l,!0),f.push(l))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
+this.currentScale,f=this.currentTranslate;E=new mxRectangle((E.x+2*f.x)*d-f.x,(E.y+2*f.y)*d-f.y,E.width*d,E.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;E=new mxRectangle((E.x+d.x)*f,(E.y+d.y)*f,E.width*f,E.height*
+f)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=n.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTable(E[f])||
+this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var d=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;E.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=E.getAttribute("transform")&&
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,d=this.scale,f=this.translate;E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,l=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=l,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var n=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else n=window.open(b,null!=e?e:"_blank"),null==n||k||(n.opener=null)}catch(t){}return n};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2334,10 +2336,10 @@ b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxU
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=n)for(var t=0;t<n.length;t++)D[n[t].nodeName]=n[t].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=this.view.getState(b[k]);if(null!=n){for(var D=this.cellRenderer.getShapesForState(n),t=0;t<D.length;t++)null!=D[t]&&null!=D[t].node&&e.push(D[t].node);null!=n.control&&null!=n.control.node&&e.push(n.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],n=0;n<b.length;n++){var D=this.view.getState(b[n]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(F,d){if(null!=b.shape){var f=[k[0]];d=F/d;e||(d=1-d);for(var g=D*d,m=1;m<t;m++)if(g<=n[m-1]){f.push(new mxPoint(k[m-1].x+(k[m].x-k[m-1].x)*g/n[m-1],k[m-1].y+(k[m].y-k[m-1].y)*g/n[m-1]));break}else g-=n[m-1],f.push(k[m]);b.shape.points=f;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,l=1;l<t;l++)if(g<=n[l-1]){f.push(new mxPoint(k[l-1].x+(k[l].x-k[l-1].x)*g/n[l-1],k[l-1].y+(k[l].y-k[l-1].y)*g/n[l-1]));break}else g-=n[l-1],f.push(k[l]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=d)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(n,D){null!=b.shape&&(D=n/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==n&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,F=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(F,n);F()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,E=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(E,n);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),n=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,n,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
n)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2347,28 +2349,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,F=function(aa,da){aa=String(aa);for(da=da||2;aa.length<da;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),E=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:F(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:F(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:F(y%12||12),H:y,HH:F(y),M:E,MM:F(E),s:C,ss:F(C),l:F(d,3),L:F(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(aa,da){aa=String(aa);for(da=da||2;aa.length<da;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),l=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:l+1,mm:E(l+1),mmm:n.i18n.monthNames[l],mmmm:n.i18n.monthNames[l+
+12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
aa.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(F){function d(){n.isVisible(F)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(F)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
-"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(F)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
-mxEvent.addListener(g,"click",function(){n.setVisible(F,!n.isVisible(F));d();null!=b&&b(F)});d()})(n.getChildAt(n.root,t));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var F=null;if(match.index>D&&"%"==e.charAt(match.index-1))F=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)F=b.id;else if(0>d.indexOf("{"))for(var f=b;null==F&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=f.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==F&&(F=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==F&&(F=this.getGlobalVariable(d));null==F&&null!=k&&(F=k[d])}n.push(e.substring(D,match.index)+(null!=F?F:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(l.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(l.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
+"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","absmiddle");l.setAttribute("border","0");l.style.position="relative";l.style.width="16px";l.style.padding="0px 6px 0 4px";e&&(l.style.filter="invert(100%)",l.style.top="-2px");g.appendChild(l);mxUtils.write(g,f);k.appendChild(g);
+mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)E=b.id;else if(0>d.indexOf("{"))for(var f=b;null==E&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==E&&(E=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==E&&(E=this.getGlobalVariable(d));null==E&&null!=k&&(E=k[d])}n.push(e.substring(D,match.index)+(null!=E?E:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var n=this.model.getParent(b),D=this.model.getParent(n),t=this.model.getParent(e);if(D==this.model.getParent(t)){b=n.getIndex(b);n=D.getIndex(n);var F=t.getIndex(e),d=D.getIndex(t);t=Math.max(n,d);e=Math.min(b,F);b=Math.max(b,F);F=[];for(n=Math.min(n,d);n<=t;n++){d=this.model.getChildAt(D,n);for(var f=e;f<=b;f++)F.push(this.model.getChildAt(d,f))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
-!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var n=this.model.getParent(b),D=this.model.getParent(n),t=this.model.getParent(e);if(D==this.model.getParent(t)){b=n.getIndex(b);n=D.getIndex(n);var E=t.getIndex(e),d=D.getIndex(t);t=Math.max(n,d);e=Math.min(b,E);b=Math.max(b,E);E=[];for(n=Math.min(n,d);n<=t;n++){d=this.model.getChildAt(D,n);for(var f=e;f<=b;f++)E.push(this.model.getChildAt(d,f))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var n=b[k],D=this.getCellGeometry(n);if(null!=D){D=D.clone();if(this.getModel().isVertex(n))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(n)&&null!=D.points)for(var t=0;t<D.points.length;t++)D.points[t].x=Math.round(D.points[t].x/e)*e,D.points[t].y=Math.round(D.points[t].y/e)*e;this.getModel().setGeometry(n,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,n,D,t,F,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
-this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var E=null,C=null;if(null!=t){t=t.reverse();for(var H=0;H<t.length;H++)if(!this.isCellLocked(t[H])&&!this.model.isEdge(t[H])&&t[H]!=b)if(!this.model.isAncestor(b,t[H])&&this.isContainer(t[H])&&(null==E||t[H]==this.model.getParent(b)))E=t[H];else if(null==C&&this.isCellConnectable(t[H])&&!this.model.isAncestor(t[H],b)&&!this.isSwimlane(t[H])){var G=this.view.getState(t[H]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[H])}}var aa=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var da=[],ba=C;C=E;D=mxUtils.bind(this,function(Y){if(null==F||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
-!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=O.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-O.width/2:m.x+O.width/2),O.x=m.x-O.width/2,O.y=m.y-O.height/2);null!=E?(this.addCells([ba],E,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),l=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(l.x+=g.geometry.width/2,l.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(l.x+=g.geometry.width/2,l.y+=g.geometry.height+k):(l.x=e==mxConstants.DIRECTION_WEST?l.x-k:l.x+(g.geometry.width+k),l.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(l.x+=b.parent.geometry.x,l.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+l.x*k,y+l.y*k)).grow(40*k);t=null!=t?
+this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var H=0;H<t.length;H++)if(!this.isCellLocked(t[H])&&!this.model.isEdge(t[H])&&t[H]!=b)if(!this.model.isAncestor(b,t[H])&&this.isContainer(t[H])&&(null==F||t[H]==this.model.getParent(b)))F=t[H];else if(null==C&&this.isCellConnectable(t[H])&&!this.model.isAncestor(t[H],b)&&!this.isSwimlane(t[H])){var G=this.view.getState(t[H]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[H])}}var aa=
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?l.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=b.geometry.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-b.geometry.width/2:l.x+b.geometry.width/2);var da=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
+!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?l.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=O.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-O.width/2:l.x+O.width/2),O.x=l.x-O.width/2,O.y=l.y-O.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&aa||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var ea=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(ea=Y.parent.getIndex(Y),this.model.add(Y.parent,X,ea))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ea=b.parent.getIndex(b),this.model.add(b.parent,
-ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==F||null!=ba||!aa||null==C&&f)return D(ba);F(g+m.x*k,y+m.y*k,D)};
+ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(l,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==E||null!=ba||!aa||null==C&&f)return D(ba);E(g+l.x*k,y+l.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2377,10 +2379,10 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,
k);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k){null!=b&&"default"==b[e]&&null!=k&&(b[e]=k)};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var n=this.layoutManager.getLayout(this.model.getParent(b));null!=n&&n.constructor==mxStackLayout&&(n.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var F=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=F&&null!=d){var f=Math.round(d.width-F.width/this.view.scale),g=Math.round(d.height-F.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
-null==q?null!=D&&this.isMoveCellsEvent(D,F)&&this.moveSiblings(F,m,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),F=this.getCellGeometry(D[e]);null!=t&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],F))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,F.width/this.view.scale-t.width):t.height+=n+Math.min(0,F.height/this.view.scale-t.height),this.model.setGeometry(b,
+Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var l=this.model.getParent(k[t]),q=this.layoutManager.getLayout(l);
+null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,l,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(l,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=t&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,E.width/this.view.scale-t.width):t.height+=n+Math.min(0,E.height/this.view.scale-t.height),this.model.setGeometry(b,
t));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,e,k){var n=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(n)&&(n=null);return n};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
@@ -2388,7 +2390,7 @@ Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.esc
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,n=this.container.clientHeight-e,D=Math.floor(20*Math.min(k/b.width,n/b.height))/20;this.zoomTo(D);if(mxUtils.hasScrollbars(this.container)){var t=this.view.translate;this.container.scrollTop=(b.y+t.y)*D-Math.max((n-b.height*D)/2+e/2,0);this.container.scrollLeft=(b.x+t.x)*D-Math.max((k-b.width*D)/2+e/2,0)}};
Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var n=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var D=0;D<b.length;D++)0>
-mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,F){return t.name<F.name?-1:t.name>F.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e};
+mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,E){return t.name<E.name?-1:t.name>E.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2415,67 +2417,67 @@ HoverIcons.prototype.click=function(b,e,k){var n=k.getEvent(),D=k.getGraphX(),t=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var m=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(m,k)&&(d==this.arrowUp?g-=m.y+m.height-k.y:d==this.arrowRight?f+=k.x+k.width-m.x:d==this.arrowDown?g+=k.y+k.height-m.y:d==this.arrowLeft&&(f-=m.x+m.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var l=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(l,k)&&(d==this.arrowUp?g-=l.y+l.height-k.y:d==this.arrowRight?f+=k.x+k.width-l.x:d==this.arrowDown?g+=k.y+k.height-l.y:d==this.arrowLeft&&(f-=l.x+l.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
-this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});F(e,this.arrowRight);F(n,this.arrowLeft);F(D,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
+this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});E(e,this.arrowRight);E(n,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var n=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,n=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(n=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&n<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||n>this.activationDelay)&&this.currentState!=b&&(n>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,
e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,n,D){b=this.cloneCell(b);for(var t=0;t<k;t++){var F=this.cloneCell(e),d=this.getCellGeometry(F);null!=d&&(d.x+=t*n,d.y+=t*D);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,n,D,t,F,d,f){k=null!=k?k:60;n=null!=n?n:40;t=null!=t?t:30;d=null!=d?d:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=D?D:"",0,0,e*k,b*n+(null!=D?t:0),null!=F?F:"shape=table;startSize="+(null!=D?t:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,n,d),this.createVertex(null,null,"",0,0,k,n,f),e,k,0),b,0,n)};
-Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCells(b,!0),D=0;D<n.length;D++)if(null!=k&&(n[D].value=k[D]),null!=e)for(var t=this.model.getChildCells(n[D],!0),F=0;F<t.length;F++)null!=e[D][F]&&(t[F].value=e[D][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,F,d,f){k=null!=k?k:120;n=null!=n?n:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;F=this.createVertex(null,
-null,"",0,t,e*k+t,n,F);D.insert(this.createParent(F,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(F.geometry.y=n+t,this.createParent(D,this.createParent(F,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),F=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],m=0;m<F.length;m++){var q=this.getCellGeometry(F[m]),y={cell:F[m],rospan:1,colspan:1,row:D,col:m,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[m]&&1<k[m].rowspan?(y.rowspan=k[m].rowspan-1,y.colspan=k[m].colspan,y.actual=k[m].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(F[m],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,F.length,
-n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(y);f=y}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,F,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<F-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,n,D){b=this.cloneCell(b);for(var t=0;t<k;t++){var E=this.cloneCell(e),d=this.getCellGeometry(E);null!=d&&(d.x+=t*n,d.y+=t*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:60;n=null!=n?n:40;t=null!=t?t:30;d=null!=d?d:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,e*k,b*n+(null!=D?t:0),null!=E?E:"shape=table;startSize="+(null!=D?t:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,n,d),this.createVertex(null,null,"",0,0,k,n,f),e,k,0),b,0,n)};
+Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCells(b,!0),D=0;D<n.length;D++)if(null!=k&&(n[D].value=k[D]),null!=e)for(var t=this.model.getChildCells(n[D],!0),E=0;E<t.length;E++)null!=e[D][E]&&(t[E].value=e[D][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:120;n=null!=n?n:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;E=this.createVertex(null,
+null,"",0,t,e*k+t,n,E);D.insert(this.createParent(E,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(E.geometry.y=n+t,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
+Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],l=0;l<E.length;l++){var q=this.getCellGeometry(E[l]),y={cell:E[l],rospan:1,colspan:1,row:D,col:l,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[l]&&1<k[l].rowspan?(y.rowspan=k[l].rowspan-1,y.colspan=k[l].colspan,y.actual=k[l].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(E[l],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,E.length,
+n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(y);f=y}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,E,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<E-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),F=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(F,b);if(d<F.length-1){var f=F[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var m=this.getCellGeometry(t);null!=m&&(k||(k=b==F[F.length-1]),k&&(m=m.clone(),m.height+=e,n.setGeometry(t,m)))}}finally{n.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),F=n.getChildCells(D,!0);b=mxUtils.indexOf(F,b);var d=b==F.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];F=n.getChildCells(D,!0);var m=F[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(m,q));b<F.length-1&&(m=F[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
-q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(m,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var l=this.getCellGeometry(t);null!=l&&(k||(k=b==E[E.length-1]),k&&(l=l.clone(),l.height+=e,n.setGeometry(t,l)))}}finally{n.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var l=E[b],q=this.getCellGeometry(l);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(l,q));b<E.length-1&&(l=E[b+1],q=this.getCellGeometry(l),null!=q&&(q=q.clone(),
+q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(l,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,n=0;n<b.length;n++)if(!this.isVertexIgnored(b[n])){var D=this.graph.getCellGeometry(b[n]);null!=D&&(k+=e?D.width:D.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var F=this.graph.getCellGeometry(k[t]);null!=F&&(n+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,D.push(Math.round(n)))}return D};
-TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=F,F+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
+TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var E=this.graph.getCellGeometry(k[t]);null!=E&&(n+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(n)))}return D};
+TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=E,E+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var F=this.graph.getModel(),d=0;F.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=F.getChildCells(b,!0),q=0;q<m.length;q++)F.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
-m.length&&0<y){if(D){var E=this.graph.getCellGeometry(m[m.length-1]);null!=E&&(E=E.clone(),E.height=f-y+E.height,F.setGeometry(m[m.length-1],E))}var C=t?null:this.getRowLayout(m[0],g),H=[],G=e.y;for(q=0;q<m.length;q++)E=this.graph.getCellGeometry(m[q]),null!=E&&(E=E.clone(),E.x=e.x,E.width=g,E.y=Math.round(G),G=D||n?G+E.height:G+E.height/y*f,E.height=Math.round(G)-E.y,F.setGeometry(m[q],E)),d=Math.max(d,this.layoutRow(m[q],C,E.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,F.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){F.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=da.width}aa.actual.col==aa.col&&(da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=da.height)}}))}else for(q=
-0;q<m.length;q++)F.setVisible(m[q],!1)}finally{F.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
-arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};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 m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,E=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;E.push(V);V=null!=m.routedPoints?m.routedPoints[E.length-1]:null;return null==V||V.type!=
-ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;E=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,l=E.getChildCells(b,!0),q=0;q<l.length;q++)E.setVisible(l[q],!0);var y=this.getSize(l,!1);if(0<f&&0<g&&0<
+l.length&&0<y){if(D){var F=this.graph.getCellGeometry(l[l.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(l[l.length-1],F))}var C=t?null:this.getRowLayout(l[0],g),H=[],G=e.y;for(q=0;q<l.length;q++)F=this.graph.getCellGeometry(l[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(l[q],F)),d=Math.max(d,this.layoutRow(l[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){E.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=da.width}aa.actual.col==aa.col&&(da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=da.height)}}))}else for(q=
+0;q<l.length;q++)E.setVisible(l[q],!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(l,q){q=null!=q?q:!0;var y=this.getState(l);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
+arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};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 l=this.node.getElementsByTagName("path");if(1<l.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&l[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&l[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(l,q){return n.apply(this,arguments)||null!=l.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,l.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(l){D.apply(this,arguments);this.graph.model.isEdge(l.cell)&&1!=l.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(l)};mxGraphView.prototype.updateLineJumps=function(l){var q=l.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=l.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(l.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=l.routedPoints?l.routedPoints[F.length-1]:null;return null==V||V.type!=
+ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(l,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
ea.x,ea.y)<1*this.scale*this.scale;)ea=Y,O++,Y=X[O+2];Y=mxUtils.intersection(da.x,da.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Y&&(Math.abs(Y.x-da.x)>H||Math.abs(Y.y-da.y)>H)&&(Math.abs(Y.x-aa.x)>H||Math.abs(Y.y-aa.y)>H)&&(Math.abs(Y.x-ka.x)>H||Math.abs(Y.y-ka.y)>H)&&(Math.abs(Y.x-ea.x)>H||Math.abs(Y.y-ea.y)>H)){ea=Y.x-da.x;ka=Y.y-da.y;Y={distSq:ea*ea+ka*ka,x:Y.x,y:Y.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Y.distSq){ba.splice(ea,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
-Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=E;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
-X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(m,ba,y,E,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x,O.y)):"line"==H?(m.moveTo(ea.x+
-Y.y*ba,ea.y-Y.x*ba),m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),m.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,m.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(m.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(m,ba,y,E,!1,null,G);m.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,E){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
-new mxPoint(q.getCenterX(),q.getCenterY()):F.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,E){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,E);var C=this.getNextPoint(m,y,E),H=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
-G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(m.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,E,C),E)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,E,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);E=y=null;if(null!=m)for(var H=0;H<m.length;H++){var G=this.graph.getConnectionPoint(q,m[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==E||aa<E)y=G,E=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var E=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(E=y.state.view.graph.replacePlaceholders(y.state.cell,
-E));return E};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),E=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(E.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}l.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(l,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;l.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
+X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(l,ba,y,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x,O.y)):"line"==H?(l.moveTo(ea.x+
+Y.y*ba,ea.y-Y.x*ba),l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),l.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,l.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(l.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(l,ba,y,F,!1,null,G);l.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(l,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(l,q,y,F){if(null==q||null==l||"1"!=q.style.snapToPoint&&"1"!=l.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(l,q,F);var C=this.getNextPoint(l,y,F),H=this.graph.isOrthogonal(l),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(l.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(l.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));l.setAbsoluteTerminalPoint(this.snapToAnchorPoint(l,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(l,q,y,F,C){if(null!=
+q&&null!=l){l=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=l)for(var H=0;H<l.length;H++){var G=this.graph.getConnectionPoint(q,l[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(l,q,y){var F=f.apply(this,arguments);"1"==l.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,
+F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(l){if(null!=l.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
-null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,D,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
+null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
-mxStencilRegistry.loadStencilSet=function(b,e,k,n){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var t=!1;if(null==D)try{if(n){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,t=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,t))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;t=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=D&&null!=
+mxStencilRegistry.loadStencilSet=function(b,e,k,n){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var t=!1;if(null==D)try{if(n){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,t=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,t))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;t=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,e,t)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var n=b.firstChild;null!=n;)"shapes"==n.nodeName&&mxStencilRegistry.parseStencilSet(n,e,k),n=n.nextSibling;else{k=null!=k?k:!0;n=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=n;){if(n.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=n.getAttribute("name"),null!=b)){D=D.toLowerCase();var t=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+t.toLowerCase(),new mxStencil(n));if(null!=e){var F=n.getAttribute("w"),
-d=n.getAttribute("h");F=null==F?80:parseInt(F,10);d=null==d?80:parseInt(d,10);e(D,t,b,F,d)}}n=n.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var n=b.firstChild;null!=n;)"shapes"==n.nodeName&&mxStencilRegistry.parseStencilSet(n,e,k),n=n.nextSibling;else{k=null!=k?k:!0;n=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=n;){if(n.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=n.getAttribute("name"),null!=b)){D=D.toLowerCase();var t=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+t.toLowerCase(),new mxStencil(n));if(null!=e){var E=n.getAttribute("w"),
+d=n.getAttribute("h");E=null==E?80:parseInt(E,10);d=null==d?80:parseInt(d,10);e(D,t,b,E,d)}}n=n.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=L.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=L.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<L.length;M++)null!=this.currentEdgeStyle[L[M]]&&(z+=L[M]+"="+this.currentEdgeStyle[L[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var M=0;M<z.length;M++){var T=z[M];L[mxObjectIdentity.get(T)]=T.getId();for(var ca=this.model.getChildCount(T),
@@ -2488,10 +2490,10 @@ null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,T,ca,ia,m
mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var Oa=this.getCurrentCellStyle(Ma);null!=Oa&&"1"==Oa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var T=this.getSelectionCell(),ca=null,ia=[],ma=mxUtils.bind(this,function(pa){if(null!=this.view.getState(pa)&&(this.model.isVertex(pa)||this.model.isEdge(pa)))if(ia.push(pa),pa==T)ca=ia.length-1;else if(z&&null==T&&0<ia.length||null!=ca&&z&&ia.length>ca||!z&&0<ca)return;for(var ua=0;ua<this.model.getChildCount(pa);ua++)ma(this.model.getChildAt(pa,ua))});ma(this.model.root);0<ia.length&&
(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ia.length):0,this.setSelectionCell(ia[ca]))}};Graph.prototype.swapShapes=function(z,L,M,T,ca,ia,ma){L=!1;if(!T&&null!=ca&&1==z.length&&(T=this.view.getState(ca),M=this.view.getState(z[0]),null!=T&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==T.style.shape&&"umlLifeline"==M.style.shape)&&(T=this.getCellGeometry(ca),ia=this.getCellGeometry(z[0]),null!=T&&null!=ia))){L=T.clone();T=ia.clone();T.x=L.x;T.y=L.y;L.x=ia.x;L.y=ia.y;this.model.beginUpdate();
-try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
this.model.getParent(z[ua]),Fa=this.getCellGeometry(z[ua]);this.isTable(ya)&&pa.push(ya);if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(ca)&&(T||ya!=ca)){if(!T){var Ma=this.getCellGeometry(ya);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Fa.height,this.model.setGeometry(ya,Ma))}Ma=this.getCellGeometry(ca);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,this.model.setGeometry(ca,Ma));var Oa=this.model.getChildCells(ca,!0);if(0<Oa.length){z[ua]=T?this.cloneCell(z[ua]):z[ua];var Pa=this.model.getChildCells(z[ua],
-!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Ea=this.cloneCell(Pa[Pa.length-1]);null!=Ea&&(Ea.value="",this.model.add(z[ua],Ea))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Da=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Da&&null!=La&&(La=La.clone(),La.width=Da.width,this.model.setGeometry(Pa[wa],La))}}}}var Za=m.apply(this,
-arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Za)}finally{this.model.endUpdate()}return Za};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Da=this.cloneCell(Pa[Pa.length-1]);null!=Da&&(Da.value="",this.model.add(z[ua],Da))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Ea=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Ea&&null!=La&&(La=La.clone(),La.width=Ea.width,this.model.setGeometry(Pa[wa],La))}}}}var Ta=l.apply(this,
+arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Ta)}finally{this.model.endUpdate()}return Ta};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):this.labelChanged(z[T],"")}else{if(this.isTableRow(z[T])&&(ia=this.model.getParent(z[T]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var ma=this.model.getChildCells(ia,!0),pa=0,ua=0;ua<ma.length;ua++)0<=mxUtils.indexOf(z,ma[ua])&&pa++;pa==ma.length&&M.push(ia)}M.push(z[T])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
M:new Graph;for(var T=0;T<L.length;T++)null!=L[T]&&M.updateCustomLinksForCell(z,L[T],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),T=0;T<M;T++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,T))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);
for(L=0;L<M.length;L++){var T=M[L];z.push(new mxConnectionConstraint(new mxPoint(T[0],T[1]),2<T.length?"0"!=T[2]:!0,null,3<T.length?T[3]:0,4<T.length?T[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){T=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(T==mxConstants.DIRECTION_NORTH||T==mxConstants.DIRECTION_SOUTH)T=M,M=L,L=T;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
@@ -2501,7 +2503,7 @@ arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca
(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),T=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ia=z[ca];if(M.isEdge(ia)){var ma=M.getTerminal(ia,!0),pa=M.getTerminal(ia,!1);M.setTerminal(ia,pa,!0);M.setTerminal(ia,
ma,!1);var ua=M.getGeometry(ia);if(null!=ua){ua=ua.clone();null!=ua.points&&ua.points.reverse();var ya=ua.getTerminalPoint(!0),Fa=ua.getTerminalPoint(!1);ua.setTerminalPoint(ya,!1);ua.setTerminalPoint(Fa,!0);M.setGeometry(ia,ua);var Ma=this.view.getState(ia),Oa=this.view.getState(ma),Pa=this.view.getState(pa);if(null!=Ma){var Sa=null!=Oa?this.getConnectionConstraint(Ma,Oa,!0):null,za=null!=Pa?this.getConnectionConstraint(Ma,Pa,!1):null;this.setConnectionConstraint(ia,ma,!0,za);this.setConnectionConstraint(ia,
pa,!1,Sa);var wa=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,wa,[ia])}T.push(ia)}}else if(M.isVertex(ia)&&(ua=this.getCellGeometry(ia),null!=ua)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ua=ua.clone();ua.x+=ua.width/2-ua.height/
-2;ua.y+=ua.height/2-ua.width/2;var Ea=ua.width;ua.width=ua.height;ua.height=Ea;M.setGeometry(ia,ua)}var Da=this.view.getState(ia);if(null!=Da){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Za=mxUtils.getValue(Da.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Za)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};
+2;ua.y+=ua.height/2-ua.width/2;var Da=ua.width;ua.width=ua.height;ua.height=Da;M.setGeometry(ia,ua)}var Ea=this.view.getState(ia);if(null!=Ea){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ta=mxUtils.getValue(Ea.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Ta)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};
Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));
this.isTableRow(L)&&(L=this.model.getParent(L));var M=this.view.getState(L);null!=M&&null!=M.shape&&(this.view.invalidate(L),M.shape.bounds=null)}y.apply(this,arguments);z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var M=this.view.getState(z[L]);null!=M&&null!=M.shape&&
null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");
@@ -2510,8 +2512,8 @@ this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this
Graph.diagramLanguage,L):ia.setAttribute("label",L);L=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var T=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),T.push(ca))}for(M=0;M<T.length;M++)if(ca=this.view.getState(T[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
this.isTransparentState(ca)){for(var ia=!0,ma=0;ma<this.model.getChildCount(ca.cell)&&ia;ma++)L.get(this.model.getChildAt(ca.cell,ma))||(ia=!1);ia&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,L)};Graph.prototype.getAttributeForCell=function(z,L,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,L,
-M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(L,M):T.removeAttribute(L);this.model.setValue(z,T)};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,T){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
-E.apply(this,arguments);var ma=!0;for(ca=0;ca<z.length&&ma;ca++)ma=ma&&this.isTableRow(z[ca]);ma&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
+M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(L,M):T.removeAttribute(L);this.model.setValue(z,T)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,T){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
+F.apply(this,arguments);var ma=!0;for(ca=0;ca<z.length&&ma;ca++)ma=ma&&this.isTableRow(z[ca]);ma&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
z,L))};Graph.prototype.insertTextForEvent=function(z,L){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var T=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=T||this.firstClickSource!=ca||null!=T&&null!=T.text&&null!=T.text.node&&null!=T.text.boundingBox&&(mxUtils.contains(T.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(T.text.node,mxEvent.getSource(z)))||(null!=T||this.isCellLocked(this.getDefaultParent()))&&
(null==T||this.isCellLocked(T.cell))||!(null!=T||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==T&&(T=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,T))}return L};Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var T=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,T.x*ca.width);M=
Math.max(M,T.y*ca.height)}return new mxPoint(this.snap(L+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),M=this.getInsertPoint(),T=this.snap(Math.round(Math.max(M.x,L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(T,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
@@ -2534,86 +2536,85 @@ if(null!=ma){var pa=z?ma.getCenterX():ma.getCenterY();T=null!=T?Math.max(T,pa):p
Fa.clone(),z?Fa.x=Math.round(T-Fa.width/2)-ya.origin.x:Fa.y=Math.round(T-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(M[ia].cell,Fa))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Pa){var Sa=null;if(null!=Pa)for(Sa=new mxDictionary,Fa=0;Fa<Pa.length;Fa++)Sa.put(Pa[Fa],!0);if(Pa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma=
null!=ma?ma:!0;ya=null!=ya?ya:!1;var za="page"==Oa?this.view.getBackgroundPageBounds():ia&&null==Sa||T||"diagram"==Oa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),wa=this.view.scale;"diagram"==Oa&&null!=this.backgroundImage&&(za=mxRectangle.fromRectangle(za),za.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*wa,(this.view.translate.y+this.backgroundImage.y)*wa,this.backgroundImage.width*wa,this.backgroundImage.height*wa)));if(null==za)throw Error(mxResources.get("drawingEmpty"));
-var Ea=mxUtils.createXmlDocument(),Da=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"svg"):Ea.createElement("svg");null!=z&&(null!=Da.style?Da.style.backgroundColor=z:Da.setAttribute("style","background-color:"+z));null==Ea.createElementNS?(Da.setAttribute("xmlns",mxConstants.NS_SVG),Da.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):Da.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);z=L/wa;var La=Math.max(1,Math.ceil(za.width*z)+2*M)+(ya&&0==
-M?5:0),Za=Math.max(1,Math.ceil(za.height*z)+2*M)+(ya&&0==M?5:0);Da.setAttribute("version","1.1");Da.setAttribute("width",La+"px");Da.setAttribute("height",Za+"px");Da.setAttribute("viewBox",(ca?"-0.5 -0.5":"0 0")+" "+La+" "+Za);Ea.appendChild(Da);var Va=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"g"):Ea.createElement("g");Da.appendChild(Va);var eb=this.createSvgCanvas(Va);eb.foOffset=ca?-.5:0;eb.textOffset=ca?-.5:0;eb.imageOffset=ca?-.5:0;eb.translate(Math.floor(M/L-za.x/wa),Math.floor(M/
-L-za.y/wa));var jb=document.createElement("div"),hb=eb.getAlternateText;eb.getAlternateText=function(qb,yb,ub,vb,wb,lb,kb,fb,mb,xb,rb,zb,Bb){if(null!=lb&&0<this.state.fontSize)try{mxUtils.isNode(lb)?lb=lb.innerText:(jb.innerHTML=lb,lb=mxUtils.extractTextWithWhitespace(jb.childNodes));for(var Ab=Math.ceil(2*vb/this.state.fontSize),nb=[],c=0,l=0;(0==Ab||c<Ab)&&l<lb.length;){var x=lb.charCodeAt(l);if(10==x||13==x){if(0<c)break}else nb.push(lb.charAt(l)),255>x&&c++;l++}nb.length<lb.length&&1<lb.length-
-nb.length&&(lb=mxUtils.trim(nb.join(""))+"...");return lb}catch(p){return hb.apply(this,arguments)}else return hb.apply(this,arguments)};var ob=this.backgroundImage;if(null!=ob){L=wa/L;var pb=this.view.translate,cb=new mxRectangle((ob.x+pb.x)*L,(ob.y+pb.y)*L,ob.width*L,ob.height*L);mxUtils.intersects(za,cb)&&eb.image(ob.x+pb.x,ob.y+pb.y,ob.width,ob.height,ob.src,!0)}eb.scale(z);eb.textEnabled=ma;pa=null!=pa?pa:this.createSvgImageExport();var gb=pa.drawCellState,tb=pa.getLinkForCellState;pa.getLinkForCellState=
-function(qb,yb){var ub=tb.apply(this,arguments);return null==ub||qb.view.graph.isCustomLink(ub)?null:ub};pa.getLinkTargetForCellState=function(qb,yb){return qb.view.graph.getLinkTargetForCell(qb.cell)};pa.drawCellState=function(qb,yb){for(var ub=qb.view.graph,vb=null!=Sa?Sa.get(qb.cell):ub.isCellSelected(qb.cell),wb=ub.model.getParent(qb.cell);!(ia&&null==Sa||vb)&&null!=wb;)vb=null!=Sa?Sa.get(wb):ub.isCellSelected(wb),wb=ub.model.getParent(wb);(ia&&null==Sa||vb)&&gb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root),
-eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");
-null==ca.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);
-M.appendChild(T);ca.appendChild(z);M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);
-z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;
-null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=
-function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var ca=0;ca<T.points.length;ca++)L?T.points[ca].x=M+
-(M-T.points[ca].x):T.points[ca].y=M+(M-T.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=M+(M-ia.x):ia.y=M+(M-ia.y))};ca(T.getTerminalPoint(!0));ca(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),ca=0;ca<T;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var ma=this.getCellGeometry(ia);null!=ma&&(ma=ma.clone(),L?ma.x=M+(M-ma.x-ma.width):
-ma.y=M+(M-ma.y-ma.height),this.model.setGeometry(ia,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var ca=this.view.getState(z[T]);null!=ca&&this.flipEdgePoints(z[T],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],
-L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var ca=this.model.getParent(z[T]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[T]),ma=this.getCellGeometry(ca);null!=ia&&null!=ma&&(ma=ma.clone(),ma.height-=ia.height,this.model.setGeometry(ca,
-ma))}}var pa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=pa)for(M=[],T=0;T<pa.length;T++)this.model.contains(pa[T])&&(this.model.isVertex(pa[T])||this.model.isEdge(pa[T]))&&M.push(pa[T])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);T=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?
-T=M.getParent(z):z=M.getChildCells(T,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);var ma=M.getChildCells(T,!0),pa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var ua=M.getChildCells(ma[z],!0)[ca],ya=M.cloneCell(ua,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);pa=Fa.width;var Ma=
-this.getCellGeometry(ma[z]);null!=Ma&&(Fa.height=Ma.height)}M.add(ma[z],ya,ca+(L?0:1))}var Oa=this.getCellGeometry(T);null!=Oa&&(Oa=Oa.clone(),Oa.width+=pa,M.setGeometry(T,Oa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var T=L.getChildCells(M,!0);0==T.length?L.remove(M):(M==z&&(z=T[T.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=
-function(z,L){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){T=z;var ca=M.getChildCells(T,!0);z=ca[L?0:ca.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),T=M.getParent(ca);else if(this.isTableRow(z))T=M.getParent(z);
-else{var ia=M.getChildCells(T,!0);ca=ia[L?0:ia.length-1]}var ma=M.getChildCells(ca,!0),pa=T.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var ua=this.getCellGeometry(ca);if(null!=ua){for(ia=0;ia<ma.length;ia++){z=M.cloneCell(ma[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=
-ua.height);ca.insert(z)}M.add(T,ca,pa+(L?0:1));var Fa=this.getCellGeometry(T);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ua.height,M.setGeometry(T,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=L.getParent(z));this.isTableRow(T)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[0]);var ia=L.getChildCells(T,!0);if(1>=ia.length)L.remove(M);else{var ma=
-ia.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ia,z));for(T=z=0;T<ca.length;T++){var pa=L.getChildCells(ca[T],!0)[ma];L.remove(pa);var ua=this.getCellGeometry(pa);null!=ua&&(z=Math.max(z,ua.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(z=T=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(T));var ca=
-L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[ca.length-1]);L.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var ma=this.getCellGeometry(M);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(M,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],T=M.rows[0].cells,ca=z=0;ca<T.length;ca++){var ia=T[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));
-return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var ca=document.createElement("th");M.rows[T].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(L),mxUtils.br(T);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>
-L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&
-(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,M(L,40));this.isCustomLink(z)&&
-mxEvent.addListener(T,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var ma=
-this.getCellAt(ia.graphX,ia.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ia.graphX,ia.graphY)||(ia.state=this.view.getState(ma),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,T=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,ma,pa){ia==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),
-M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,ma){var pa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!pa&&(M&&null==ma.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));pa=!L||pa?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,
-function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,ua,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,ma,pa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};
-mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);
-M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=
-function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],M=0,T=z.rangeCount;M<T;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(T){}};
-var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
-mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);
-if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var ma=ia.firstChild;null!=ca&&null!=ma;)L(ca,ma),ca=ca.nextSibling,ma=ma.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=
-ca)T(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var ma=ca.nextSibling;null==ia?T(ca):(M(ca,ia),ia=ia.nextSibling);ca=ma}}function T(ca){for(var ia=ca.firstChild;null!=ia;){var ma=ia.nextSibling;T(ia);ia=ma}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),
-ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=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]>")?
-M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){pa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<pa.length&&"\n"==pa.charAt(pa.length-1)&&(pa=pa.substring(0,pa.length-1));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"<br/>"):pa,!0);this.textarea.className=
-"mxCellEditor geContentEditable";ua=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,
-ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.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=
-ma.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=pa&&(this.textarea.innerHTML=pa,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.innerHTML="");var pa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(pa=mxUtils.replaceTrailingNewlines(pa,"<div><br></div>"));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):pa,!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!=pa&&(this.textarea.innerHTML=pa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
-M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
-mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
-"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);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("+M+","+M+")")}else this.textarea.style.height=
-"",this.textarea.style.overflow="",da.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
-mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();ba.apply(this,arguments);
-this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,
-null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+
-this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);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 qa=mxStackLayout.prototype.resizeCell;
-mxStackLayout.prototype.resizeCell=function(z,L){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),ca=null!=T?this.graph.getCellGeometry(T):null;if(null!=ca&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var ma=this.graph.getActualStartSize(T);ca=ca.clone();M?ca.height=L.height+ma.y+ma.height+
-2*ia:ca.width=L.width+ma.x+ma.width+2*ia;this.graph.model.setGeometry(T,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(pa){M.get(pa)||(M.put(pa,!0),ca.push(pa))}for(var L=O.apply(this,arguments),M=new mxDictionary,T=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var ma=L[ia];this.graph.isTableCell(ma)?z(T.getParent(T.getParent(ma))):this.graph.isTableRow(ma)&&z(T.getParent(ma));z(ma)}return ca};
-var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
-(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Sa,za,wa){for(var Ea=[],Da=0;Da<Sa.length;Da++){var La=
-Sa[Da];Ea.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Ea},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Pa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,
-function(Sa){var za=Fa[Sa],wa=Sa<Fa.length-1?Fa[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var Ea=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Pa[Sa]?new V(Pa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"row-resize",null,wa);za.tableHandle=!0;var Da=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Da?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Sa],0,Da),this.shape.updateBoundsFromLine();else{var Za=T.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Da*ia;this.shape.bounds.x=ma.x+(Sa==Fa.length-1?0:Za.x*ia);this.shape.bounds.width=ma.width-(Sa==Fa.length-1?0:Za.width+Za.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Za,Va,eb){Da=Math.max(Graph.minTableRowHeight-
-Za.height,Va.y-Za.y-Za.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Za){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Va=T.getCellAt(Za.getGraphX(),Za.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Va,Za)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Sa){var za=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),
-Ea=null!=wa.alternateBounds?wa.alternateBounds:wa;null==za&&(za=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),za.x=ma.x+wa.x*ia,za.y=ma.y+wa.y*ia,za.width=Ea.width*ia,za.height=Ea.height*ia,za.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Da=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Oa[Sa]?new V(Oa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;
-za=new mxHandle(za,"col-resize",null,wa);za.tableHandle=!0;var La=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Sa],La,0),this.shape.updateBoundsFromLine();else{var Va=T.getActualStartSize(ma.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ea.width+La)*ia;this.shape.bounds.y=ma.y+(Sa==Ma.length-
-1?0:Va.y*ia);this.shape.bounds.height=ma.height-(Sa==Ma.length-1?0:(Va.height+Va.y)*ia)}this.shape.redraw()}};var Za=!1;za.setPosition=function(Va,eb,jb){La=Math.max(Graph.minTableColumnWidth-Ea.width,eb.x-Va.x-Ea.width);Za=mxEvent.isShiftDown(jb.getEvent());null==Da||Za||(La=Math.min(La,Da.width-Graph.minTableColumnWidth))};za.execute=function(Va){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Za);else if(!M.blockDelayedSelection){var eb=T.getCellAt(Va.getGraphX(),Va.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(eb,
-Va)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var z=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<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=
-M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=
-!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var ca=
-this.customHandles[T].shape.bounds,ia=ca.getCenterX(),ma=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-ma)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-ma)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
-function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.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 ra=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ra.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
-this.graph.view.translate,T=this.graph.view.scale,ca=this.roundLength(L.x/T-M.x);M=this.roundLength(L.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=e(ca,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
-"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),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"/>');
+T=L/wa;Oa=ca?-.5:0;var Da=Graph.createSvgNode(Oa,Oa,Math.max(1,Math.ceil(za.width*T)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(za.height*T)+2*M)+(ya&&0==M?5:0),z),Ea=Da.ownerDocument,La=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"g"):Ea.createElement("g");Da.appendChild(La);var Ta=this.createSvgCanvas(La);Ta.foOffset=ca?-.5:0;Ta.textOffset=ca?-.5:0;Ta.imageOffset=ca?-.5:0;Ta.translate(Math.floor(M/L-za.x/wa),Math.floor(M/L-za.y/wa));var Wa=document.createElement("div"),fb=Ta.getAlternateText;
+Ta.getAlternateText=function(cb,hb,lb,rb,vb,ob,Ab,Bb,ub,kb,eb,mb,wb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(Wa.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(Wa.childNodes));for(var pb=Math.ceil(2*rb/this.state.fontSize),xb=[],zb=0,yb=0;(0==pb||zb<pb)&&yb<ob.length;){var nb=ob.charCodeAt(yb);if(10==nb||13==nb){if(0<zb)break}else xb.push(ob.charAt(yb)),255>nb&&zb++;yb++}xb.length<ob.length&&1<ob.length-xb.length&&(ob=mxUtils.trim(xb.join(""))+"...");return ob}catch(c){return fb.apply(this,
+arguments)}else return fb.apply(this,arguments)};var gb=this.backgroundImage;if(null!=gb){z=wa/L;var ib=this.view.translate;Oa=new mxRectangle((gb.x+ib.x)*z,(gb.y+ib.y)*z,gb.width*z,gb.height*z);mxUtils.intersects(za,Oa)&&Ta.image(gb.x+ib.x,gb.y+ib.y,gb.width,gb.height,gb.src,!0)}Ta.scale(T);Ta.textEnabled=ma;pa=null!=pa?pa:this.createSvgImageExport();var tb=pa.drawCellState,qb=pa.getLinkForCellState;pa.getLinkForCellState=function(cb,hb){var lb=qb.apply(this,arguments);return null==lb||cb.view.graph.isCustomLink(lb)?
+null:lb};pa.getLinkTargetForCellState=function(cb,hb){return cb.view.graph.getLinkTargetForCell(cb.cell)};pa.drawCellState=function(cb,hb){for(var lb=cb.view.graph,rb=null!=Sa?Sa.get(cb.cell):lb.isCellSelected(cb.cell),vb=lb.model.getParent(cb.cell);!(ia&&null==Sa||rb)&&null!=vb;)rb=null!=Sa?Sa.get(vb):lb.isCellSelected(vb),vb=lb.model.getParent(vb);(ia&&null==Sa||rb)&&tb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root),Ta);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(Ta,
+Da);return Da}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
+null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(T);ca.appendChild(z);
+M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
+z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&
+this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&
+L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var ca=0;ca<T.points.length;ca++)L?T.points[ca].x=M+(M-T.points[ca].x):T.points[ca].y=M+(M-T.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=
+M+(M-ia.x):ia.y=M+(M-ia.y))};ca(T.getTerminalPoint(!0));ca(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),ca=0;ca<T;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var ma=this.getCellGeometry(ia);null!=ma&&(ma=ma.clone(),L?ma.x=M+(M-ma.x-ma.width):ma.y=M+(M-ma.y-ma.height),this.model.setGeometry(ia,ma))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var ca=this.view.getState(z[T]);null!=ca&&this.flipEdgePoints(z[T],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(L?
+mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var ca=this.model.getParent(z[T]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[T]),ma=this.getCellGeometry(ca);null!=ia&&null!=ma&&(ma=ma.clone(),ma.height-=ia.height,this.model.setGeometry(ca,ma))}}var pa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=pa)for(M=[],T=0;T<pa.length;T++)this.model.contains(pa[T])&&(this.model.isVertex(pa[T])||this.model.isEdge(pa[T]))&&M.push(pa[T])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);T=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?T=M.getParent(z):z=M.getChildCells(T,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var ma=M.getChildCells(T,!0),pa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var ua=M.getChildCells(ma[z],!0)[ca],ya=M.cloneCell(ua,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);pa=Fa.width;var Ma=this.getCellGeometry(ma[z]);null!=Ma&&(Fa.height=Ma.height)}M.add(ma[z],ya,ca+(L?
+0:1))}var Oa=this.getCellGeometry(T);null!=Oa&&(Oa=Oa.clone(),Oa.width+=pa,M.setGeometry(T,Oa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var T=L.getChildCells(M,!0);0==T.length?L.remove(M):(M==z&&(z=T[T.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==
+this.getCurrentCellStyle(z).childLayout){T=z;var ca=M.getChildCells(T,!0);z=ca[L?0:ca.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),T=M.getParent(ca);else if(this.isTableRow(z))T=M.getParent(z);else{var ia=M.getChildCells(T,!0);ca=ia[L?0:ia.length-1]}var ma=M.getChildCells(ca,
+!0),pa=T.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var ua=this.getCellGeometry(ca);if(null!=ua){for(ia=0;ia<ma.length;ia++){z=M.cloneCell(ma[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=ua.height);ca.insert(z)}M.add(T,ca,pa+(L?0:1));var Fa=this.getCellGeometry(T);
+null!=Fa&&(Fa=Fa.clone(),Fa.height+=ua.height,M.setGeometry(T,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=L.getParent(z));this.isTableRow(T)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[0]);var ia=L.getChildCells(T,!0);if(1>=ia.length)L.remove(M);else{var ma=ia.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ia,z));for(T=z=0;T<
+ca.length;T++){var pa=L.getChildCells(ca[T],!0)[ma];L.remove(pa);var ua=this.getCellGeometry(pa);null!=ua&&(z=Math.max(z,ua.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(z=T=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(T)||
+(T=ca[ca.length-1]);L.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var ma=this.getCellGeometry(M);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(M,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],T=M.rows[0].cells,ca=z=0;ca<T.length;ca++){var ia=T[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
+Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var ca=document.createElement("th");M.rows[T].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(L),mxUtils.br(T);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=
+window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=
+z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(T,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
+return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var ma=this.getCellAt(ia.graphX,ia.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ia.graphX,ia.graphY)||
+(ia.state=this.view.getState(ma),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,T=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,ma,pa){ia==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(ia,ma){var pa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!pa&&(M&&null==ma.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));pa=!L||pa?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+
+ya.x+1,ma.getY()+ya.y+1,ua,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,ma,pa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
+document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=
+function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&
+z.rangeCount){for(var L=[],M=0,T=z.rangeCount;M<T;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(T){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var ma=ia.firstChild;null!=ca&&null!=ma;)L(ca,ma),ca=ca.nextSibling,ma=ma.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=ca)T(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var ma=ca.nextSibling;null==ia?T(ca):(M(ca,ia),
+ia=ia.nextSibling);ca=ma}}function T(ca){for(var ia=ca.firstChild;null!=ia;){var ma=ia.nextSibling;T(ia);ia=ma}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
+ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=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]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){pa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<pa.length&&"\n"==pa.charAt(pa.length-1)&&(pa=pa.substring(0,pa.length-1));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"<br/>"):pa,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.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=ma.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
+L;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=pa&&(this.textarea.innerHTML=pa,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.innerHTML="");var pa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(pa=mxUtils.replaceTrailingNewlines(pa,
+"<div><br></div>"));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):pa,!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!=pa&&(this.textarea.innerHTML=pa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),
+this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);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("+M+","+M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",da.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,
+"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);
+return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();ba.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();
+try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=
+mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,
+mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?
+e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);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 qa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),ca=null!=T?this.graph.getCellGeometry(T):
+null;if(null!=ca&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var ma=this.graph.getActualStartSize(T);ca=ca.clone();M?ca.height=L.height+ma.y+ma.height+2*ia:ca.width=L.width+ma.x+ma.width+2*ia;this.graph.model.setGeometry(T,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(pa){M.get(pa)||(M.put(pa,!0),ca.push(pa))}for(var L=O.apply(this,arguments),M=new mxDictionary,T=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var ma=L[ia];this.graph.isTableCell(ma)?z(T.getParent(T.getParent(ma))):this.graph.isTableRow(ma)&&z(T.getParent(ma));z(ma)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
+mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=
+function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
+function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
+function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Sa,za,wa){for(var Da=[],Ea=0;Ea<Sa.length;Ea++){var La=Sa[Ea];Da.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Da},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+
+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Pa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,function(Sa){var za=Fa[Sa],wa=Sa<Fa.length-1?Fa[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var Da=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=
+Pa[Sa]?new V(Pa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"row-resize",null,wa);za.tableHandle=!0;var Ea=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ea?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Sa],0,Ea),this.shape.updateBoundsFromLine();else{var Ta=T.getActualStartSize(ma.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ea*ia;this.shape.bounds.x=ma.x+(Sa==Fa.length-1?0:Ta.x*ia);this.shape.bounds.width=ma.width-(Sa==Fa.length-1?0:Ta.width+Ta.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Ta,Wa,fb){Ea=Math.max(Graph.minTableRowHeight-Ta.height,Wa.y-Ta.y-Ta.height);La=mxEvent.isShiftDown(fb.getEvent());null!=Da&&La&&(Ea=Math.min(Ea,Da.height-Graph.minTableRowHeight))};za.execute=function(Ta){if(0!=Ea)T.setTableRowHeight(this.state.cell,
+Ea,!La);else if(!M.blockDelayedSelection){var Wa=T.getCellAt(Ta.getGraphX(),Ta.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Wa,Ta)}Ea=0};za.reset=function(){Ea=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Sa){var za=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),Da=null!=wa.alternateBounds?wa.alternateBounds:wa;null==za&&(za=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),za.x=ma.x+wa.x*ia,za.y=ma.y+wa.y*ia,za.width=Da.width*ia,za.height=Da.height*
+ia,za.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Ea=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Oa[Sa]?new V(Oa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"col-resize",null,wa);za.tableHandle=!0;var La=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==La?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Sa],La,0),this.shape.updateBoundsFromLine();else{var Wa=T.getActualStartSize(ma.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Da.width+La)*ia;this.shape.bounds.y=ma.y+(Sa==Ma.length-1?0:Wa.y*ia);this.shape.bounds.height=ma.height-(Sa==Ma.length-1?0:(Wa.height+Wa.y)*ia)}this.shape.redraw()}};var Ta=!1;za.setPosition=function(Wa,fb,gb){La=Math.max(Graph.minTableColumnWidth-Da.width,fb.x-Wa.x-Da.width);
+Ta=mxEvent.isShiftDown(gb.getEvent());null==Ea||Ta||(La=Math.min(La,Ea.width-Graph.minTableColumnWidth))};za.execute=function(Wa){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Ta);else if(!M.blockDelayedSelection){var fb=T.getCellAt(Wa.getGraphX(),Wa.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(fb,Wa)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=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<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||
+this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));
+this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
+0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var ca=this.customHandles[T].shape.bounds,ia=ca.getCenterX(),ma=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-
+ma)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-ma)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.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 ra=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ra.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,T=this.graph.view.scale,ca=this.roundLength(L.x/T-M.x);M=this.roundLength(L.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=
+e(ca,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),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="'+
HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
24,24);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;
@@ -2647,257 +2648,257 @@ mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height
null);mxEvent.consume(ca)})))}if(null!=L)for(M=0;M<L.length;M++){var T=document.createElement("div");T.style.marginTop=null!=z||0<M?"6px":"0px";T.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(T)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=
-mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ta=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();
+mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ua=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();
var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-M+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?
-"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ta.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||
+"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ua.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||
"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=L&&(M=Math.max(M,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){Ka.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);
this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var bb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Ua=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Ua.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function E(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Va=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Va.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxShape.call(this)}function q(){mxShape.call(this)}
+function y(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(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,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function I(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}function ra(){mxEllipse.call(this)}
function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function S(){mxShape.call(this)}function P(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function Na(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Ta(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Ua(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
-function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Da(){mxConnector.call(this)}function La(c,l,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
-c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
-p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
-A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Ua(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Va(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
+function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Da(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Ea(){mxConnector.call(this)}function La(c,m,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var x=this.line[m];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,m,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,x,p){if(null!=m){var v=null;c.begin();for(var A=0;A<m.length;A++){var B=m[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
+p=0;p<this.line.length&&!m;p++){var v=this.line[p];null!=v&&null!=x&&(m=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,m,x,p,v)};e.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+A,B,m+p/2,x+v/2);s=this.scale;m=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,m,x,p,v)}};e.prototype.paintTableForeground=function(c,m,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],m,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Za=Math.tan(mxUtils.toRadians(30)),Va=(.5-Za)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Za);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Va);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Va)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Za));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Va)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Va)*l),c.lineTo(.5*l,(1-Va)*l)):(c.translate((p-
-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Va),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Va)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
-c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);
-q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
-mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
-c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
-x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
-"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
-c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
-0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
+n);var Ta=Math.tan(mxUtils.toRadians(30)),Wa=(.5-Ta)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/Ta);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*Wa);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-Wa)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-Wa)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-Wa)*m),c.lineTo(.5*m,(1-Wa)*m)):(c.translate((p-
+m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*Wa),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-Wa)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),
+c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,p,-m/3,p,m),c.lineTo(p,v-m),c.curveTo(p,v+m/3,0,v+m/3,0,v-m),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
+A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(l,mxShape);l.prototype.isoAngle=15;l.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(m,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",l);mxUtils.extend(q,mxShape);
+q.prototype.size=15;q.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
+mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
+c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));m=Math.max(m,K);m=Math.min(p-K,m);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,x)):(c.moveTo(p-m,x),c.lineTo(p-m,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
+x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
+"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,
+c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);A||(m=
+0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(p-m,0);c.arcTo(m,m,0,0,1,p,m);c.lineTo(p,v-m);c.arcTo(m,m,0,0,1,p-m,v);c.lineTo(A+m,v);c.arcTo(m,m,0,0,1,A,v-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=
-function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
-x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
-function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
-p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=
-mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
-.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
-function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var jb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){jb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
-var hb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){hb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ob=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ob.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)pb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+function(){return!0};G.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,m,
+x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,m/2);c.quadTo(p/4,1.4*m,p/2,m/2);c.quadTo(3*p/4,m*(1-1.4),p,m/2);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(c.x,c.y+m,x,p-2*m);m*=x;return new mxRectangle(c.x+m,c.y,x-2*m,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
+function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
+p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,m,x,p,v){m="0"!=
+mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
+.5;qa.prototype.redrawPath=function(c,m,x,p,v){c.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
+function(c,m,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);m=p/5;c.rect(0,0,m,v);c.fillAndStroke();c.rect(2*m,0,m,v);c.fillAndStroke();c.rect(4*m,0,m,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,m,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,m,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(m-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(m-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=m};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+var ib=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){ib.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var tb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&tb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)qb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
-A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
-ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
-v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
-ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,ib+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-ib):Ga+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
-J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
-40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};N.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ha-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ha);c.lineTo(l,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,x,p){p=N.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
-K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
-v,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
-K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
-v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(l,v-l),K=Math.min(ha+2*l,v-l);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
-32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
+A,v*A)),c.moveTo(m+A,x),c.lineTo(m+p-A,x),c.quadTo(m+p,x,m+p,x+A),c.lineTo(m+p,x+v-A),c.quadTo(m+p,x+v,m+p-A,x+v),c.lineTo(m+A,x+v),c.quadTo(m,x+v,m,x+v-A),c.lineTo(m,x+A),c.quadTo(m,x,m+A,x)):(c.moveTo(m,x),c.lineTo(m+p,x),c.lineTo(m+p,x+v),c.lineTo(m,x+v),c.lineTo(m,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.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,x=c.height;c=new mxRectangle(c.x,c.y,m,x);var p=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(m*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
+ea.prototype.paintForeground=function(c,m,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.moveTo(m+p-B,x);c.lineTo(m+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,m,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,m,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,m,x,p,v){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,m,x,p,
+v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(0,v),new mxPoint(m,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
+U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(p-m,0),new mxPoint(p,.5*v),new mxPoint(p-m,v),new mxPoint(m,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(m+p/2,x+A);c.lineTo(m+p/2,x+v-A);c.moveTo(m+A,x+v/2);c.lineTo(m+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,m,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.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};Q.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,jb+=db);db=m;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-jb):Ga+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,m,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/8,x+v);c.lineTo(m+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
+J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,m,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
+40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};N.prototype.paintBackground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,m,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,m,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+p/2,x+A),c.lineTo(m+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,m,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,x,p,v),c.setGradient(this.fill,this.gradient,m,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,x);c.lineTo(m+B,x);c.lineTo(m+B,x+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ha);c.lineTo(m,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+p,x);c.lineTo(m+p,x+v);c.lineTo(m,x+v);c.lineTo(m,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,m,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,x,p){p=N.prototype.size;null!=m&&(p=mxUtils.getValue(m.style,"size",p)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;x.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,x,p){p=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(p+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ja.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,x,p){var v="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
+v,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,
+ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=
+c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(m,v-m),K=Math.min(ha+2*m,v-m);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
+32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-m/2,K=.7*v-m/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,
+K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,x),new mxPoint(m+p,x+B),new mxPoint(m+A,x+v),new mxPoint(m,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(m+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
Na.prototype.defaultWidth=4;Na.prototype.isOpenEnded=function(){return!0};Na.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Na.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Na);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ta,mxRectangleShape);Ta.prototype.dx=20;Ta.prototype.dy=20;Ta.prototype.isHtmlAllowed=function(){return!1};Ta.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ta);
-mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend($a,
-mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
-l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),
-new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
-0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha-B/2);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha+B/2);c.moveTo(l+A,ha);c.lineTo(l+p-A,ha);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ha);c.lineTo(l+p-B-A,ha-B/2);c.moveTo(l+
-p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||na?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea,
-mxActor);Ea.prototype.cst={RECT2:"mxgraph.basic.rect"};Ea.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,m),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.prototype.paintForeground=function(c,m,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,x+A);c.lineTo(m+p,x+A);c.end();c.stroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ua);
+mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(m,x),
+new mxPoint(m,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+m)/2,x),new mxPoint((p+m)/2,v),new mxPoint((p-m)/2,v),new mxPoint((p-m)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Va);mxUtils.extend($a,
+mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-
+m,v),new mxPoint(p-m,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(m,0),new mxPoint(m,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(p-m,A),new mxPoint(m,A),new mxPoint(m,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(p,0);c.quadTo(p-2*m,v/2,p,v);c.lineTo(m,v);c.quadTo(m-2*m,v/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
+m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p-m,0),
+new mxPoint(p,.8*m),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
+0),new mxPoint(p,v-m),new mxPoint(p/2,v),new mxPoint(0,v-m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/2,x+v);c.lineTo(m+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(m+p/2,x);c.lineTo(m+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*p,x+.145*v);c.lineTo(m+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(m+.855*p,x+.145*v);c.lineTo(m+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,m,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,m,x,p,v){c.begin();c.moveTo(m,x);c.lineTo(m+p,x);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,x+v);c.lineTo(m+p,x+v);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha-B/2);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha+B/2);c.moveTo(m+A,ha);c.lineTo(m+p-A,ha);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ha);c.lineTo(m+p-B-A,ha-B/2);c.moveTo(m+
+p-A,ha);c.lineTo(m+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,m,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(m,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,x),this.outline||ha?c.lineTo(m+p,x):c.moveTo(m+p,x),this.outline||xa?c.lineTo(m+p,x+v):c.moveTo(m+p,x+v),this.outline||na?c.lineTo(m,x+v):c.moveTo(m,x+v),(this.outline||K)&&c.lineTo(m,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+p/2,x),c.lineTo(m+p/2,x+v)):(c.moveTo(m,x+v/2),c.lineTo(m+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+m,x,p,v){m=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,p);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(v-A)/2;x=m+A;var B=(p-A)/2;A=B+A;c.moveTo(0,m);c.lineTo(B,m);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(p,m);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/2);x=Math.min(p-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Da,
+mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ea.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};Ea.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Wa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Xa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ya=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
+x);this.strictDrawShape(c,0,0,p,v)};Da.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Za=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=Ea.prototype;c.setDashed(ab);ib&&""!=ib&&c.setDashPattern(ib);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,l,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
-l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Wa,Xa,Ya,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),
-c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
-K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
-Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
-Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
-l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,
-K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,
-K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,
-x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,
-l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
-l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,
-v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,
-l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,
-B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Wa,
-Xa,Ya,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ha,v)};Ea.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Ea.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Ea.prototype.paintNE=
-function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Ea.prototype.paintRight=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Ea.prototype.paintLeft=function(c,l,x,p,v,A,B,ha,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Ea.prototype.paintSE=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Ea.prototype.paintBottom=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ha,v)};Ea.prototype.paintSW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Ea.prototype.paintNWInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Ea.prototype.paintTopInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Ea.prototype.paintNEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Ea.prototype.paintRightInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Ea.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
-c.lineTo(K,v):c.lineTo(0,v)};Ea.prototype.paintSEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Ea.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
-v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Ea.prototype.paintSWInner=function(c,l,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Ea.prototype.moveSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
-c.moveTo(0,v-K)};Ea.prototype.lineSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Ea.prototype.moveSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Ea.prototype.lineSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
-c.lineTo(p-K,v)};Ea.prototype.moveNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Ea.prototype.lineNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Ea.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,ab,ib,db,Ga){if("fold"==
-A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&ib&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&ib&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Ea.prototype.cst.RECT2,Ea);
-Ea.prototype.constraints=null;mxUtils.extend(Da,mxConnector);Da.prototype.origPaintEdgeShape=Da.prototype.paintEdgeShape;Da.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Da.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Da.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Da);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),ib=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(ib-na/2-ab/2,db-ab/2+na/2);c.lineTo(ib-na/2+ab/2,db-ab/2-na/2);c.lineTo(ib+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(ib-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ha,K,
-xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),ib=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*ib+
-v*K,na.y-2*db+A*K);c.moveTo(na.x-ib-db+A*K,na.y-db+ib-v*K);c.lineTo(na.x+db-ib-A*K,na.y-db-ib+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),ib=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(ib.x-ab,ib.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,ib.x+ab,ib.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ha,K,xa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=l;na.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);K?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var gb=
-function(c,l,x){return tb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},tb=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
-p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var ib=K.y-ab.y,db=Math.sqrt(xa*xa+ib*ib);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,ib/db,ab,K,B,ha)})},qb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},yb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ub=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(kb(p));return v}},vb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[fb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
-ha},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},wb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[fb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return fb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,K));A=Da.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,m,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),Ja&&A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),Ia&&
+A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
+m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Ra,Xa,Ya,Za,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==
+xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,
+K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
+m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
+Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
+Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,
+m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,
+K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,
+K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,
+x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
+m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
+m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,
+v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,
+m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,
+B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),
+A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),
+A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Ra,Xa,
+Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.prototype.moveNW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Da.prototype.moveNE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Da.prototype.moveSE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Da.prototype.moveSW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(ha,v)};Da.prototype.paintNW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Da.prototype.paintTop=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Da.prototype.paintNE=
+function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Da.prototype.paintRight=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Da.prototype.paintLeft=function(c,m,x,p,v,A,B,ha,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Da.prototype.paintSE=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Da.prototype.paintBottom=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(ha,v)};Da.prototype.paintSW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Da.prototype.paintNWInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Da.prototype.paintTopInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Da.prototype.paintNEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Da.prototype.paintRightInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
+K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Da.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
+c.lineTo(K,v):c.lineTo(0,v)};Da.prototype.paintSEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Da.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
+v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Da.prototype.paintSWInner=function(c,m,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Da.prototype.moveSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
+c.moveTo(0,v-K)};Da.prototype.lineSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Da.prototype.moveSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Da.prototype.lineSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
+c.lineTo(p-K,v)};Da.prototype.moveNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Da.prototype.lineNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Da.prototype.moveNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Da.prototype.lineNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Da.prototype.paintFolds=function(c,m,x,p,v,A,B,ha,K,xa,na,ab,jb,db,Ga){if("fold"==
+A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&jb&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&jb&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);
+Da.prototype.constraints=null;mxUtils.extend(Ea,mxConnector);Ea.prototype.origPaintEdgeShape=Ea.prototype.paintEdgeShape;Ea.prototype.paintEdgeShape=function(c,m,x){for(var p=[],v=0;v<m.length;v++)p.push(mxUtils.clone(m[v]));v=c.state.dashed;var A=c.state.fixDash;Ea.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ea.prototype.origPaintEdgeShape.apply(this,
+[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==m.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb-na/2-ab/2,db-ab/2+na/2);c.lineTo(jb-na/2+ab/2,db-ab/2-na/2);c.lineTo(jb+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(jb-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ha,K,
+xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),jb=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*jb+
+v*K,na.y-2*db+A*K);c.moveTo(na.x-jb-db+A*K,na.y-db+jb-v*K);c.lineTo(na.x+db-jb-A*K,na.y-db-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,jb.x+ab,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ha,K,xa){m=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=m;na.y-=
+x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){m.begin();m.moveTo(ab.x,ab.y);K?m.lineTo(ab.x-A-B/c,ab.y-B+A/c):m.lineTo(ab.x+B/c-A,ab.y-B-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var hb=
+function(c,m,x){return lb(c,["width"],m,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,m,x,p,v){return eb(c,m,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
+p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,db=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,jb/db,ab,K,B,ha)})},rb=function(c){return function(m){return[eb(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(m){return[eb(m,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,m,x){return function(p){var v=[eb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(kb(p));return v}},Ab=function(c,m,x,p,v){x=null!=x?x:.5;return function(A){var B=[eb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
+ha},!1,p)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,m,x){c=null!=c?c:.5;return function(p){var v=[eb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m}},kb=function(c,m){return eb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=m?m:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},fb=function(c,l,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ha},mb={link:function(c){return[gb(c,!0,10),gb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(tb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},eb=function(c,m,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<m.length;na++)this.copyStyle(m[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ha},mb={link:function(c){return[hb(c,!0,10),hb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(tb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(tb(c,
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(tb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,x/2))}l.push(fb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(kb(c,x/2))}m.push(eb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:lb(),ext:lb(),rectangle:lb(),
-triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[fb(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
-p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[fb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[fb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",za.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[fb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[fb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[fb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ta.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Ta.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Ka.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:qb(1),doubleArrow:qb(.5),folder:function(c){return[fb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[fb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:yb(q.prototype.size),cylinder3:yb(y.prototype.size),offPageConnector:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:vb(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:vb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:vb(qa.prototype.size,!1),display:vb(wa.prototype.size,!1),cube:ub(1,
-n.prototype.size,!1),card:ub(.5,G.prototype.size,!0),loopLimit:ub(.5,ca.prototype.size,!0),trapezoid:wb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:wb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=fb;Graph.handleFactory=mb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=mb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=mb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),zb=new mxPoint(1,0),Bb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(Bb),Math.sin(Bb));var Ab=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,ab=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
-db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return m},label:ub(),ext:ub(),rectangle:ub(),
+triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},umlFrame:function(c){return[eb(c,["width","height"],function(m){var x=Math.max(W.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
+p=Math.max(1.5*W.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(m.width,x.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(m.height,x.y-m.y)))},!1)]},process:function(c){var m=[eb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},cross:function(c){return[eb(c,["size"],function(m){var x=Math.min(m.width,m.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",za.prototype.size)))*x/2;return new mxPoint(m.getCenterX()-x,m.getCenterY()-x)},function(m,x){var p=Math.min(m.width,m.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-x.y)/p*2,Math.max(0,m.getCenterX()-x.x)/p*2)))})]},note:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},manualInput:function(c){var m=[eb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},dataStorage:function(c){return[eb(c,["size"],function(m){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
+L.prototype.size));return new mxPoint(m.x+m.width-p*(x?1:m.width),m.getCenterY())},function(m,x){m="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-x.x)):Math.max(0,Math.min(1,(m.x+m.width-x.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[eb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},internalStorage:function(c){var m=[eb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Ua.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},module:function(c){return[eb(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(m.x+x/2,m.y+2*p)},function(m,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y))/2)})]},corner:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,
+"dy",Ka.prototype.dy)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.dx=Math.round(Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},tee:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(m.x+(m.width+x)/2,m.y+p)},function(m,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,x.x-m.x-m.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(c,["tabWidth","tabHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=m.width-x);return new mxPoint(m.x+x,m.y+p)},function(m,x){var p=Math.max(0,Math.min(m.width,x.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=m.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},document:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",da.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},tape:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x*m.height/2)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[eb(c,
+["isoAngle"],function(m){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",l.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(x),.5*m.height))},function(m,x){this.state.style.isoAngle=Math.max(0,50*(x.y-m.y)/m.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});m.push(c);return m},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(qa.prototype.size,!1),display:Ab(wa.prototype.size,!1),cube:ob(1,
+n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=eb;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=mb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=mb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,na=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);jb?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
+db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(m,x/(.5+p));m=(m-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x+.75*p));return c};l.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(m*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,m,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,l,x){c=[];l=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};C.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ta.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
-ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,m,x){c=[];m=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};C.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ua.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -2905,85 +2906,85 @@ ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraint
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Va.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
-function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(m-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};N.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,E){E.getModel().beginUpdate();try{var C=E.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,E.getModel().setGeometry(g,
-C));E.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);E.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{E.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
-m=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&m==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var E=!0,C=0;C<
-y.length&&E;C++)E=E&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&E){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,E);null!=H&&(E=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,E-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
-null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
-try{var E=t.getEditableCells(t.getSelectionCells());if(0==E.length)q(y.getRoot(),n.copiedValue);else for(m=0;m<E.length;m++)q(E[m],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,m){g=null!=m?m:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
+Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),l=0;l<g.length;l++)t.cellLabelChanged(g[l],"")}finally{t.getModel().endUpdate()}}}function k(g,l,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
+C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,l,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
+l=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&l==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(g,l){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(l){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(l){if(null!=l){t.getModel().beginUpdate();try{n.pasteXml(l,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(l){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function l(y){if(null!=y){for(var F=!0,C=0;C<
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&F){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,F);null!=H&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,F-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{l(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{l(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),l=0;l<g.length;l++)if(t.getModel().isVertex(g[l])){var q=t.getCellGeometry(g[l]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[l],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
+null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,l){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=l?l:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
+try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(l=0;l<F.length;l++)q(F[l],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,l){g=null!=l?l:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{t.setSelectionCells(t.duplicateCells()),t.scrollCellToVisible(t.getSelectionCell())}catch(g){n.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var g=n.getSelectionState();if(null!=g.mergeCell){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",g.rowspan,[g.mergeCell]),t.setCellStyles("colspan",g.colspan,[g.mergeCell])}finally{t.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,m){g=null!=m?m:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,l){g=null!=l?l:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(g){g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.addSelectionCells(t.getEdges(g))}));this.addAction("selectVertices",function(){t.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){t.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){t.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){t.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(m,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(l,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
q,g);t.setCellStyles("connectable",q,g)}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){t.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){t.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){t.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){t.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){t.foldCells(!1)},
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){t.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){t.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(g){t.orderCells(!1,null,!0)});this.addAction("sendBackward",function(g){t.orderCells(!0,null,!0)});this.addAction("group",function(){if(t.isEnabled()){var g=mxUtils.sortCells(t.getSelectionCells(),!0);1!=g.length||t.isTable(g[0])||t.isTableRow(g[0])?
-(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var m=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),m.push(g[q]))}finally{t.model.endUpdate()}0<
-m.length&&t.setSelectionCells(m)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var m=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||m.push(g[q]);t.removeCellsFromParent(m)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(m=q)}m=new TextareaDialog(n,mxResources.get("editTooltip")+":",m,function(y){t.setTooltipForCell(g,
-y)});n.showDialog(m.container,320,200,!0,!0);m.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m=t.getLinkForCell(g)||"";n.showLinkDialog(m,mxResources.get("apply"),function(q,y,E){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",E)},!0,t.getLinkTargetForCell(g))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,m,q){g=mxUtils.trim(g);if(0<g.length){var y=null,E=t.getLinkTitle(g);null!=m&&0<m.length&&(y=m[0].iconUrl,
-E=m[0].name||m[0].type,E=E.charAt(0).toUpperCase()+E.substring(1),30<E.length&&(E=E.substring(0,30)+"..."));m=new mxCell(E,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));m.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([m],!0));m.geometry.x=y.x;m.geometry.y=y.y;t.setAttributeForCell(m,"linkTarget",q);t.setLinkForCell(m,g);t.cellSizeUpdated(m,
-!0);t.getModel().beginUpdate();try{m=t.addCell(m),t.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{t.getModel().endUpdate()}t.setSelectionCell(m);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),m=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==m&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
-E=0;E<y.length&&null==m;E++)y[E].textContent==g.textContent&&(m=y[E]);null!=m&&"A"==m.nodeName&&(q=m.getAttribute("href")||"",t.selectNode(m));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
-try{for(var m=0;m<g.length;m++){var q=g[m];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var m=t.getEditableCells(t.getSelectionCells()),
-q=0;q<m.length;q++)if(state=t.getView().getState(m[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var E=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(E=E.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(E);E=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,E);t.setCellStyles("html",g,[m[q]])}else"0"==y&&"1"==g&&(E=mxUtils.htmlEntities(t.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(E=E.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(E)),t.setCellStyles("html",g,[m[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",m))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),m="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(m=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-m)});this.addAction("rotation",function(){var g="0",m=t.getView().getState(t.getSelectionCell());null!=m&&(g=m.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),m=t.view.translate,q=t.view.scale;g.x=g.x/q-m.x;g.y=g.y/q-m.y;g.width/=q;
-g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(g.x-=m.x,g.y-=m.y,g.width+=m.width+m.x,g.height+=m.height+m.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*
-Math.min((t.container.clientWidth-10)/g.width/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
-10)/(2*g.width)/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
-t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&t.zoomTo(m/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
-300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&(m=new ChangePageSetup(n,null,null,null,m/100),m.ignoreColor=!0,m.ignoreImage=!0,t.model.execute(m))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
+(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var l=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),l.push(g[q]))}finally{t.model.endUpdate()}0<
+l.length&&t.setSelectionCells(l)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var l=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||l.push(g[q]);t.removeCellsFromParent(l)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(l=q)}l=new TextareaDialog(n,mxResources.get("editTooltip")+":",l,function(y){t.setTooltipForCell(g,
+y)});n.showDialog(l.container,320,200,!0,!0);l.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l=t.getLinkForCell(g)||"";n.showLinkDialog(l,mxResources.get("apply"),function(q,y,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,l,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=l&&0<l.length&&(y=l[0].iconUrl,
+F=l[0].name||l[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));l=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));l.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([l],!0));l.geometry.x=y.x;l.geometry.y=y.y;t.setAttributeForCell(l,"linkTarget",q);t.setLinkForCell(l,g);t.cellSizeUpdated(l,
+!0);t.getModel().beginUpdate();try{l=t.addCell(l),t.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{t.getModel().endUpdate()}t.setSelectionCell(l);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),l=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==l&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
+F=0;F<y.length&&null==l;F++)y[F].textContent==g.textContent&&(l=y[F]);null!=l&&"A"==l.nodeName&&(q=l.getAttribute("href")||"",t.selectNode(l));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
+try{for(var l=0;l<g.length;l++){var q=g[l];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var l=t.getEditableCells(t.getSelectionCells()),
+q=0;q<l.length;q++)if(state=t.getView().getState(l[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[l[q]])}else"0"==y&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[l[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",l))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),l="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(l=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+l)});this.addAction("rotation",function(){var g="0",l=t.getView().getState(t.getSelectionCell());null!=l&&(g=l.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),l=t.view.translate,q=t.view.scale;g.x=g.x/q-l.x;g.y=g.y/q-l.y;g.width/=q;
+g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(g.x-=l.x,g.y-=l.y,g.width+=l.width+l.x,g.height+=l.height+l.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*
+Math.min((t.container.clientWidth-10)/g.width/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
+10)/(2*g.width)/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
+t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&t.zoomTo(l/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
+300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&(l=new ChangePageSetup(n,null,null,null,l/100),l.ignoreColor=!0,l.ignoreImage=!0,t.model.execute(l))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
function(){t.setGridEnabled(!t.isGridEnabled());t.defaultGridEnabled=t.isGridEnabled();n.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.isGridEnabled()});d.setEnabled(!1);d=this.addAction("guides",function(){t.graphHandler.guidesEnabled=!t.graphHandler.guidesEnabled;n.fireEvent(new mxEventObject("guidesEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.graphHandler.guidesEnabled});
d.setEnabled(!1);d=this.addAction("tooltips",function(){t.tooltipHandler.setEnabled(!t.tooltipHandler.isEnabled());n.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.tooltipHandler.isEnabled()});d=this.addAction("collapseExpand",function(){var g=new ChangePageSetup(n);g.ignoreColor=!0;g.ignoreImage=!0;g.foldingEnabled=!t.foldingEnabled;t.model.execute(g)});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.foldingEnabled});
-d.isEnabled=F;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+d.isEnabled=E;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
null,"Alt+Shift+A");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionArrowsEnabled});d=this.addAction("connectionPoints",function(){t.setConnectable(!t.connectionHandler.isEnabled());n.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isEnabled()});d=this.addAction("copyConnect",function(){t.connectionHandler.setCreateTarget(!t.connectionHandler.isCreateTarget());
-n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=F;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=F;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
-"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,m,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var E=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,m,E);(m&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(E,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(E,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(E,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<E.length;C++)0==t.model.getChildCount(E[C])&&t.autoSizeCell(E[C],
+n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=E;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=E;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
+"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,l,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,l,F);(l&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
!1)}finally{t.getModel().endUpdate()}}},null,null,y)});d("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");d("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");d("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){n.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){n.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){n.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){n.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,null),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dashed",function(){t.getModel().beginUpdate();
try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dotted",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),n.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("sharp",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});
-this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(g[0]),
-q="1"==mxUtils.getValue(m,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),m="1";null!=g&&null!=t.getFoldingImage(g)&&(m="0");t.setCellStyles("collapsible",m);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[m],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var m=t.getModel();m=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",m.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(m.container,420,300,!0,!0);m.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var m=D.graph.selectionCellsHandler.getHandler(g);if(m instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,E=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)E+=C.x,q+=C.y,g=
-t.getModel().getParent(g),C=t.getCellGeometry(g);E=Math.round(t.snap(t.popupMenuHandler.triggerX/y-E));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,E,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
-0;y<q.length;y++){var E=q[y];if(t.getModel().isEdge(E)){var C=t.getCellGeometry(E);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[E]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[E]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[E]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[E])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(E,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
-mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var E=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(E),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(g[0]),
+q="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),l="1";null!=g&&null!=t.getFoldingImage(g)&&(l="0");t.setCellStyles("collapsible",l);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[l],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var l=t.getModel();l=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",l.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(l.container,420,300,!0,!0);l.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var l=D.graph.selectionCellsHandler.getHandler(g);if(l instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
+t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));l.addPointAt(l.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,l){g=null!=l?l:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
+0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=l&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
+mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",l=t.getView().getState(t.getSelectionCell()),
+q="",y=null;null!=l&&(q=l.style[mxConstants.STYLE_IMAGE]||q,y=l.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var O=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=O.x;Y[0].geometry.y=O.y;null!=aa&&k(Y[0],aa,da,ba,t);qa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
-null!=H&&null!=G){var ea=Y[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=H,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,da,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=F;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
-null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(E,C,H){k(g,E,C,H,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=F;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
+null!=H&&null!=G){var ea=Y[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=H,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,da,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+null!=g){var l=t.getCurrentCellStyle(g),q=l[mxConstants.STYLE_IMAGE],y=l[mxConstants.STYLE_SHAPE];q&&"image"==y&&(l=new CropImageDialog(n,q,l[mxConstants.STYLE_CLIP_PATH],function(F,C,H){k(g,F,C,H,t)}),n.showDialog(l.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var m=new ConnectionPointsDialog(n,
-g);n.showDialog(m.container,350,450,!0,!1,function(){m.destroy()});m.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var l=new ConnectionPointsDialog(n,
+g);n.showDialog(l.container,350,450,!0,!1,function(){l.destroy()});l.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,k,n,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=n;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
@@ -2991,26 +2992,26 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,n){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,n):this.reloadFile(b,
e))}catch(t){null!=e&&e(t)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var d=[this.ui.diffPages(null!=n?n:t,F)],f=this.ignorePatches(d);this.setShadowPages(F);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
-n),q=this.ui.getHashValueForPages(F,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(F)),E=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+E,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),l=this.ui.getHashValueForPages(g,
+n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",q,"valid",l==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var aa=this.getCurrentUser(),da=null!=aa?aa.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),da,ba)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(f){var g=this.compressReportData(JSON.stringify(e,null,2));f=null==f?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(f.data)),
-25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+g+(null!=f?"\n\nRemote:\n"+f:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(f){null!=f&&f.getCurrentEtag()==n?t(f):t(null)}),function(){})}else{var F=this.getCurrentUser(),d=null!=F?F.id:"unknown";EditorUi.logError("Checksum Error in "+D+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+g+(null!=f?"\n\nRemote:\n"+f:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(f){null!=f&&f.getCurrentEtag()==n?t(f):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown";EditorUi.logError("Checksum Error in "+D+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:D,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),d=null!=F?this.ui.hashValue(F.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");F="xml";0<m&&(F=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),l=g.lastIndexOf(".");E="xml";0<l&&(E=g.substring(l));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+D+"\n\nData:\n"+t,n)}catch(y){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){this.stats.fileReloaded++;var n=this.ui.editor.graph.getViewState(),D=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,n,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats);null!=b&&
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){this.stats.fileReloaded++;var n=this.ui.editor.graph.getViewState(),D=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,n,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=F.foldingEnabled,g=F.mathEnabled,m=F.cellRenderer.redraw;F.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=m;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=F.mathEnabled?
-(this.ui.editor.updateGraphComponents(),F.refresh()):(f!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,l=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());l.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=l;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(f!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,n,D,t){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",n,"overwrite",D,"manual",t,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
DrawioFile.prototype.saveFile=function(b,e,k,n){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3046,26 +3047,26 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),n=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,n,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),n=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,n,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,n,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),n)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,n,D):this.invalidChecksum?this.showRefreshDialog(k,n,this.getErrorMessage(b)):e?this.showConflictDialog(D,t):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(k,n)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,n,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var t=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(t),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(t,e,k,n,D)}catch(f){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=n&&n(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var F=this.getCurrentUser(),d=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,f)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=n&&n(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,f)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,n){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"saving",this.savingFile,"modified",this.isModified(),"now",this.isAutosaveNow());if(this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();
-t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=n&&n(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=n&&n(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,n,D,t){DrawioFile.call(this,b,e);this.title=k;this.mode=n?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=t};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var m=mxUtils.bind(this,
-function(y){this.savingFile=!1;null!=n&&n({error:y})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(y){this.fileHandle.getFile().then(mxUtils.bind(this,function(E){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[E],"conflict",this.desc.lastModified!=E.lastModified);this.desc.lastModified==E.lastModified?y.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){y.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(F,H,d,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(E){this.invalidFileHandle=!0;m(E)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):f(F)};
+LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
+function(y){this.savingFile=!1;null!=n&&n({error:y})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(y){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[F],"conflict",this.desc.lastModified!=F.lastModified);this.desc.lastModified==F.lastModified?y.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){y.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,H,d,l);this.removeDraft()}catch(G){l(G)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;l(F)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):f(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3184,15 +3185,15 @@ mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u(
P=0;P<J.length;P++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[oa]=va;N.push(va+"\n");W--;S()}),mxUtils.bind(this,function(va){W--;N.push("@import url("+oa+");\n");S()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[P].name,J[P].url);S()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
if(null!=u&&0<u.length)for(var J=document.getElementsByTagName("style"),N=0;N<J.length;N++){var W=mxUtils.getTextContent(J[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(J[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,J){J=null!=J?J:this.absoluteCssFonts(this.fontCss);if(null!=J){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,J);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,J,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/J))};Editor.prototype.exportToCanvas=function(u,J,N,
-W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na,Ca,Qa,Ta,Ka){try{P=null!=P?P:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;ta=null!=ta?ta:0;var bb=va?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==va&&(bb=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,ta,Na,null,Z,null,null,null,Aa,null,Qa,Ta,Ka),mxUtils.bind(this,function(Ua){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
-0,0);u(M,Ua)},0):(ia.drawImage($a,0,0),u(M,Ua))},M=document.createElement("canvas"),T=parseInt(Ua.getAttribute("width")),ca=parseInt(Ua.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=P?Math.min(1,Math.min(3*J/(4*ca),J/T)):J/T);oa=this.getMaxCanvasScale(T,ca,oa);T=Math.ceil(oa*T);ca=Math.ceil(oa*ca);M.setAttribute("width",T);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,T,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var ma=Ba.view,
-pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Pa=Ma+(Fa.x-Ma)/pa-ta,Sa=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Pa)*oa,ya)),Ea=-Math.round(ya-mxUtils.mod((Oa-Sa)*oa,ya));wa<T;wa+=ya)for(var Da=Ea;Da<ca;Da+=ya)ia.drawImage(za,wa/oa,Da/oa);L()}catch(La){null!=
-S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});$a.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Ua);this.graph.mathEnabled&&this.addMathCss(Ua);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ua,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Ua))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Ua,L),this.loadFonts(z)}catch(M){null!=
-S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Ua){null!=S&&S(Ua)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
+W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na,Ca,Qa,Ua,Ka){try{P=null!=P?P:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;ta=null!=ta?ta:0;var bb=va?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==va&&(bb=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,ta,Na,null,Z,null,null,null,Aa,null,Qa,Ua,Ka),mxUtils.bind(this,function(Va){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
+0,0);u(M,Va)},0):(ia.drawImage($a,0,0),u(M,Va))},M=document.createElement("canvas"),T=parseInt(Va.getAttribute("width")),ca=parseInt(Va.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=P?Math.min(1,Math.min(3*J/(4*ca),J/T)):J/T);oa=this.getMaxCanvasScale(T,ca,oa);T=Math.ceil(oa*T);ca=Math.ceil(oa*ca);M.setAttribute("width",T);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,T,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var ma=Ba.view,
+pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Pa=Ma+(Fa.x-Ma)/pa-ta,Sa=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Pa)*oa,ya)),Da=-Math.round(ya-mxUtils.mod((Oa-Sa)*oa,ya));wa<T;wa+=ya)for(var Ea=Da;Ea<ca;Ea+=ya)ia.drawImage(za,wa/oa,Ea/oa);L()}catch(La){null!=
+S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});$a.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Va);this.graph.mathEnabled&&this.addMathCss(Va);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Va,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Va))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Va,L),this.loadFonts(z)}catch(M){null!=
+S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Va){null!=S&&S(Va)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"==
P(u,4)){S=u.substring(0,va-8);"pHYs"==J&&"dpi"==N?(N=Math.round(W/.0254),N=oa(N)+oa(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==J?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,J,0,4);W=Editor.updateCRC(W,N,0,N.length);S+=oa(N.length)+J+N+oa(W^4294967295);S+=u.substring(va-8,u.length);break}S+=u.substring(va-8,va-4+Aa);P(u,Aa);P(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(S):Base64.encode(S,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,J){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,J){var N=null;null!=u.editor.graph.getModel().getParent(J)?
-N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
+N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var J=this.editorUi,N=J.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(S){var P=new ChangePageSetup(J);
P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=S;N.model.execute(P)},{install:function(S){this.listener=function(){S(N.shadowVisible)};J.addListener("shadowVisibleChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
arguments);var J=this.editorUi,N=J.editor.graph;if(N.isEnabled()){var W=J.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var S=this.createOption(mxResources.get("autosave"),function(){return J.editor.autosave},function(Z){J.editor.setAutosave(Z);J.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(J.editor.autosave)};J.editor.addListener("autosaveChanged",this.listener)},destroy:function(){J.editor.removeListener(this.listener)}});u.appendChild(S)}}if(this.isMathOptionVisible()&&
@@ -3220,8 +3221,8 @@ stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,J,N){if(null!=J){var W=function(P){if(null!=P)if(N)for(var Z=0;Z<P.length;Z++)J[P[Z].name]=P[Z];else for(var oa in J){var va=!1;for(Z=0;Z<P.length;Z++)if(P[Z].name==oa&&P[Z].type==J[oa].type){va=!0;break}va||delete J[oa]}},
-S=this.editorUi.editor.graph.view.getState(u);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),W(S.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(P){}}};var E=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));E.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,S=0;S<N.length;S++)this.findCommonProperties(N[S],J,0==S);for(S=0;S<W.length;S++)this.findCommonProperties(W[S],J,0==N.length&&0==S);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
+S=this.editorUi.editor.graph.view.getState(u);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),W(S.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(P){}}};var F=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,S=0;S<N.length;S++)this.findCommonProperties(N[S],J,0==S);for(S=0;S<W.length;S++)this.findCommonProperties(W[S],J,0==N.length&&0==S);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
this.container.appendChild(this.addProperties(this.createPanel(),J,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,J,N){function W(ia,ma,pa,ua){Ba.getModel().beginUpdate();try{var ya=[],Fa=[];if(null!=pa.index){for(var Ma=[],Oa=pa.parentRow.nextSibling;Oa&&Oa.getAttribute("data-pName")==
ia;)Ma.push(Oa.getAttribute("data-pValue")),Oa=Oa.nextSibling;pa.index<Ma.length?null!=ua?Ma.splice(ua,1):Ma[pa.index]=ma:Ma.push(ma);null!=pa.size&&Ma.length>pa.size&&(Ma=Ma.slice(0,pa.size));ma=Ma.join(",");null!=pa.countProperty&&(Ba.setCellStyles(pa.countProperty,Ma.length,Ba.getSelectionCells()),ya.push(pa.countProperty),Fa.push(Ma.length))}Ba.setCellStyles(ia,ma,Ba.getSelectionCells());ya.push(ia);Fa.push(ma);if(null!=pa.dependentProps)for(ia=0;ia<pa.dependentProps.length;ia++){var Pa=pa.dependentPropsDefVal[ia],
Sa=pa.dependentPropsVals[ia];if(Sa.length>ma)Sa=Sa.slice(0,ma);else for(var za=Sa.length;za<ma;za++)Sa.push(Pa);Sa=Sa.join(",");Ba.setCellStyles(pa.dependentProps[ia],Sa,Ba.getSelectionCells());ya.push(pa.dependentProps[ia]);Fa.push(Sa)}if("function"==typeof pa.onChange)pa.onChange(Ba,ma);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function S(ia,ma,pa){var ua=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(ia,
@@ -3230,25 +3231,25 @@ function(Fa){ua.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImag
ia)Pa=Pa.nextSibling,Sa++;else break;var za={type:pa,parentRow:Fa,index:Sa,isDeletable:!0,defVal:ua,countProperty:ya};Sa=Aa(ia,"",za,0==Sa%2,Ma);W(ia,ua,za);Pa.parentNode.insertBefore(Sa,Pa.nextSibling);mxEvent.consume(Oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(ia,ma,pa,ua,ya,Fa,Ma){if(0<ya){var Oa=Array(ya);ma=null!=ma?ma.split(","):[];for(var Pa=0;Pa<ya;Pa++)Oa[Pa]=null!=ma[Pa]?ma[Pa]:null!=ua?ua:"";ta.push({name:ia,values:Oa,type:pa,
defVal:ua,parentRow:Fa,flipBkg:Ma,size:ya})}return document.createElement("div")}function va(ia,ma,pa){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==ma;mxEvent.addListener(ua,"change",function(){W(ia,ua.checked?"1":"0",pa)});return ua}function Aa(ia,ma,pa,ua,ya){var Fa=pa.dispName,Ma=pa.type,Oa=document.createElement("tr");Oa.className="gePropRow"+(ya?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Oa.setAttribute("data-pName",ia);Oa.setAttribute("data-pValue",ma);ua=!1;
null!=pa.index&&(Oa.setAttribute("data-index",pa.index),Fa=(null!=Fa?Fa:"")+"["+pa.index+"]",ua=!0);var Pa=document.createElement("td");Pa.className="gePropRowCell";Fa=mxResources.get(Fa,null,Fa);mxUtils.write(Pa,Fa);Pa.setAttribute("title",Fa);ua&&(Pa.style.textAlign="right");Oa.appendChild(Pa);Pa=document.createElement("td");Pa.className="gePropRowCell";if("color"==Ma)Pa.appendChild(P(ia,ma,pa));else if("bool"==Ma||"boolean"==Ma)Pa.appendChild(va(ia,ma,pa));else if("enum"==Ma){var Sa=pa.enumList;
-for(ya=0;ya<Sa.length;ya++)if(Fa=Sa[ya],Fa.val==ma){mxUtils.write(Pa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){var za=document.createElement("select");S(Pa,za);for(var wa=0;wa<Sa.length;wa++){var Ea=Sa[wa],Da=document.createElement("option");Da.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));za.appendChild(Da)}za.value=ma;u.appendChild(za);mxEvent.addListener(za,"change",function(){var La=
+for(ya=0;ya<Sa.length;ya++)if(Fa=Sa[ya],Fa.val==ma){mxUtils.write(Pa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){var za=document.createElement("select");S(Pa,za);for(var wa=0;wa<Sa.length;wa++){var Da=Sa[wa],Ea=document.createElement("option");Ea.value=mxUtils.htmlEntities(Da.val);mxUtils.write(Ea,mxResources.get(Da.dispName,null,Da.dispName));za.appendChild(Ea)}za.value=ma;u.appendChild(za);mxEvent.addListener(za,"change",function(){var La=
mxUtils.htmlEntities(za.value);W(ia,La,pa)});za.focus();mxEvent.addListener(za,"blur",function(){u.removeChild(za)})}))}else"dynamicArr"==Ma?Pa.appendChild(Z(ia,ma,pa.subType,pa.subDefVal,pa.countProperty,Oa,ya)):"staticArr"==Ma?Pa.appendChild(oa(ia,ma,pa.subType,pa.subDefVal,pa.size,Oa,ya)):"readOnly"==Ma?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=ma,ya.style.width="96px",ya.style.borderWidth="0px",Pa.appendChild(ya)):(Pa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),
-mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){function za(){var Ea=wa.value;Ea=0==Ea.length&&"string"!=Ma?0:Ea;pa.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ma="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=pa.min&&Ea<pa.min?Ea=pa.min:null!=pa.max&&Ea>pa.max&&(Ea=pa.max);Ea=encodeURIComponent(("int"==Ma?parseInt(Ea):Ea)+"");W(ia,Ea,pa)}var wa=document.createElement("input");S(Pa,wa,!0);wa.value=decodeURIComponent(ma);wa.className="gePropEditor";"int"!=
-Ma&&"float"!=Ma||pa.allowAuto||(wa.type="number",wa.step="int"==Ma?"1":"any",null!=pa.min&&(wa.min=parseFloat(pa.min)),null!=pa.max&&(wa.max=parseFloat(pa.max)));u.appendChild(wa);mxEvent.addListener(wa,"keypress",function(Ea){13==Ea.keyCode&&za()});wa.focus();mxEvent.addListener(wa,"blur",function(){za()})})));pa.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(sa,function(za){W(ia,"",pa,pa.index);mxEvent.consume(za)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
-"geColorBtn",Pa.appendChild(ya));Oa.appendChild(Pa);return Oa}var sa=this,Ba=this.editorUi.editor.graph,ta=[];u.style.position="relative";u.style.padding="0";var Na=document.createElement("table");Na.className="geProperties";Na.style.whiteSpace="nowrap";Na.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign=
-"middle";Qa.appendChild(Ta);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var ia=Na.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var ma="none";for(var pa=u.childNodes.length-1;0<=pa;pa--)try{var ua=u.childNodes[pa],ya=ua.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(ua)}catch(Fa){}}else Ta.src=Sidebar.prototype.expandedImage,ma="";for(pa=0;pa<ia.length;pa++)ia[pa].style.display=
-ma};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);Na.appendChild(Ca);var bb=!1,Ua=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Na.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
-!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Ua=!Ua;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],T=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];T.push(J[L[Qa]].subDefVal);M.push(null!=
-ca?ca.split(","):[])}Ca.dependentPropsDefVal=T;Ca.dependentPropsVals=M}Na.appendChild(Aa($a,z,Ca,bb,Ua));bb=!bb}}for(Qa=0;Qa<ta.length;Qa++)for(Ca=ta[Qa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Na);Ka();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
+mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){function za(){var Da=wa.value;Da=0==Da.length&&"string"!=Ma?0:Da;pa.allowAuto&&(null!=Da.trim&&"auto"==Da.trim().toLowerCase()?(Da="auto",Ma="string"):(Da=parseFloat(Da),Da=isNaN(Da)?0:Da));null!=pa.min&&Da<pa.min?Da=pa.min:null!=pa.max&&Da>pa.max&&(Da=pa.max);Da=encodeURIComponent(("int"==Ma?parseInt(Da):Da)+"");W(ia,Da,pa)}var wa=document.createElement("input");S(Pa,wa,!0);wa.value=decodeURIComponent(ma);wa.className="gePropEditor";"int"!=
+Ma&&"float"!=Ma||pa.allowAuto||(wa.type="number",wa.step="int"==Ma?"1":"any",null!=pa.min&&(wa.min=parseFloat(pa.min)),null!=pa.max&&(wa.max=parseFloat(pa.max)));u.appendChild(wa);mxEvent.addListener(wa,"keypress",function(Da){13==Da.keyCode&&za()});wa.focus();mxEvent.addListener(wa,"blur",function(){za()})})));pa.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(sa,function(za){W(ia,"",pa,pa.index);mxEvent.consume(za)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
+"geColorBtn",Pa.appendChild(ya));Oa.appendChild(Pa);return Oa}var sa=this,Ba=this.editorUi.editor.graph,ta=[];u.style.position="relative";u.style.padding="0";var Na=document.createElement("table");Na.className="geProperties";Na.style.whiteSpace="nowrap";Na.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign=
+"middle";Qa.appendChild(Ua);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var ia=Na.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var ma="none";for(var pa=u.childNodes.length-1;0<=pa;pa--)try{var ua=u.childNodes[pa],ya=ua.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(ua)}catch(Fa){}}else Ua.src=Sidebar.prototype.expandedImage,ma="";for(pa=0;pa<ia.length;pa++)ia[pa].style.display=
+ma};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);Na.appendChild(Ca);var bb=!1,Va=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Na.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Va=!Va;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],T=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];T.push(J[L[Qa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=T;Ca.dependentPropsVals=M}Na.appendChild(Aa($a,z,Ca,bb,Va));bb=!bb}}for(Qa=0;Qa<ta.length;Qa++)for(Ca=ta[Qa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Na);Ka();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
"mouseenter",function(){Ca.style.opacity="1"});mxEvent.addListener(Ca,"mouseleave",function(){Ca.style.opacity="0.5"})}var N=this.editorUi,W=N.editor.graph,S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.paddingLeft="24px";S.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(S);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],va=0;va<this.defaultColorSchemes.length;va++){var Aa=document.createElement("div");Aa.style.display="inline-block";Aa.style.width="6px";Aa.style.height="6px";Aa.style.marginLeft="4px";Aa.style.marginRight="3px";Aa.style.borderRadius="3px";Aa.style.cursor="pointer";Aa.style.background="transparent";Aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,
function(Ca){mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(Ca)}))})(va);oa.push(Aa);Z.appendChild(Aa)}var sa=mxUtils.bind(this,function(Ca){null!=oa[Ca]&&(null!=this.format.currentScheme&&null!=oa[this.format.currentScheme]&&(oa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Ba(this.defaultColorSchemes[this.format.currentScheme]),oa[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(Ca){var Qa=mxUtils.bind(this,
function(Ka){var bb=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var T=W.getModel().getStyle(L[M]),ca=0;ca<P.length;ca++)T=mxUtils.removeStylename(T,P[ca]);var ia=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ka?(mxEvent.isShiftDown(z)||(T=""==Ka.fill?mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,Ka.fill||mxUtils.getValue(ia,
mxConstants.STYLE_FILLCOLOR,null)),T=mxUtils.setStyle(T,mxConstants.STYLE_GRADIENTCOLOR,Ka.gradient||mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(T=mxUtils.setStyle(T,mxConstants.STYLE_FONTCOLOR,Ka.font||mxUtils.getValue(ia,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(T=""==Ka.stroke?mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,
Ka.stroke||mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,null)))):(T=mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_FILLCOLOR,"#ffffff")),T=mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,"#000000")),T=mxUtils.setStyle(T,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(T=mxUtils.setStyle(T,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ia,
-mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],T)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ka){var Ua="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ka.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ka.fill+"', EndColorStr='"+Ka.gradient+"', GradientType=0)":
-bb.style.backgroundImage="linear-gradient("+Ka.fill+" 0px,"+Ka.gradient+" 100%)":Ka.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ka.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ka.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ka.stroke==mxConstants.NONE?Ua+" transparent":
-""==Ka.stroke?Ua+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ua+" "+(Ka.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ka.title&&bb.setAttribute("title",Ka.title)}else{Ua=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
-Ua;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";S.appendChild(bb)});S.innerHTML="";for(var Ta=0;Ta<Ca.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(S),Qa(Ca[Ta])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var ta=document.createElement("div");ta.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],T)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ka){var Va="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ka.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ka.fill+"', EndColorStr='"+Ka.gradient+"', GradientType=0)":
+bb.style.backgroundImage="linear-gradient("+Ka.fill+" 0px,"+Ka.gradient+" 100%)":Ka.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ka.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ka.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ka.stroke==mxConstants.NONE?Va+" transparent":
+""==Ka.stroke?Va+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Va+" "+(Ka.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ka.title&&bb.setAttribute("title",Ka.title)}else{Va=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
+Va;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";S.appendChild(bb)});S.innerHTML="";for(var Ua=0;Ua<Ca.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(S),Qa(Ca[Ua])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var ta=document.createElement("div");ta.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Na=document.createElement("div");Na.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(u.appendChild(ta),u.appendChild(Na));mxEvent.addListener(Na,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(ta);J(Na);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var J=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==J.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(S){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==J.cells.length?N.view.getState(J.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(J=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(S){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
@@ -3261,22 +3262,22 @@ null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}return u};Graph.prototype
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(S){J=S}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var J=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(S){J=null});this.isMouseInsertPoint=function(){return null!=J};var N=this.getInsertPoint;
this.getInsertPoint=function(){return null!=J?this.getPointForEvent(J):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(S){var P=this.graph.getCellStyle(S);if(null!=P&&"rack"==P.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=P.marginLeft||0;Z.marginRight=P.marginRight||0;Z.marginTop=P.marginTop||0;Z.marginBottom=
P.marginBottom||0;Z.allowGaps=P.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,J){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,J,N,W,S,P,Z,oa,va,Aa,sa){aa.apply(this,arguments);
-Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Ta=0;Ta<Ca.length;Ta++)Z.isCellVisible(Ca[Ta])&&Qa.push(Ca[Ta]);Z.setSelectionCells(Qa)}function S(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function P(Ca,Qa){Aa.innerHTML="";if(0<Ca.length){var Ta=
-document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Ka=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Ua){var $a=0>mxUtils.indexOf(Z.hiddenTags,Ua),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:Editor.hiddenImage);
-M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(Z.hiddenTags,Ua);mxEvent.isShiftDown(ca)?S(0<=mxUtils.indexOf(Z.hiddenTags,Ua)):(0>ia?Z.hiddenTags.push(Ua):0<=ia&&Z.hiddenTags.splice(ia,1),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);
-L=document.createElement("td");L.style.overflow="hidden";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Ua);a=document.createElement("a");mxUtils.write(a,Ua);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){S(!0);var ia=Z.getCellsForTags([Ua],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):
-Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)S(!0);else{ia=oa.slice();var ma=mxUtils.indexOf(ia,Ua);ia.splice(ma,1);Z.hiddenTags=ia;W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",
-[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Ua);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Ua]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px";T.defaultChecked=
-null!=Qa&&0<=mxUtils.indexOf(Qa,Ua);T.checked=T.defaultChecked;T.style.background="transparent";T.setAttribute("title",mxResources.get(T.defaultChecked?"removeIt":"add",[Ua]));mxEvent.addListener(T,"change",function(ca){T.checked?Z.addTagsForCells(Z.getSelectionCells(),[Ua]):Z.removeTagsForCells(Z.getSelectionCells(),[Ua]);mxEvent.consume(ca)});L.appendChild(T)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ta.appendChild(Ka);Aa.appendChild(Ta)}}var Z=this,oa=Z.hiddenTags.slice(),va=document.createElement("div");
+Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Ua=0;Ua<Ca.length;Ua++)Z.isCellVisible(Ca[Ua])&&Qa.push(Ca[Ua]);Z.setSelectionCells(Qa)}function S(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function P(Ca,Qa){Aa.innerHTML="";if(0<Ca.length){var Ua=
+document.createElement("table");Ua.setAttribute("cellpadding","2");Ua.style.boxSizing="border-box";Ua.style.tableLayout="fixed";Ua.style.width="100%";var Ka=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Va){var $a=0>mxUtils.indexOf(Z.hiddenTags,Va),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:Editor.hiddenImage);
+M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Va]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(Z.hiddenTags,Va);mxEvent.isShiftDown(ca)?S(0<=mxUtils.indexOf(Z.hiddenTags,Va)):(0>ia?Z.hiddenTags.push(Va):0<=ia&&Z.hiddenTags.splice(ia,1),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);
+L=document.createElement("td");L.style.overflow="hidden";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Va);a=document.createElement("a");mxUtils.write(a,Va);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){S(!0);var ia=Z.getCellsForTags([Va],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):
+Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)S(!0);else{ia=oa.slice();var ma=mxUtils.indexOf(ia,Va);ia.splice(ma,1);Z.hiddenTags=ia;W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",
+[Va]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Va);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Va]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px";T.defaultChecked=
+null!=Qa&&0<=mxUtils.indexOf(Qa,Va);T.checked=T.defaultChecked;T.style.background="transparent";T.setAttribute("title",mxResources.get(T.defaultChecked?"removeIt":"add",[Va]));mxEvent.addListener(T,"change",function(ca){T.checked?Z.addTagsForCells(Z.getSelectionCells(),[Va]):Z.removeTagsForCells(Z.getSelectionCells(),[Va]);mxEvent.consume(ca)});L.appendChild(T)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ua.appendChild(Ka);Aa.appendChild(Ua)}}var Z=this,oa=Z.hiddenTags.slice(),va=document.createElement("div");
va.style.userSelect="none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.borderRadius="4px";Aa.style.userSelect="none";Aa.style.overflow="auto";Aa.style.position="absolute";Aa.style.left="10px";Aa.style.right="10px";Aa.style.top="10px";Aa.style.border=Z.isEnabled()?"1px solid #808080":"none";Aa.style.bottom=Z.isEnabled()?"48px":"10px";va.appendChild(Aa);var sa=mxUtils.button(mxResources.get("reset"),
function(Ca){Z.hiddenTags=[];mxEvent.isShiftDown(Ca)||(oa=Z.hiddenTags.slice());W();Z.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;ta()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var ta=mxUtils.bind(this,function(Ca,Qa){if(u()){Ca=Z.getAllTags();
for(Qa=0;Qa<Ca.length;Qa++)0>mxUtils.indexOf(oa,Ca[Qa])&&oa.push(Ca[Qa]);oa.sort();Z.isSelectionEmpty()?P(oa):P(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,ta);Z.model.addListener(mxEvent.CHANGE,ta);Z.addListener(mxEvent.REFRESH,ta);var Na=document.createElement("div");Na.style.boxSizing="border-box";Na.style.whiteSpace="nowrap";Na.style.position="absolute";Na.style.overflow="hidden";Na.style.bottom="0px";Na.style.height="42px";Na.style.right=
"10px";Na.style.left="10px";Z.isEnabled()&&(Na.appendChild(sa),Na.appendChild(Ba),va.appendChild(Na));return{div:va,refresh:ta}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var J in Graph.customFontElements){var N=Graph.customFontElements[J];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,J){Graph.addFont(u,J);document.execCommand("fontname",!1,u);if(null!=J){var N=this.cellEditor.textarea.getElementsByTagName("font");J=Graph.getFontUrl(u,
J);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==u&&N[W].getAttribute("data-font-src")!=J&&N[W].setAttribute("data-font-src",J)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=u)for(var J in u)this.globalVars[J]=u[J]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var J=Y.apply(this,arguments);null==J&&null!=this.globalVars&&(J=this.globalVars[u]);return J};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na){var Ca=null,Qa=null,Ta=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ka=qa.apply(this,arguments),bb=this.getCustomFonts();if(sa&&0<bb.length){var Ua=Ka.ownerDocument,$a=null!=Ua.createElementNS?Ua.createElementNS(mxConstants.NS_SVG,"style"):Ua.createElement("style");null!=Ua.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var T=
-bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+T+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Ua.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return Ka};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na){var Ca=null,Qa=null,Ua=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Ua=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ka=qa.apply(this,arguments),bb=this.getCustomFonts();if(sa&&0<bb.length){var Va=Ka.ownerDocument,$a=null!=Va.createElementNS?Va.createElementNS(mxConstants.NS_SVG,"style"):Va.createElement("style");null!=Va.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var T=
+bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+T+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Va.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return Ka};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;
u.drawText=function(N,W){if(null!=N.text&&null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var S=N.text.getContentNode();if(null!=S){S=S.cloneNode(!0);if(S.getElementsByTagNameNS)for(var P=S.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<P.length;)P[0].parentNode.removeChild(P[0]);null!=S.innerHTML&&(P=N.text.value,N.text.value=S.innerHTML,J.apply(this,arguments),N.text.value=P)}}else J.apply(this,arguments)}}return u};
var X=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(u){X.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ea.apply(this,arguments);this.enumerationState=0};var ka=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=
function(u){null!=u.shape&&this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var J="1"==mxUtils.getValue(u.style,"enumerate",0);J&&null==u.secondLabel?
@@ -3318,113 +3319,113 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var J=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?J="mxgraph.er":"sysML"==u.substring(0,5)&&(J="mxgraph.sysml"));return J};var Q=mxMarker.createMarker;mxMarker.createMarker=function(u,J,N,W,S,P,Z,oa,va,Aa){if(null!=N&&null==mxMarker.markers[N]){var sa=this.getPackageForType(N);null!=sa&&mxStencilRegistry.getStencil(sa)}return Q.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
-function(u,J,N,W,S,P){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){ta.value=Math.max(1,Math.min(oa,Math.max(parseInt(ta.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(ta.value),parseInt(Ba.value))))}function W(Fa){function Ma(cb,gb,tb){var qb=cb.useCssTransforms,yb=cb.currentTranslate,ub=cb.currentScale,
-vb=cb.view.translate,wb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var lb=cb.getGraphBounds(),kb=0,fb=0,mb=ua.get(),xb=1/cb.pageScale,rb=Ka.checked;if(rb){xb=parseInt(ma.value);var zb=parseInt(pa.value);xb=Math.min(mb.height*zb/(lb.height/cb.view.scale),mb.width*xb/(lb.width/cb.view.scale))}else xb=parseInt(Ta.value)/(100*cb.pageScale),isNaN(xb)&&(Oa=1/cb.pageScale,Ta.value="100 %");
-mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Oa);mb.height=Math.ceil(mb.height*Oa);xb*=Oa;!rb&&cb.pageVisible?(lb=cb.getPageLayout(),kb-=lb.x*mb.width,fb-=lb.y*mb.height):rb=!0;if(null==gb){gb=PrintDialog.createPrintPreview(cb,xb,mb,0,kb,fb,rb);gb.pageSelector=!1;gb.mathEnabled=!1;Na.checked&&(gb.isCellVisible=function(nb){return cb.isCellSelected(nb)});kb=u.getCurrentFile();null!=kb&&(gb.title=kb.getTitle());var Bb=gb.writeHead;gb.writeHead=function(nb){Bb.apply(this,arguments);if(mxClient.IS_GC||
-mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?
-nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=gb.renderPage;gb.renderPage=function(nb,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
-var B=Ab.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;fb=S.shapeForegroundColor;rb=S.shapeBackgroundColor;mb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(kb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());gb.open(null,null,tb,!0);S.enableFlowAnimation=mb;null!=kb&&
-(S.shapeForegroundColor=fb,S.shapeBackgroundColor=rb,S.stylesheet=kb,S.refresh())}else{mb=cb.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";gb.backgroundColor=mb;gb.autoOrigin=rb;gb.appendGraph(cb,xb,kb,fb,tb,!0);tb=cb.getCustomFonts();if(null!=gb.wnd)for(kb=0;kb<tb.length;kb++)fb=tb[kb].name,rb=tb[kb].url,Graph.isCssFontUrl(rb)?gb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(gb.wnd.document.writeln('<style type="text/css">'),
-gb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),gb.wnd.document.writeln("</style>"))}qb&&(cb.useCssTransforms=qb,cb.currentTranslate=yb,cb.currentScale=ub,cb.view.translate=vb,cb.view.scale=wb);return gb}var Oa=parseInt(ya.value)/100;isNaN(Oa)&&(Oa=1,ya.value="100 %");Oa*=.75;var Pa=null,Sa=S.shapeForegroundColor,za=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(Pa=S.stylesheet,S.stylesheet=
-S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());var wa=Ba.value,Ea=ta.value,Da=!Aa.checked,La=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,wa,Ea,Ka.checked,ma.value,pa.value,parseInt(Ta.value)/100,parseInt(ya.value)/100,ua.get());else{Da&&(Da=Na.checked||wa==va&&Ea==va);if(!Da&&null!=u.pages&&u.pages.length){var Za=0;Da=u.pages.length-1;Aa.checked||(Za=parseInt(wa)-1,Da=parseInt(Ea)-1);for(var Va=Za;Va<=Da;Va++){var eb=
-u.pages[Va];wa=eb==u.currentPage?S:null;if(null==wa){wa=u.createTemporaryGraph(S.stylesheet);wa.shapeForegroundColor=S.shapeForegroundColor;wa.shapeBackgroundColor=S.shapeBackgroundColor;Ea=!0;Za=!1;var jb=null,hb=null;null==eb.viewState&&null==eb.root&&u.updatePageRoot(eb);null!=eb.viewState&&(Ea=eb.viewState.pageVisible,Za=eb.viewState.mathEnabled,jb=eb.viewState.background,hb=eb.viewState.backgroundImage,wa.extFonts=eb.viewState.extFonts);null!=hb&&null!=hb.originalSrc&&(hb=u.createImageForPageLink(hb.originalSrc,
-eb));wa.background=jb;wa.backgroundImage=null!=hb?new mxImage(hb.src,hb.width,hb.height,hb.x,hb.y):null;wa.pageVisible=Ea;wa.mathEnabled=Za;var ob=wa.getGraphBounds;wa.getGraphBounds=function(){var cb=ob.apply(this,arguments),gb=this.backgroundImage;if(null!=gb&&null!=gb.width&&null!=gb.height){var tb=this.view.translate,qb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((tb.x+gb.x)*qb,(tb.y+gb.y)*qb,gb.width*qb,gb.height*qb))}return cb};var pb=wa.getGlobalVariable;wa.getGlobalVariable=
-function(cb){return"page"==cb?eb.getName():"pagenumber"==cb?Va+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:pb.apply(this,arguments)};document.body.appendChild(wa.container);u.updatePageRoot(eb);wa.model.setRoot(eb.root)}La=Ma(wa,La,Va!=Da);wa!=S&&wa.container.parentNode.removeChild(wa.container)}}else La=Ma(S);null==La?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(La.mathEnabled&&(Da=La.wnd.document,Fa&&(La.wnd.IMMEDIATE_PRINT=!0),Da.writeln('<script type="text/javascript" src="'+
+function(u,J,N,W,S,P){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){ta.value=Math.max(1,Math.min(oa,Math.max(parseInt(ta.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(ta.value),parseInt(Ba.value))))}function W(Fa){function Ma(cb,hb,lb){var rb=cb.useCssTransforms,vb=cb.currentTranslate,ob=cb.currentScale,
+Ab=cb.view.translate,Bb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var ub=cb.getGraphBounds(),kb=0,eb=0,mb=ua.get(),wb=1/cb.pageScale,pb=Ka.checked;if(pb){wb=parseInt(ma.value);var xb=parseInt(pa.value);wb=Math.min(mb.height*xb/(ub.height/cb.view.scale),mb.width*wb/(ub.width/cb.view.scale))}else wb=parseInt(Ua.value)/(100*cb.pageScale),isNaN(wb)&&(Oa=1/cb.pageScale,Ua.value="100 %");
+mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Oa);mb.height=Math.ceil(mb.height*Oa);wb*=Oa;!pb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*mb.width,eb-=ub.y*mb.height):pb=!0;if(null==hb){hb=PrintDialog.createPrintPreview(cb,wb,mb,0,kb,eb,pb);hb.pageSelector=!1;hb.mathEnabled=!1;Na.checked&&(hb.isCellVisible=function(nb){return cb.isCellSelected(nb)});kb=u.getCurrentFile();null!=kb&&(hb.title=kb.getTitle());var zb=hb.writeHead;hb.writeHead=function(nb){zb.apply(this,arguments);if(mxClient.IS_GC||
+mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),m=0;m<c.length;m++){var x=c[m].name,p=c[m].url;Graph.isCssFontUrl(p)?
+nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=hb.renderPage;hb.renderPage=function(nb,c,m,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
+var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;eb=S.shapeForegroundColor;pb=S.shapeBackgroundColor;mb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(kb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());hb.open(null,null,lb,!0);S.enableFlowAnimation=mb;null!=kb&&
+(S.shapeForegroundColor=eb,S.shapeBackgroundColor=pb,S.stylesheet=kb,S.refresh())}else{mb=cb.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";hb.backgroundColor=mb;hb.autoOrigin=pb;hb.appendGraph(cb,wb,kb,eb,lb,!0);lb=cb.getCustomFonts();if(null!=hb.wnd)for(kb=0;kb<lb.length;kb++)eb=lb[kb].name,pb=lb[kb].url,Graph.isCssFontUrl(pb)?hb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(pb)+'" charset="UTF-8" type="text/css">'):(hb.wnd.document.writeln('<style type="text/css">'),
+hb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(pb)+'");\n}'),hb.wnd.document.writeln("</style>"))}rb&&(cb.useCssTransforms=rb,cb.currentTranslate=vb,cb.currentScale=ob,cb.view.translate=Ab,cb.view.scale=Bb);return hb}var Oa=parseInt(ya.value)/100;isNaN(Oa)&&(Oa=1,ya.value="100 %");Oa*=.75;var Pa=null,Sa=S.shapeForegroundColor,za=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(Pa=S.stylesheet,S.stylesheet=
+S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());var wa=Ba.value,Da=ta.value,Ea=!Aa.checked,La=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,wa,Da,Ka.checked,ma.value,pa.value,parseInt(Ua.value)/100,parseInt(ya.value)/100,ua.get());else{Ea&&(Ea=Na.checked||wa==va&&Da==va);if(!Ea&&null!=u.pages&&u.pages.length){var Ta=0;Ea=u.pages.length-1;Aa.checked||(Ta=parseInt(wa)-1,Ea=parseInt(Da)-1);for(var Wa=Ta;Wa<=Ea;Wa++){var fb=
+u.pages[Wa];wa=fb==u.currentPage?S:null;if(null==wa){wa=u.createTemporaryGraph(S.stylesheet);wa.shapeForegroundColor=S.shapeForegroundColor;wa.shapeBackgroundColor=S.shapeBackgroundColor;Da=!0;Ta=!1;var gb=null,ib=null;null==fb.viewState&&null==fb.root&&u.updatePageRoot(fb);null!=fb.viewState&&(Da=fb.viewState.pageVisible,Ta=fb.viewState.mathEnabled,gb=fb.viewState.background,ib=fb.viewState.backgroundImage,wa.extFonts=fb.viewState.extFonts);null!=ib&&null!=ib.originalSrc&&(ib=u.createImageForPageLink(ib.originalSrc,
+fb));wa.background=gb;wa.backgroundImage=null!=ib?new mxImage(ib.src,ib.width,ib.height,ib.x,ib.y):null;wa.pageVisible=Da;wa.mathEnabled=Ta;var tb=wa.getGraphBounds;wa.getGraphBounds=function(){var cb=tb.apply(this,arguments),hb=this.backgroundImage;if(null!=hb&&null!=hb.width&&null!=hb.height){var lb=this.view.translate,rb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((lb.x+hb.x)*rb,(lb.y+hb.y)*rb,hb.width*rb,hb.height*rb))}return cb};var qb=wa.getGlobalVariable;wa.getGlobalVariable=
+function(cb){return"page"==cb?fb.getName():"pagenumber"==cb?Wa+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:qb.apply(this,arguments)};document.body.appendChild(wa.container);u.updatePageRoot(fb);wa.model.setRoot(fb.root)}La=Ma(wa,La,Wa!=Ea);wa!=S&&wa.container.parentNode.removeChild(wa.container)}}else La=Ma(S);null==La?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(La.mathEnabled&&(Ea=La.wnd.document,Fa&&(La.wnd.IMMEDIATE_PRINT=!0),Ea.writeln('<script type="text/javascript" src="'+
DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),La.closeDocument(),!La.mathEnabled&&Fa&&PrintDialog.printPreview(La));null!=Pa&&(S.shapeForegroundColor=Sa,S.shapeBackgroundColor=za,S.stylesheet=Pa,S.refresh())}}var S=u.editor.graph,P=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,J||mxResources.get("print"));P.appendChild(Z);var oa=1,va=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
var Aa=document.createElement("input");Aa.style.cssText="margin-right:8px;margin-bottom:8px;";Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.setAttribute("name","pages-printdialog");Z.appendChild(Aa);J=document.createElement("span");mxUtils.write(J,mxResources.get("printAllPages"));Z.appendChild(J);mxUtils.br(Z);var sa=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");sa.setAttribute("value","range");Z.appendChild(sa);J=document.createElement("span");mxUtils.write(J,mxResources.get("pages")+
":");Z.appendChild(J);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("type","number");Ba.setAttribute("min","1");Ba.style.width="50px";Z.appendChild(Ba);J=document.createElement("span");mxUtils.write(J,mxResources.get("to"));Z.appendChild(J);var ta=Ba.cloneNode(!0);Z.appendChild(ta);mxEvent.addListener(Ba,"focus",function(){sa.checked=!0});mxEvent.addListener(ta,"focus",function(){sa.checked=!0});mxEvent.addListener(Ba,"change",
N);mxEvent.addListener(ta,"change",N);if(null!=u.pages&&(oa=u.pages.length,null!=u.currentPage))for(J=0;J<u.pages.length;J++)if(u.currentPage==u.pages[J]){va=J+1;Ba.value=va;ta.value=va;break}Ba.setAttribute("max",oa);ta.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(P.appendChild(Z),sa.checked=!0):sa.checked=!0;mxUtils.br(Z);var Na=document.createElement("input");Na.setAttribute("value","all");Na.setAttribute("type","radio");Na.style.marginRight="8px";S.isSelectionEmpty()&&Na.setAttribute("disabled",
"disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Na.setAttribute("type","checkbox"),Na.style.marginBottom="12px",Ca.appendChild(Na)):(Na.setAttribute("name","pages-printdialog"),Na.style.marginBottom="8px",Z.appendChild(Na));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Na.parentNode.appendChild(J);1==oa&&mxUtils.br(Na.parentNode);var Qa=document.createElement("input");Qa.style.marginRight="8px";Qa.setAttribute("value","adjust");
-Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));Ca.appendChild(J);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width="50px";Ca.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Qa.checked=!0});P.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Qa.cloneNode(!0);Ka.setAttribute("value","fit");Qa.setAttribute("checked",
-"checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ka);Z.appendChild(J);Ca=document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Ua=document.createElement("tr"),$a=Ua.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),T=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";T.style.textAlign="right";mxUtils.write(z,
+Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));Ca.appendChild(J);var Ua=document.createElement("input");Ua.style.cssText="margin:0 8px 0 8px;";Ua.setAttribute("value","100 %");Ua.style.width="50px";Ca.appendChild(Ua);mxEvent.addListener(Ua,"focus",function(){Qa.checked=!0});P.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Qa.cloneNode(!0);Ka.setAttribute("value","fit");Qa.setAttribute("checked",
+"checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ka);Z.appendChild(J);Ca=document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Va=document.createElement("tr"),$a=Va.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),T=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";T.style.textAlign="right";mxUtils.write(z,
mxResources.get("fitTo"));var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";L.appendChild(ma);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(T,mxResources.get("fitToBy"));var pa=ma.cloneNode(!0);ca.appendChild(pa);mxEvent.addListener(ma,"focus",function(){Ka.checked=!0});mxEvent.addListener(pa,
-"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Ua.appendChild(z);Ua.appendChild(L);Ua.appendChild(M);$a.appendChild(T);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Ua);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);P.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));
+"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Va.appendChild(z);Va.appendChild(L);Va.appendChild(M);$a.appendChild(T);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Va);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);P.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));
Z.appendChild(J);J=document.createElement("div");J.style.marginBottom="12px";var ua=PageSetupDialog.addPageFormatPanel(J,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(J);J=document.createElement("span");mxUtils.write(J,mxResources.get("pageScale"));Z.appendChild(J);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","100 %");ya.style.width="60px";Z.appendChild(ya);P.appendChild(Z);J=document.createElement("div");
J.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&J.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){S.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",J.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",J.appendChild(Ca));
Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";J.appendChild(Ca);u.editor.cancelFirst||J.appendChild(Z);P.appendChild(J);this.container=P};var fa=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 u=
this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}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 fa.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 la=document.createElement("canvas"),ra=new Image;ra.onload=function(){try{la.getContext("2d").drawImage(ra,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};ra.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,y,E){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{E||null==window.console||console.error(y,d,f,g,m,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+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,l,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=l?":colno:"+
+encodeURIComponent(l):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||null==window.console||console.error(y,d,f,g,l,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var q=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var m=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var l=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var l=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(l&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=H.substring(H.length-3,H.length)&&"!"!=H.charAt(H.length-1)&&(H+="..."),G.innerHTML=H,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,H)}));this.stop();return aa}),G=!0);return G};var E=q.stop;q.stop=function(){E.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=H.substring(H.length-3,H.length)&&"!"!=H.charAt(H.length-1)&&(H+="..."),G.innerHTML=H,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,H)}));this.stop();return aa}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var E=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<E&&q.movePage(E,E-1)};if(38==y.keyCode)return function(){0<E&&q.movePage(E,0)};if(39==y.keyCode)return function(){E<q.pages.length-1&&q.movePage(E,
-E+1)};if(40==y.keyCode)return function(){E<q.pages.length-1&&q.movePage(E,q.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<E&&q.selectNextPage(!1)};if(38==y.keyCode)return function(){0<E&&q.selectPage(q.pages[0])};if(39==y.keyCode)return function(){E<q.pages.length-1&&q.selectNextPage(!0)};if(40==y.keyCode)return function(){E<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
-var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var m=d.lastIndexOf("&lt;/mxfile&gt;");m>g&&(f=d.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
-y?mxUtils.getXml(y):""}}catch(E){}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,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,l=this.editor.graph,q=this;f.getFunction=function(y){if(l.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
+F+1)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,q.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<F&&q.selectNextPage(!1)};if(38==y.keyCode)return function(){0<F&&q.selectPage(q.pages[0])};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.selectNextPage(!0)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
+var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var l=d.lastIndexOf("&lt;/mxfile&gt;");l>g&&(f=d.substring(g,l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
+y?mxUtils.getXml(y):""}}catch(F){}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,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=l.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(l[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y: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(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,y,E,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
+function(d,f,g,l,q,y,F,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=l;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(qa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
-aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(E||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),aa=this.getEmbeddedSvg(aa,f,m,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
-m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
-Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],E=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(E);mxUtils.setTextContent(E,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
-y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),E=E.cloneNode(!1),mxUtils.setTextContent(E,
-Graph.compressNode(C))));d(E)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],m=0;m<d.length;m++){var q=d.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
-function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var m in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][m];null!=q.name&&
-(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(y){var E=q.cells[y];if(null!=E){for(var C in E)null!=E[C].value&&(E[C].value="["+E[C].value.length+"]"),null!=E[C].xmlValue&&(E[C].xmlValue="["+E[C].xmlValue.length+"]"),null!=E[C].style&&(E[C].style="["+E[C].style.length+"]"),mxUtils.isEmptyObject(E[C])&&delete E[C];mxUtils.isEmptyObject(E)&&delete q.cells[y]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
-delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
+aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),aa=this.getEmbeddedSvg(aa,f,l,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,l){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+l);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,l);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else l&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
+y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,l),F=F.cloneNode(!1),mxUtils.setTextContent(F,
+Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],l=0;l<d.length;l++){var q=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
+function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var l in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][l];null!=q.name&&
+(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(y){var F=q.cells[y];if(null!=F){for(var C in F)null!=F[C].value&&(F[C].value="["+F[C].value.length+"]"),null!=F[C].xmlValue&&(F[C].xmlValue="["+F[C].xmlValue.length+"]"),null!=F[C].style&&(F[C].style="["+F[C].style.length+"]"),mxUtils.isEmptyObject(F[C])&&delete F[C];mxUtils.isEmptyObject(F)&&delete q.cells[y]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
+delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,E,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
-da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(O){return"page"==O?qa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}E=null!=E?E:this.getXmlFileData(q,y,
-G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(E,da,H,window.location.href,d,f,g,m,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var E=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){E=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(E.x/H-f.view.translate.x);H=Math.floor(E.y/H-f.view.translate.y);E=f.background;null==
-q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
-return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=E&&E!=mxConstants.NONE?' style="background-color:'+E+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
-m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,l,q,y,F,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
+da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(O){return"page"==O?qa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
+G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(F,da,H,window.location.href,d,f,g,l,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,l,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(F.x/H-f.view.translate.x);H=Math.floor(F.y/H-f.view.translate.y);F=f.background;null==
+q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}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!=l&&d.setAttribute("edit",l));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));
+return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
+l+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,l,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),
-"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+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 q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
-E=y.getChildren(y.root);for(m=0;m<E.length;m++){var C=E[m];y.setVisible(C,f[C.id]||!1)}}catch(H){}};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,m,q,y,E,C,H,G,aa,da){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),f=new DiagramPage(d[l]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[l+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 q=urlParams["layer-ids"].split(" ");f={};for(l=0;l<q.length;l++)f[q[l]]=!0;var y=this.editor.graph.getModel(),
+F=y.getChildren(y.root);for(l=0;l<F.length;l++){var C=F[l];y.setVisible(C,f[C.id]||!1)}}catch(H){}};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,l,q,y,F,C,H,G,aa,da){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
ba),this.saveData(Y,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(H);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var X=this.editor.graph,ea=X.getGraphBounds();var ka=Math.ceil(ea.width*C/X.view.scale+2*O);var ja=Math.ceil(ea.height*C/X.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(R,
-fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,m,fa,E,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
-if(E||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,E,C,H,
+fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,l,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
+if(F||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),l)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,l,q,y,F,C,H,
G,aa,da,ba){var Y=this.editor.graph,qa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",X="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?X="&from="+aa.from+"&to="+aa.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=E?"&scale="+E:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var E=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<E.length&&(E+="\n"),E+=y);y=new LocalFile(this,"csv"!=d.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(E,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+l+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var l=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return l};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var E=null;try{for(d=
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){l.alert(ja.tooltip)});return U}var g=null,l=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var H=d.getAttribute("value");if(null!=H){var G=mxUtils.parseXml(H).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,da=0;da<aa.length;da++)q.setAttributeForCell(C,aa[da].nodeName,0<aa[da].nodeValue.length?aa[da].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Y=d.getAttribute("icon");if(null!=Y){var qa=0<Y.length?JSON.parse(Y):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in O){var ea=parseFloat(O[key]);
"dx"==key?X.x+=ea:"dy"==key?X.y+=ea:"dw"==key?X.width+=ea:"dh"==key?X.height+=ea:X[key]=parseFloat(O[key])}q.model.setGeometry(C,X)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
-d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(E=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=E&&this.chromelessResize&&this.chromelessResize(!0,E)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
-g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),E=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+E+"-"+C+"-"+q))}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 m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=g.lastIndexOf(".");0<=l&&(d=g.substring(l),g=
+g.substring(0,l));if(f){f=g;var q=new Date;g=q.getFullYear();l=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+l+"-"+y+"-"+F+"-"+C+"-"+q))}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 l=!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 q=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.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
-if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+E.message,label:"stack_"+
-E.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(E,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
-var E=d[y].node.cloneNode(!1);E.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");E.appendChild(C);null!=f&&(f.eltCount+=E.getElementsByTagName("*").length,f.nodeCount+=E.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(E,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
-"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,E=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=E&&(m^=this.hashValue(y,
-f,g)+this.hashValue(E,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,E){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));l=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return l};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,l=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");l.root=d[y].root;var C=q.encode(l);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
+"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(l^=this.hashValue(y,
+f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)l=(l<<5)-l+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;l^=f}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,l,q,y,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,E=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});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 C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(ka){E(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;m=H.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);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";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
+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 l=g.previousSibling;f.insertBefore(g,d);f.insertBefore(l,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,l,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});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 C=this.sidebar.addPalette(d.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;l=H.getAttribute("title");
+null!=l&&0<l.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);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";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var da=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Y=null,qa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),O=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=aa.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,
G.firstChild),H.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),H.style.paddingRight=18*G.childNodes.length+"px")})):null==da&&(da=aa.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),G.insertBefore(da,G.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
@@ -3434,175 +3435,175 @@ U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x
mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ea(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility=
"visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,
this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,Q,R,fa,la,ra){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,Q,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,Q,R),ka,mxEvent.isAltDown(ka)?null:fa.substring(0,fa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,J=
-mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(N.documentElement));E(S,C);f=f.concat(S);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var P=N.documentElement.getElementsByTagName("diagram");for(S=0;S<P.length;S++){var Z=this.stringToCells(Editor.getDiagramNodeXml(P[S])),
+mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(N.documentElement));F(S,C);f=f.concat(S);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var P=N.documentElement.getElementsByTagName("diagram");for(S=0;S<P.length;S++){var Z=this.stringToCells(Editor.getDiagramNodeXml(P[S])),
oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=ra&&null!=fa&&(/(\.v(dx|sdx?))($|\?)/i.test(fa)||/(\.vs(x|sx?))($|\?)/i.test(fa))?this.importVisio(ra,function(N){J(N,"text/xml")},null,fa):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(ja,fa)&&null!=ra?this.isExternalDataComms()?this.parseFile(ra,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?J(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):J(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
-mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
-G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}H.appendChild(G);H.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
-m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});l=aa.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));G.insertBefore(l,
+G.firstChild);mxEvent.addListener(l,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(l,G.firstChild))}H.appendChild(G);H.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var l=d[g],q=l.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(q=this.stringToCells(Graph.decompress(l.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
+l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,y,E){d=new ImageDialog(this,d,f,g,m,q,y,E);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&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);
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,l,q,y,F){d=new ImageDialog(this,d,f,g,l,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,l){l||(g=new ChangePageSetup(this,null,g),
+g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,l,q){d=new LibraryDialog(this,d,f,g,l,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=
-f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,E){var C=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{E?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(Y){}if(null!=H||null!=f){E=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=H){null!=
-H.retry&&(G=mxResources.get("cancel"),aa=function(){C();H.retry()});if(404==H.code||404==H.status||403==H.code){E=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=q?null:null!=y?y:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
-da.substring(0,45))&&(null!=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==H.code||404==H.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,E,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(d,f,g,
-m,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
+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(l){l.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,l,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?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(Y){}if(null!=H||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=H){null!=
+H.retry&&(G=mxResources.get("cancel"),aa=function(){C();H.retry()});if(404==H.code||404==H.status||403==H.code){F=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=q?null:null!=y?y:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+da.substring(0,45))&&(null!=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==H.code||404==H.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(d,f,g,
+l,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
ea.appendChild(ja)}var qa=this.drive.getUsersList(),O=document.createElement("div"),X=document.createElement("span");X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");O.appendChild(X);var ea=document.createElement("select");ea.style.width="200px";Y();mxEvent.addListener(ea,"change",mxUtils.bind(this,function(){var ka=ea.value,ja=qa.length!=ka;ja&&this.drive.setUser(qa[ka]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,
-function(U){this.handleError(U)}),!0)}));O.appendChild(ea);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=H.message?E=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name):mxUtils.htmlEntities(H.message):null!=H.response&&null!=H.response.error?E=mxUtils.htmlEntities(H.response.error):
-"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?E=mxUtils.htmlEntities(mxResources.get("timeout")):H.code==App.ERROR_BUSY?E=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof H&&0<H.length&&(E=mxUtils.htmlEntities(H)))}var ba=y=null;null!=H&&null!=H.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):null!=H&&null!=H.ownerEmail&&(y=mxResources.get("contactOwner"),E+=mxUtils.htmlEntities(" ("+y+": "+H.ownerEmail+
-")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,E,G,g,aa,null,null,y,ba,null,null,null,m?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,m,q,y){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
-50));d=new ConfirmDialog(this,d,function(){E();null!=f&&f()},function(){E();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+function(U){this.handleError(U)}),!0)}));O.appendChild(ea);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=H.message?F=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name):mxUtils.htmlEntities(H.message):null!=H.response&&null!=H.response.error?F=mxUtils.htmlEntities(H.response.error):
+"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):H.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof H&&0<H.length&&(F=mxUtils.htmlEntities(H)))}var ba=y=null;null!=H&&null!=H.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):null!=H&&null!=H.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+H.ownerEmail+
+")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,F,G,g,aa,null,null,y,ba,null,null,null,l?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,l,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
+50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},l,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,l){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var E=document.createElement("input");
-E.setAttribute("type","checkbox");E.setAttribute("id","geDoNotShowAgainCheckbox");E.style.marginRight="6px";if(!m){f.appendChild(E);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,E.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);H()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){H()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var da=mxEvent.getSource(aa);da!=E&&da!=C?(null!=g&&g(),H(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
-/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
-g,m);else{var E=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof E.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){E.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?E.download=f:E.setAttribute("target","_blank");document.body.appendChild(E);try{window.setTimeout(function(){URL.revokeObjectURL(E.href)},
-2E4),E.click(),E.parentNode.removeChild(E)}catch(H){}}else this.createEchoRequest(d,f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),
-y=0;y<m;++y){for(var E=1024*y,C=Math.min(E+1024,g),H=Array(C-E),G=0;E<C;++G,++E)H[G]=d[E].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,E,C){y=null!=y?y:!1;E=null!=E?E:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,E,null,1<q,H,d,g,m);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?m.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=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(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
+q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");
+F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!l){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);H()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){H()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var da=mxEvent.getSource(aa);da!=F&&da!=C?(null!=g&&g(),H(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,l){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
+"tEXt","mxfile",encodeURIComponent(f))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,l,q){var y="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(l,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,l,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
+/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
+g,l);else{var F=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(l?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},
+2E4),F.click(),F.parentNode.removeChild(F)}catch(H){}}else this.createEchoRequest(d,f,g,l,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,l,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,l=Math.ceil(g/1024),q=Array(l),
+y=0;y<l;++y){for(var F=1024*y,C=Math.min(F+1024,g),H=Array(C-F),G=0;F<C;++G,++F)H[G]=d[F].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,l,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,l,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,l,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,F,null,1<q,H,d,g,l);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?l.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+
+f+";base64,"+d+'"/></html>')):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var n=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(l){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();f.style.display=0<l.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(m){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+function(l){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=y.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=y.zIndex;var E=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});E.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){E.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
+this.exportDialog.style.zIndex=y.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",H);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(H.substring(H.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,E){return this.createEchoRequest(g,y,m,q,f,E)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,E){E=null!=E?E:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,aa,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,l,q){this.isLocalFileSave()?this.saveLocalFile(g,d,l,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,l,q,f,F)}),g,q,l)};EditorUi.prototype.saveRequest=function(d,f,g,l,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=l)try{this.exportFile(l,G,y,!0,aa,
ba)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),G,y,!0,aa,ba)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
-!1,!1,E,null,1<C,H,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!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,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,E,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);m&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
+!1,!1,F,null,1<C,H,l,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!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,l,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
+g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);l&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var ka=mxUtils.bind(this,function(U){this.spinner.stop();q&&U.setAttribute("content",this.getFileData(!0,null,null,null,g,H,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ja=mxUtils.bind(this,function(U){y?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,E){return this.addCheckbox(d,g,m,q,y,E,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,E,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",E?"radio":"checkbox");E="geCheckbox-"+Editor.guid();
-H.id=E;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);m&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",E),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=
-App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,
-"change",mxUtils.bind(this,function(){if("custom"==y.value){var E=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
+(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,l,q,y,F){return this.addCheckbox(d,g,l,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();
+H.id=F;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);l&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var l=this.getCurrentFile(),q="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=
+App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));y.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");y.appendChild(l);d.appendChild(y);mxEvent.addListener(y,
+"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");E.innerHTML="";E.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);
-q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",E=null;E=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
-mxEvent.consume(C)}));g();E.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";E.style.marginLeft="4px";E.style.height="22px";E.style.width="22px";E.style.position="relative";E.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";E.className="geColorBtn";d.appendChild(E);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,E){E=null!=E?E:[];m&&("https://viewer.diagrams.net"==
-EditorUi.lightboxHost&&"1"!=urlParams.dev||E.push("lightbox=1"),"auto"!=d&&E.push("target="+d),null!=f&&f!=mxConstants.NONE&&E.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&E.push("edit="+encodeURIComponent(q)),y&&E.push("layers=1"),this.editor.graph.foldingEnabled&&E.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&E.push("page-id="+this.currentPage.getId());return E};EditorUi.prototype.createLink=function(d,f,g,m,q,y,E,C,
-H,G){H=this.createUrlParameters(d,f,g,m,q,y,H);d=this.getCurrentFile();f=!0;null!=E?g="#U"+encodeURIComponent(E):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
-g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,E,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==m&&(ba.target=m);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
-100==g||(ba.zoom=g/100);g=[];E&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");H&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!E);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");
-q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var E=document.createElement("div");E.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
-"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");E.appendChild(y);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));E.appendChild(H);mxUtils.br(E);E.appendChild(C);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));E.appendChild(H);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(H=document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor=
-"pointer",mxUtils.write(H,mxResources.get("share")),E.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(E);var aa=this.addLinkSection(q),da=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
-"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),E,!E),O=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;E=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
-ja.style.marginBottom="16px";E+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
-this.showDialog(d.container,340,E,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,E,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)E=null!=E?E:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
-else{d=80;E=null!=E?E:"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 da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
+"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));l.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));l.appendChild(q);
+q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));l.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(f));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
+mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,l,q,y,F){F=null!=F?F:[];l&&("https://viewer.diagrams.net"==
+EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,l,q,y,F,C,
+H,G){H=this.createUrlParameters(d,f,g,l,q,y,H);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
+g.substring(1)),g="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,l,q,y,F,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==l&&(ba.target=l);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
+100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");H&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,l){var q=document.createElement("div");
+q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
+"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(H);mxUtils.br(F);F.appendChild(C);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));F.appendChild(H);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(H=document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor=
+"pointer",mxUtils.write(H,mxResources.get("share")),F.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var aa=this.addLinkSection(q),da=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
+"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),O=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;F=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
+ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){l(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
+this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,l,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
+else{d=80;F=null!=F?F:"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 da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,
-null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
-":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
+null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=l)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=l+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
X.style.marginLeft,X.style.display="none",d-=20);var ja=this.addCheckbox(H,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(H,mxResources.get("tags"),!0);U.style.marginLeft=ka.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
-ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),E,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
-!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var E=document.createElement("h3");mxUtils.write(E,mxResources.get("image"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(E);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
-C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);E=this.editor.graph;var da=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),E.background==mxConstants.NONE||null==E.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,m,q,y,E,C,H){E=null!=E?E:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
+ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
+!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,l,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
+C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=l?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram);F=this.editor.graph;var da=l?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(d,f,g,l,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
"4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight=
"8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}H?(mxUtils.write(G,mxResources.get("size")+
":"),G.appendChild(ea),mxUtils.br(G),da+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(O.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),da+=30,mxEvent.addListener(O,"change",function(){O.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?H&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",da-=30):(ea.value="diagram",X.setAttribute("checked",
"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),Q=null;if("png"==C||"jpeg"==C)Q=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
-this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),E,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(fa.checked=!0,
fa.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",ra.style.display="none"):"disabled"==fa.getAttribute("disabled")&&(fa.checked=!1,fa.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",ra.style.display="")}));f&&(G.appendChild(fa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var ra=document.createElement("select");ra.style.maxWidth="260px";ra.style.marginLeft="8px";ra.style.marginRight="10px";ra.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ra.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ra.appendChild(f);f=document.createElement("option");
f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ra.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(ra),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
-V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var E=this.editor.graph;
-if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),E.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<E.model.getChildCount(E.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
+V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,l);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,l,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
+if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&l,!l),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
qa,!qa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&da.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(H.checked,G.checked,aa.checked,
-da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,E,C){function H(Y){var qa=" ",O="";m&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');E('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=m?this.getFileData(!0):null;
-Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({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 da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
-ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,m,q,y,E){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}m&&
-C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";m&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
-"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){E('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),E(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
+da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,l,q,y,F,C){function H(Y){var qa=" ",O="";l&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=l?this.getFileData(!0):null;
+Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({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 da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
+ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,l,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}l&&
+C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";l&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
+"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",l&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};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 m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
-1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,E=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(E?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),y),C=g;else if(E||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(E?y.getDefaultStylesheet():y.getStylesheet());var H=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:H.apply(this,
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){g=l[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}l=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(f=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(g=l))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,l,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var H=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:H.apply(this,
arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(aa){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=aa.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(C));d(da.substring(da.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(aa){null!=
-f&&f(aa)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;E=null!=H?H:f.background;E==mxConstants.NONE&&(E=null);y=f.getSvg(E,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
-function(qa){qa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};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(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,E,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,E){f=null!=f?f:0;g=null!=g?g:0;var C=
+f&&f(aa)}),null,null,l,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;F=null!=H?H:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(qa){qa=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};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(l){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,l,null,null,y,F,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,l,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
[];try{var H=this.editor.graph;if(null!=d&&0<d.length){H.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var aa=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var da=aa.getElementsByTagName("diagram");if(1==da.length&&!y){if(aa=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=da[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),m=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
-O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}E&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};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(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),E=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),E=!0);E&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};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 m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var E=y.open.substring(y.open.indexOf(",")+1);g=d[E];null!=g?y.open="data:page/id,"+g:null==this.getPageById(E)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}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,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(E){this.handleError(E)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",H=m.lastIndexOf(".");if(0<=H&&H<m.length)C=m.substring(H+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:E?"remote":"local"})}catch(da){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",d,m);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
-null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,m)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
-new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(E)}else try{this.doImportVisio(d,f,g,m)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
-function(q){this.handleError(q)});var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};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 m=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var E=0;E<q.svgThumbs.length;E++)y.push(Editor.createSvgDataUri(q.svgThumbs[E]));null!=q.thumb&&y.push(q.thumb);
-console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(E){try{if(mxClient.IS_IE||mxClient.IS_IE11)E=
-E.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(E).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(E)),H,G)}else m({message:mxResources.get("invalidInput")})}catch(da){m(da)}})}catch(E){m(E)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
-C);C-=26;return 0==C?"-":1==C?"_":"?"}var E=new XMLHttpRequest;E.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(E.responseType="blob");E.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){m(ea)}};aa.src=H.result};H.onerror=function(G){m(G)}}else m(C)};
-E.onerror=function(C){m(C)};E.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,E,C){y=null!=y?y:!0;E=null!=E?E:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
+this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),l=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
+O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,l);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}F&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
+this.handleError(ja)}return C};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(l){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),l=this.editor.graph,q=l.getLinkForCell(f);null!=q&&l.setLinkForCell(f,this.updatePageLink(d,q));if(l.isHtmlLabel(f)){g.innerHTML=l.sanitizeHtml(l.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&l.labelChanged(f,g.innerHTML)}for(C=0;C<l.model.getChildCount(f);C++)this.updatePageLinksForCell(d,l.model.getChildAt(f,C))};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 l=JSON.parse(f.substring(17));if(null!=l.actions){for(var q=0;q<l.actions.length;q++){var y=l.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(l)}}catch(C){}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,l,q){l=null!=l?l:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(l);try{var C="UNKNOWN-VISIO",H=l.lastIndexOf(".");if(0<=H&&H<l.length)C=l.substring(H+1).toUpperCase();else{var G=l.lastIndexOf("/");0<=
+G&&G<l.length&&(l=l.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+l,label:F?"remote":"local"})}catch(da){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,l);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
+null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,l)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
+new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(F)}else try{this.doImportVisio(d,f,g,l)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
+function(q){this.handleError(q)});var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};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 l=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);
+console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,f,g,l){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=
+F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),H,G)}else l({message:mxResources.get("invalidInput")})}catch(da){l(da)}})}catch(F){l(F)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,l){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
+f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){l(ea)}};aa.src=H.result};H.onerror=function(G){l(G)}}else l(C)};
+F.onerror=function(C){l(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var l=this.editor.graph,q=null;l.getModel().beginUpdate();try{q=l.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(q,!0)}finally{l.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!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(ba){4==ba.readyState&&200<=ba.status&&299>=ba.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ba.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var H=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,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);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 aa=this.importXml(G,f,g,y,!0,C);if(0<aa.length)return aa}catch(ba){}this.loadImage(d,
-mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,X,ea){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),X,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),E,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Y);ba=Math.round(ba.height*
-Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(m?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
-Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));
+mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,X,ea){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),X,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Y);ba=Math.round(ba.height*
+Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(l?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));
H.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");q.value=d;H.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var da=H.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=da.width;q.geometry.height=da.height}Graph.isLink(q.value)&&H.setLinkForCell(q,q.value);q.geometry.width+=H.gridSize;q.geometry.height+=
H.gridSize}finally{H.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(E,C){StorageFile.listFiles(this,"F",E,C)});window.openBrowserFile=mxUtils.bind(this,function(E,C,H){StorageFile.getFileContent(this,E,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(E,C,H){StorageFile.deleteFile(this,E,C,H)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
-new OpenFile(mxUtils.bind(this,function(E){this.hideDialog(E)}));window.openFile.setConsumer(mxUtils.bind(this,function(E,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(E=new Blob([E],{type:"application/octet-stream"}),this.importVisio(E,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(E,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=m;y.apply(q,arguments);E&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var E=0,C,H=!1;y.forEach(function(G,aa){G=
-aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>E&&(E=G,C=aa))});0<E?C.async("string").then(function(G){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
-g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,E,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,E)):X=this.importXml(O,g,m,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
-C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=H&&null!=E&&(/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E))?(ba=!0,this.importVisio(H,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,E)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?qa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,E):this.parseFile(H,
-q,E)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(E)||/(\.vs(s|x))($|\?)/i.test(E)||(Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.getFileContent(this,F,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.deleteFile(this,F,C,H)});if(!f){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=l;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var l=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,H=!1;y.forEach(function(G,aa){G=
+aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&l.isRemoteFileFormat(G,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
+g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,l,q,y,F,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):X=this.importXml(O,g,l,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
+C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,l,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),l=f.snap(l)),Y=[f.insertVertex(null,null,"",g,l,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=H&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(H,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?qa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(H,
+q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){l=null!=l?l:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,ra,u,J,N,W,S,P,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
la,S)),null):this.importFile(la,ra,u,J,N,W,S,P,Z,Y,da,ba)}catch(oa){return this.handleError(oa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,V=I,Q=[],R=mxUtils.bind(this,function(la,ra){Q[la]=ra;if(0==--V){this.spinner.stop();if(null!=C)C(Q);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<Q.length;la++){var J=Q[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
-fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var ra=d[la];if(null!=ra){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==E||E(ra))if("image/"==ra.type.substring(0,6))if("image/svg"==ra.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var S=mxUtils.parseXml(W);W=S.getElementsByTagName("svg");if(0<W.length){W=W[0];var P=da?null:W.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
+fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var ra=d[la];if(null!=ra){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(ra))if("image/"==ra.type.substring(0,6))if("image/svg"==ra.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var S=mxUtils.parseXml(W);W=S.getElementsByTagName("svg");if(0<W.length){W=W[0];var P=da?null:W.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=S){var va=S.getElementsByTagName("svg");if(0<va.length){var Aa=va[0],sa=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var ta=Aa.getAttribute("viewBox");
-if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(m/Math.max(1,sa)),m/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ta.width);Ba=Math.max(1,
-Ta.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ka=N.indexOf(";");0<Ka&&(N=N.substring(0,Ka)+N.substring(N.indexOf(",",Ka+1)));ja.setCellStyles("image",N,[Qa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Qa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*U,g+la*U,0,0,ra.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(l/Math.max(1,sa)),l/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ua.width);Ba=Math.max(1,
+Ua.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ka=N.indexOf(";");0<Ka&&(N=N.substring(0,Ka)+N.substring(N.indexOf(",",Ka+1)));ja.setCellStyles("image",N,[Qa[0]])});Ua.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Qa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*U,g+la*U,0,0,ra.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
!1;if("image/png"==ra.type){var Z=da?null:this.extractGraphModelFromPng(J.target.result);if(null!=Z&&0<Z.length){var oa=new Image;oa.src=J.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,oa.width,oa.height,ra.name)}));W=!0}}W||(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(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(m/sa,m/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+this.loadImage(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(l/sa,l/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,l,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
J.target.result,q(N,ra.type,f+la*U,g+la*U,240,160,ra.name,function(va){R(la,function(){return va})},ra)});/(\.v(dx|sdx?))($|\?)/i.test(ra.name)||/(\.vs(x|sx?))($|\?)/i.test(ra.name)?q(null,ra.type,f+la*U,g+la*U,240,160,ra.name,function(J){R(la,function(){return J})},ra):"image"==ra.type.substring(0,5)||"application/pdf"==ra.type?u.readAsDataURL(ra):u.readAsText(ra)}})(fa)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){qa=ja;ka()},H)}else ka()};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(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,E){if(y||f)mxSettings.setResizeImages(y?E:null),mxSettings.save();g();d(E)};null==m||f?this.showDialog((new ConfirmDialog(this,
-mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
-f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
-f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,E){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=E?E:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
-Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
+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(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==l||f?this.showDialog((new ConfirmDialog(this,
+mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,l)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,
+f,g)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){f(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
+f};EditorUi.prototype.resizeImage=function(d,f,g,l,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
+Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;f(l)};null!=g&&(l.onerror=g);l.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ea=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==X.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+I+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(I),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=Q,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",I,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
Math.max(R.width,V),R.height=Math.max(R.height,Q),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
-"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
+"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var l=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=l.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.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(X,ea){X=null!=f.backgroundImage?
f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][X]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
-{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var E=this.clearDefaultStyle;this.clearDefaultStyle=function(){E.apply(this,arguments)};
+{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var H=
f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,I){if(null==I){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(I=V.getAttribute("href"))}null!=I&&f.isCustomLink(I)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(I)&&mxEvent.consume(U);null!=ja&&ja(U,I)};H.call(this,X,ea,ka)};D.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(X,ea,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}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 aa=f.getExportVariables;f.getExportVariables=function(){var X=aa.apply(this,arguments),ea=d.getCurrentFile();
@@ -3622,15 +3623,15 @@ mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka
ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var fa=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(fa=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,ra=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
I,V,!0,fa,null,la,mxEvent.isControlDown(X)))});fa&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;ra()},mxEvent.isControlDown(X)):ra()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(u){var J=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,J)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",I,V,J*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
Q+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(Q,I,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),I,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var E=y[index];if("file"===E.kind){if(d.isEditing())this.importFiles([E.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
-else{var C=this.editor.graph.getInsertPoint();this.importFiles([E.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!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 m=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var E=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==E.nodeName||"TEXTAREA"==E.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
-f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var E=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=E&&17!=E&&91!=E&&93!=E||(m=!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(y){if(f.isEnabled())try{mxClipboard.copy(f),
-this.copyCells(g),d()}catch(E){this.handleError(E)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(E){this.handleError(E)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
+mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,l=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){l=!0;break}if(!l){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
+else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!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 l=!1;this.keyHandler.bindControlKey(88,
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||l||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
+f.container.appendChild(g),l=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=F&&17!=F&&91!=F&&93!=F||(l=!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(y){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=
-d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;
+d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(l,q,y){null==l[q]&&(l[q]=y)},g=this.editor.graph;
Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop",
"1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap",
"4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==
@@ -3640,142 +3641,142 @@ mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),E=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,E,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var E=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,E,E),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){E=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
-d,[E]);else{q.model.beginUpdate();try{q.labelChanged(E,d),Graph.isLink(d)&&q.setLinkForCell(E,d)}finally{q.model.endUpdate()}}q.setSelectionCell(E)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(E=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+E,y.y+E,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
-function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var E=d.clipboardData.getData("text/plain"),C=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==E.substring(0,18))try{var H=decodeURIComponent(E);this.isCompatibleString(H)&&(C=!0,E=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=E&&0<E.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
-C))}E=q.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))g=E[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(da){var ba=this.editor.graph;ba.lastPasteXml==da?ba.pasteCounter++:(ba.lastPasteXml=da,ba.pasteCounter=0);var Y=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(da,Y,Y));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
-function(da){this.handleError(da)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(da){}try{E=q.getElementsByTagName("span"),(H=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(H)||0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=H)}catch(da){}try{if(null!=
-y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}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(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),
-f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
-(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
-null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()&&this.openLocalFile(E.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
-"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
-"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
-m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
-10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
+this.editor.exportToCanvas(mxUtils.bind(this,function(l,q){try{this.spinner.stop();var y=this.createImageDataUri(l,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,l){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var l=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(l,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,l){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
+function(d,f,g,l){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var H=decodeURIComponent(F);this.isCompatibleString(H)&&(C=!0,F=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
+C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(da){var ba=this.editor.graph;ba.lastPasteXml==da?ba.pasteCounter++:(ba.lastPasteXml=da,ba.pasteCounter=0);var Y=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(da,Y,Y));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
+function(da){this.handleError(da)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(da){}try{F=q.getElementsByTagName("span"),(H=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(H)||0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=H)}catch(da){}try{if(null!=
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,l,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}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(l){null!=f&&(f.parentNode.removeChild(f),f=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(l){null!=f&&(f.parentNode.removeChild(f),
+f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(l);if(null==q){var y=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
+(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
+null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var l=document.body;var q=document.documentElement;var y=(l.clientWidth||q.clientWidth)-3;l=Math.max(l.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,l=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
+"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
+l=new mxGraphModel;g.decode(f,l);f=l.getChildAt(l.getRoot(),0);for(g=0;g<l.getChildCount(f);g++)d.push(l.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,l,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
+10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&
-(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var E=Editor.extractGraphModelFromPdf(d);null!=E&&(q=null,m=!0,d=E)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
-0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(E){this.handleError(E)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),
-E=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(E){if(null!=E){var C=E.lastIndexOf(".");0<C&&(E=E.substring(C+1,E.length));null==f[E]&&(f[E]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
+(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,l)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
+d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,l)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,l=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,l,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
+0;g<d.length;g++)mxUtils.bind(this,function(l){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,l.name,l,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==l.type.substring(0,5)&&"application/pdf"!==l.type||"image/svg"===l.type.substring(0,9)?q.readAsText(l):q.readAsDataURL(l)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,l,q){var y=this.getCurrentFile(),
+F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,l,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var l=this.editor.graph,q=l.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));l.model.isEdge(d)&&
+(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=l.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(l.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var E=y.model.cells,C;for(C in E){var H=E[C];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,l,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var H=F[C];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(H,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&
+f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var l=f.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,l=!1,q=null,y=mxUtils.bind(this,function(H,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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(H){if(H.source==(window.opener||window.parent)){var G=H.data,aa=null,da=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==P.substring(0,26)?P=
atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(Z){}return P});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[G])}catch(P){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.executeLayoutList(G.layouts);return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?E.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):E.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?
-mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();E.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();E.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){E.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,
-X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;E.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,O?mxUtils.bind(this,
+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.executeLayoutList(G.layouts);return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?F.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?
+mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){F.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,
+X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,O?mxUtils.bind(this,
function(P,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,P,Z)}):null,X?mxUtils.bind(this,function(P,Z,oa,va){this.remoteInvoke("searchDiagrams",[P,va],null,Z,oa)}):null,mxUtils.bind(this,function(P,Z,oa){this.remoteInvoke("getFileContent",[P.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,
-!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?E.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,"Network Error!")})}):
-null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){E.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));
-Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();E.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==
+!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,"Network Error!")})}):
+null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));
+Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==
G.show||G.show?this.spinner.spin(document.body,I):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 V=null!=G.xml?G.xml:this.getFileData(!0);
-this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;E.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);R(P)}),
+this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);R(P)}),
la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ra=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var P=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);Q.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():"pagenumber"==
Ba?1:P.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Z.root)}if(null!=G.layerIds){var va=Q.model,Aa=va.getChildCells(va.getRoot()),sa={};for(oa=0;oa<G.layerIds.length;oa++)sa[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)va.setVisible(Aa[oa],sa[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,null,Q,G.border,
null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
function(P){200<=P.getStatus()&&299>=P.getStatus()?R("data:image/png;base64,"+P.getText()):fa(null)}),mxUtils.bind(this,function(){fa(null)}))}}else ra=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();P.xml=mxUtils.getXml(Z);P.data=this.getFileData(null,null,!0,null,null,null,Z);P.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
-P.data=this.getHtml(Z,this.editor.graph),P.xml=mxUtils.getXml(Z),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var oa=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(va);E.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&
+P.data=this.getHtml(Z,this.editor.graph),P.xml=mxUtils.getXml(Z),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var oa=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(va);F.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&
null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,oa,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
-(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(va))}));return}E.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra();return}if("load"==
-G.action){ba=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
+(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(va))}));return}F.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra();return}if("load"==
+G.action){ba=G.toSketch;l=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var J=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var P=this.editor.graph,Z=P.maxFitScale;P.maxFitScale=G.maxFitScale;P.fit(2*J);P.maxFitScale=Z;P.container.scrollTop-=2*J;P.container.scrollLeft-=2*J;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(P){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var N=this.getCurrentFile();null!=N&&(qa=da(G.xml),null!=qa&&""!=qa&&N.mergeFile(new LocalFile(this,
-qa),function(){E.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){E.postMessage(JSON.stringify({event:"merge",message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(E):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):E.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var W=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
+qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){F.postMessage(JSON.stringify({event:"merge",message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var W=mxUtils.bind(this,
+function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();l&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||
-"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=P,E.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){S(P,H)},mxUtils.bind(this,function(P){this.handleError(P)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
+"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=P,F.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){S(P,H)},mxUtils.bind(this,function(P){this.handleError(P)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&S(P.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(P){S(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==G||"object"!==typeof G||null==G.format||null==
-G.data&&null==G.url?(G=da(G),S(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(P){S(W(),H)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var E=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";E.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(H,G,aa){C.apply(this,arguments);E.postMessage(JSON.stringify({event:"openLink",
-href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==
-urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
+G.data&&null==G.url?(G=da(G),S(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(P){S(W(),H)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(H,G,aa){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",
+href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==
+urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,l);f.setAttribute("title",l);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",
g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};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.executeLayoutList=function(d,f){for(var g=this.editor.graph,m=g.getSelectionCells(),q=0;q<d.length;q++){var y=new window[d[q].layout](g);if(null!=d[q].config)for(var E in d[q].config)y[E]=
-d[q].config[E];this.executeLayout(function(){y.execute(g.getDefaultParent(),0==m.length?null:m)},q==d.length-1,f)}};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],E={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},
+":",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.executeLayoutList=function(d,f){for(var g=this.editor.graph,l=g.getSelectionCells(),q=0;q<d.length;q++){var y=new window[d[q].layout](g);if(null!=d[q].config)for(var F in d[q].config)y[F]=
+d[q].config[F];this.executeLayout(function(){y.execute(g.getDefaultParent(),0==l.length?null:l)},q==d.length-1,f)}};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),l=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},
J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var S=null,P="auto";ka=null;for(var Z=[],oa=null,va=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var sa=d.indexOf(":");if(0<sa){var Ba=mxUtils.trim(d.substring(1,sa)),ta=mxUtils.trim(d.substring(sa+1));"label"==Ba?S=H.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?Y=
ta:"labels"==Ba&&0<ta.length&&"-"!=ta?O=JSON.parse(ta):"style"==Ba?aa=ta:"parentstyle"==Ba?X=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?ba=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?da=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&"-"!=ta?ea=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?ka=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?I=ta:"left"==Ba&&0<ta.length?V=ta:"top"==Ba&&0<ta.length?Q=ta:"ignore"==
Ba?va=ta.split(","):"connect"==Ba?Z.push(JSON.parse(ta)):"link"==Ba?oa=ta:"padding"==Ba?ra=parseFloat(ta):"edgespacing"==Ba?R=parseFloat(ta):"nodespacing"==Ba?fa=parseFloat(ta):"levelspacing"==Ba?la=parseFloat(ta):"layout"==Ba&&(P=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(g[Aa].replace(/\r$/,""));sa=d=null;Ba=[];for(ta=0;ta<Na.length;ta++)ea==Na[ta]&&(d=ta),ka==Na[ta]&&(sa=ta),Ba.push(mxUtils.trim(Na[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
-"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ta=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ta+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=
-H.model.getCell(bb));g=null!=Ka;var Ua=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Ua.vertex=!0;Ua.id=bb;Ta=null!=Ka?Ka:Ua;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ta,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ta.getAttribute(Y)];null!=z&&H.labelChanged(Ta,z)}if(null!=ba&&null!=da){var L=da[Ta.getAttribute(ba)];null!=L&&(Ta.style=L)}H.setAttributeForCell(Ta,"placeholders","1");Ta.style=H.replacePlaceholders(Ta,Ta.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),
-H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Ua]));Ka=Ua;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ta=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ta+parseFloat(Ka.getAttribute(V)));
-null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==E[bb]&&(E[bb]=[]),E[bb].push(Ka)):
-(m.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<m.length;ta++){Ka=m[ta];var ua=mxUtils.bind(this,function(Da,La,Za){var Va=La.getAttribute(Za.from);
-if(null!=Va&&""!=Va){Va=Va.split(",");for(var eb=0;eb<Va.length;eb++){var jb=C[Za.to][Va[eb]];if(null==jb&&null!=qa){jb=new mxCell(Va[eb],new mxGeometry(N,W,0,0),qa);jb.style=H.replacePlaceholders(La,jb.style,G);var hb=this.editor.graph.getPreferredSizeForCell(jb);jb.geometry.width=hb.width+ra;jb.geometry.height=hb.height+ra;C[Za.to][Va[eb]]=jb;jb.vertex=!0;jb.id=Va[eb];y.push(H.addCell(jb))}if(null!=jb){hb=Za.label;null!=Za.fromlabel&&(hb=(La.getAttribute(Za.fromlabel)||"")+(hb||""));null!=Za.sourcelabel&&
-(hb=H.replacePlaceholders(La,Za.sourcelabel,G)+(hb||""));null!=Za.tolabel&&(hb=(hb||"")+(jb.getAttribute(Za.tolabel)||""));null!=Za.targetlabel&&(hb=(hb||"")+H.replacePlaceholders(jb,Za.targetlabel,G));var ob="target"==Za.placeholders==!Za.invert?jb:Da;ob=null!=Za.style?H.replacePlaceholders(ob,Za.style,G):H.createCurrentEdgeStyle();hb=H.insertEdge(null,null,hb||"",Za.invert?jb:Da,Za.invert?Da:jb,ob);if(null!=Za.labels)for(ob=0;ob<Za.labels.length;ob++){var pb=Za.labels[ob],cb=new mxCell(pb.label||
-ob,new mxGeometry(null!=pb.x?pb.x:0,null!=pb.y?pb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=pb.placeholders&&(cb.value=H.replacePlaceholders("target"==pb.placeholders==!Za.invert?jb:Da,cb.value,G));if(null!=pb.dx||null!=pb.dy)cb.geometry.offset=new mxPoint(null!=pb.dx?pb.dx:0,null!=pb.dy?pb.dy:0);hb.insert(cb)}ma.push(hb);mxUtils.remove(Za.invert?Da:jb,ia)}}}});ua(Ka,Ka,pa);if(null!=E[Ka.id])for($a=0;$a<E[Ka.id].length;$a++)ua(Ka,E[Ka.id][$a],pa)}}if(null!=
-va)for(ta=0;ta<m.length;ta++)for(Ka=m[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Da=0;Da<y.length;Da++){var La=H.getCellGeometry(y[Da]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==
-P.charAt(0)){var Ma=u;H.view.validate();this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Da){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();
+"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ua=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ua+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=
+H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ua,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ua.getAttribute(Y)];null!=z&&H.labelChanged(Ua,z)}if(null!=ba&&null!=da){var L=da[Ua.getAttribute(ba)];null!=L&&(Ua.style=L)}H.setAttributeForCell(Ua,"placeholders","1");Ua.style=H.replacePlaceholders(Ua,Ua.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),
+H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Va]));Ka=Va;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ua=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ua+parseFloat(Ka.getAttribute(V)));
+null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ka)):
+(l.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<l.length;ta++){Ka=l[ta];var ua=mxUtils.bind(this,function(Ea,La,Ta){var Wa=La.getAttribute(Ta.from);
+if(null!=Wa&&""!=Wa){Wa=Wa.split(",");for(var fb=0;fb<Wa.length;fb++){var gb=C[Ta.to][Wa[fb]];if(null==gb&&null!=qa){gb=new mxCell(Wa[fb],new mxGeometry(N,W,0,0),qa);gb.style=H.replacePlaceholders(La,gb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(gb);gb.geometry.width=ib.width+ra;gb.geometry.height=ib.height+ra;C[Ta.to][Wa[fb]]=gb;gb.vertex=!0;gb.id=Wa[fb];y.push(H.addCell(gb))}if(null!=gb){ib=Ta.label;null!=Ta.fromlabel&&(ib=(La.getAttribute(Ta.fromlabel)||"")+(ib||""));null!=Ta.sourcelabel&&
+(ib=H.replacePlaceholders(La,Ta.sourcelabel,G)+(ib||""));null!=Ta.tolabel&&(ib=(ib||"")+(gb.getAttribute(Ta.tolabel)||""));null!=Ta.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(gb,Ta.targetlabel,G));var tb="target"==Ta.placeholders==!Ta.invert?gb:Ea;tb=null!=Ta.style?H.replacePlaceholders(tb,Ta.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",Ta.invert?gb:Ea,Ta.invert?Ea:gb,tb);if(null!=Ta.labels)for(tb=0;tb<Ta.labels.length;tb++){var qb=Ta.labels[tb],cb=new mxCell(qb.label||
+tb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=qb.placeholders&&(cb.value=H.replacePlaceholders("target"==qb.placeholders==!Ta.invert?gb:Ea,cb.value,G));if(null!=qb.dx||null!=qb.dy)cb.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);ib.insert(cb)}ma.push(ib);mxUtils.remove(Ta.invert?Ea:gb,ia)}}}});ua(Ka,Ka,pa);if(null!=F[Ka.id])for($a=0;$a<F[Ka.id].length;$a++)ua(Ka,F[Ka.id][$a],pa)}}if(null!=
+va)for(ta=0;ta<l.length;ta++)for(Ka=l[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ea=0;Ea<y.length;Ea++){var La=H.getCellGeometry(y[Ea]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==
+P.charAt(0)){var Ma=u;H.view.validate();this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Ea){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();
var Sa=new mxCompactTreeLayout(H,"horizontaltree"==P);Sa.levelDistance=fa;Sa.edgeRouting=!1;Sa.resetEdges=!1;this.executeLayout(function(){Sa.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ia.length){H.view.validate();var za=new mxHierarchicalLayout(H,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=fa;za.parallelEdgeSpacing=R;za.interRankCellSpacing=la;za.disableEdgeStyle=
-!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ea=wa.isVertexIgnored;wa.isVertexIgnored=function(Da){return Ea.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=
-u&&u()}}catch(Da){this.handleError(Da)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Da=wa.isVertexIgnored;wa.isVertexIgnored=function(Ea){return Da.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=
+u&&u()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(f+=g+l+"="+urlParams[l],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+l;for(l in urlParams)0>mxUtils.indexOf(g,l)&&(d=0==f?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,l,q){d=new LinkDialog(this,d,f,g,!0,l,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
-f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+f=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(l&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var F=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);F.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(d,f,g,m,q,y,E,C){var H=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(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
-g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<E?"&dpi="+E:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||
-"none"==m,!0,!1,!1,y,!0,!1,null,C,E):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);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 m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
-m.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 m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var E=mxSettings.getCustomLibraries();for(d=0;d<E.length;d++){var C=E[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(d,f,g,l,q,y,F,C){var H=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(H.getSvg(l,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
+g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=l?l:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==l||
+"none"==l,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);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 l=d;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
+l.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 l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));
q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&
this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));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,m,q){var y=!0,E=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(E);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(E);
+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,l,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&l.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);
y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&
-(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,E=0;E<q.allowedDomains.length;E++)if(f=="https://"+q.allowedDomains[E]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),
-this[m].apply(this,C);else{var H=this[m].apply(this,C);g([H])}}else g(null,"Invalid Call: "+m+" 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 m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",
-{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(E){null!=f&&f(E)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(E){if(!E||"1"==urlParams.forceMigration){var C=
+(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var l=d.funtionName,q=this.remoteInvokableFns[l];if(null!=q&&"function"===typeof this[l]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+l+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),
+this[l].apply(this,C);else{var H=this[l].apply(this,C);g([H])}}else g(null,"Invalid Call: "+l+" 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 l=g.open("database",2);l.onupgradeneeded=function(q){try{var y=l.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",
+{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};l.onsuccess=mxUtils.bind(this,function(q){var y=l.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=
document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=
aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});
-E=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):
-Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",E)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var E=y.transaction(q,"readwrite");E.oncomplete=g;E.onerror=m;for(y=0;y<q.length;y++)E.objectStore(q[y]).put(null!=d&&
-null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);
-y.onsuccess=function(){f(y.result)};y.onerror=g}catch(E){null!=g&&g(E)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(E){null==E.target.result?d(y):(y.push(E.target.result.value),E.target.result.continue())};q.onerror=f}catch(E){null!=f&&f(E)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
-function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.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=
+F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):
+Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});l.onerror=f;l.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,l,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=l;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&
+null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=l&&l(C)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);q=q.transaction(l,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<l.length;y++)q.objectStore(l[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var y=q.transaction([l],"readonly").objectStore(l).get(d);
+y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
+function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
+d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var l=this.getCurrentFile();null!=l?l.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,m,q,y,E,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,E,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+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,l,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,l,q,y,F,C)};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,m,q,y,E,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,E,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};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,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
-EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};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),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===
-m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&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,n,D,t){function F(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function Q(){U.removeChild(la);U.removeChild(ra);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
-la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ra=document.createElement("div");ra.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),F()):Q();H=null});u.className="geCommentEditBtn";ra.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);Q();I(ja);H=null});mxEvent.addListener(la,
+f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,l)};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,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
+EditorUi.prototype.writeGraphModelToPng=function(d,f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,l,q)};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),l=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<l.length){var q="<mxfile "===
+l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(q||l)&&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,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function Q(){U.removeChild(la);U.removeChild(ra);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
+la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ra=document.createElement("div");ra.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):Q();H=null});u.className="geCommentEditBtn";ra.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);Q();I(ja);H=null});mxEvent.addListener(la,
"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(J.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";ra.appendChild(J);U.insertBefore(ra,R);fa.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var I=b.timeSince(ja);null==I&&(I=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
+mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function l(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,S);oa.appendChild(va);mxEvent.addListener(va,"click",function(Aa){P(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function fa(){function S(oa){P.push(Z);if(null!=oa.replies)for(var va=0;va<oa.replies.length;va++)Z=Z.nextSibling,S(oa.replies[va])}var P=[],Z=ra;S(ja);return{pdiv:Z,replies:P}}function la(S,P,Z,oa,va){function Aa(){g(Na);ja.addReply(ta,
-function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();m(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
+function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();l(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
ja.id);ra.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(ra.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";u.appendChild(J);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");J.appendChild(N);
-N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);ra.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ra.appendChild(u);ja.isLocked&&(ra.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);E||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||E||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){m(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
-S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){m(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));E||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function P(){var Z=S.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",va=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Aa;for(var Ba=va[sa].querySelectorAll(".geCommentAction"),
-ta=0;ta<Ba.length;ta++)Ba[ta]!=Z.parentNode&&(Ba[ta].style.display=oa);O||(va[sa].style.display="none")}F()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});ra.appendChild(u);null!=I?da.insertBefore(ra,I.nextSibling):da.appendChild(ra);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,Q);null!=H&&(H.comment.id==ja.id?(Q=ja.content,ja.content=H.comment.content,d(ja,ra,H.saveCallback,
-H.deleteOnCancel),ja.content=Q):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ra}}var E=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
+N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);ra.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ra.appendChild(u);ja.isLocked&&(ra.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
+!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){l(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
+S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){l(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function P(){var Z=S.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",va=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Aa;for(var Ba=va[sa].querySelectorAll(".geCommentAction"),
+ta=0;ta<Ba.length;ta++)Ba[ta]!=Z.parentNode&&(Ba[ta].style.display=oa);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});ra.appendChild(u);null!=I?da.insertBefore(ra,I.nextSibling):da.appendChild(ra);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,Q);null!=H&&(H.comment.id==ja.id?(Q=ja.content,ja.content=H.comment.content,d(ja,ra,H.saveCallback,
+H.deleteOnCancel),ja.content=Q):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ra}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";da.style.bottom=parseInt(aa)+7+"px";G.appendChild(da);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=aa;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!E){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
+aa.className="geButton";if(!F){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){l(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
U();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa)}qa=aa.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);b.commentsRefreshNeeded()&&(qa=aa.cloneNode(),
qa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(qa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(I){b.handleError(I)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
@@ -3783,10 +3784,10 @@ IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("
y(X[I],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(I){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var fa=I[R.id];if(null!=fa)for(f(R,fa),fa=0;null!=R.replies&&fa<R.replies.length;fa++)ja(R.replies[fa])}
if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var Q=U[V];I[Q.getAttribute("data-commentId")]=Q}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,I-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
-this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,F,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
-g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var E=document.createElement("input");E.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(E.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
-t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(E.checked)});g.appendChild(C);null!=F?(C.innerHTML=F+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
-y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(E),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(H){E.checked=!E.checked;mxEvent.consume(H)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,l){var q=document.createElement("div");q.style.textAlign="center";l=null!=l?l:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=l+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
+g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
+t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
+y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3797,14 +3798,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var n=b.indexOf(","),D=null;0<n&&(n=this.getPageById(b.substring(n+1)),null!=n&&n!=e&&(D=this.getImageForPage(n,e,k),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var n=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var t=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(d){return"pagenumber"==d?t+1:"page"==d&&null!=e?e.getName():n.apply(this,arguments)};document.body.appendChild(D.container);
-this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
+this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,n=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=k&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),k=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,t){D=t.getProperty("edit").changes;for(t=0;t<D.length;t++)if(D[t]instanceof SelectPage||D[t]instanceof RenamePage||D[t]instanceof MovePage||D[t]instanceof mxRootChange){n();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var n=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(n.setViewState(e),this.editor.updateGraphComponents(),n.view.revalidate(),n.sizeDidChange()),n.container.scrollLeft=n.view.translate.x*n.view.scale+e.scrollLeft,n.container.scrollTop=n.view.translate.y*n.view.scale+e.scrollTop,n.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),n=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(f){f=f.split("^");return{name:f[0],url:f[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(n)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),n=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(f){f=f.split("^");return{name:f[0],url:f[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(n)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,n,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,e,k,n){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),n=this.getBackgroundImageObject(b.backgroundImage,n),null!=n&&e.setAttribute("backgroundImage",
@@ -3825,86 +3826,86 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var n=this.currentPage;n==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,n=this.pages[k]):1>=this.pages.length&&(n=this.insertPage(),e.model.execute(new RenamePage(this,n,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,n))}finally{e.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var n=this.editor.graph;if(n.isEnabled()){n.isEditing()&&n.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var t={},F=n.createCellLookup([n.model.root]);k=new DiagramPage(D);k.root=n.cloneCell(n.model.root,null,t);var d=new mxGraphModel;d.prefix=Editor.guid()+"-";d.setRoot(k.root);n.updateCustomLinks(n.createCellMapping(t,F),[k.root]);k.viewState=b==this.currentPage?n.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var n=this.editor.graph;if(n.isEnabled()){n.isEditing()&&n.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var t={},E=n.createCellLookup([n.model.root]);k=new DiagramPage(D);k.root=n.cloneCell(n.model.root,null,t);var d=new mxGraphModel;d.prefix=Editor.guid()+"-";d.setRoot(k.root);n.updateCustomLinks(n.createCellMapping(t,E),[k.root]);k.viewState=b==this.currentPage?n.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(f){this.handleError(f)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,n=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,m){this.pages[g]==this.currentPage?(m.className="geActivePage",m.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):m.className="geInactivePage";m.setAttribute("draggable","true");mxEvent.addListener(m,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(m,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
-q.preventDefault()}));mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(m,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(m)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
-n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
-d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,l){this.pages[g]==this.currentPage?(l.className="geActivePage",l.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):l.className="geInactivePage";l.setAttribute("draggable","true");mxEvent.addListener(l,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(l,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
+q.preventDefault()}));mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(l,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(l)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
+n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
+d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var E=0;E<this.pages.length;E++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(E)}),m=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
-null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),m());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
-mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),m(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),F=mxEvent.getClientY(n);D.popup(t,F,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(F)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
+null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),l());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
+mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),l(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,n){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),t=b.getId();k.setAttribute("title",D+(null!=t?" ("+t+")":"")+" ["+n+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(t){this.renamePage(b);mxEvent.consume(t)}));var n=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(t){n=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(t){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(t)&&D||mxEvent.isPopupTrigger(t))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var d=mxEvent.getClientX(t),f=mxEvent.getClientY(t);F.popup(d,f,null,t);this.setCurrentMenu(F,e)}mxEvent.consume(t)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var d=mxEvent.getClientX(t),f=mxEvent.getClientY(t);E.popup(d,f,null,t);this.setCurrentMenu(E,e)}mxEvent.consume(t)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var n=this.getCurrentFile();if(null!=n&&n.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,F,d,f,g,m){t=this.createUrlParameters(t,F,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),F=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-F.x,d.y=d.y/g-F.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,l){t=this.createUrlParameters(t,E,d,f,g,l);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,n){n.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(n.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&n.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,t){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?t:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
-!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,F,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
-function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var F=0;F<t.length;F++)this.model.setVisible(t[F],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,F,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,F,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!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 n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
-!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function F(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
+function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!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 n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
+!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function E(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==I.y&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==I.y+I.height&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(I,V){V=null!=V?V:!0;C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=C.cloneCells([R[0],I]);C.model.setTerminal(fa[0],C.model.getTerminal(R[0],
!0),!0);var la=d(I),ra=Q.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?fa[1].geometry.x+=V?I.geometry.width+10:-fa[1].geometry.width-10:fa[1].geometry.y+=V?I.geometry.height+10:-fa[1].geometry.height-10;C.view.currentRoot!=Q&&(fa[1].geometry.x-=ra.x,fa[1].geometry.y-=ra.y);var u=C.view.getState(I),J=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?I.geometry.width+10:-fa[1].geometry.width-
10)*J:N.y+=(V?I.geometry.height+10:-fa[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var S=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,P=ra=R=0;P<W.length;P++){var Z=C.model.getTerminal(W[P],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,oa)&&(R=10+Math.max(R,(Math.min(N.x+N.width,oa.x+oa.width)-Math.max(N.x,oa.x))/
J),ra=10+Math.max(ra,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}S?ra=0:R=0;for(P=0;P<W.length;P++)if(Z=C.model.getTerminal(W[P],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY()))){var va=[];C.traverse(oa.cell,!0,function(Aa,sa){var Ba=null!=sa&&C.isTreeEdge(sa);Ba&&va.push(sa);(null==sa||Ba)&&va.push(Aa);return null==sa||Ba});C.moveCells(va,(V?1:-1)*R,(V?1:-1)*ra)}}}return C.addCells(fa,Q)}finally{C.model.endUpdate()}}
function g(I){C.model.beginUpdate();try{var V=d(I),Q=C.getIncomingTreeEdges(I),R=C.cloneCells([Q[0],I]);C.model.setTerminal(Q[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var fa=C.model.getParent(I),la=fa.geometry,ra=[];C.view.currentRoot!=fa&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var S=null!=W&&C.isTreeEdge(W);S&&ra.push(W);(null==W||S)&&ra.push(N);return null==W||S});var u=I.geometry.width+40,J=I.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function m(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
+u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function l(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
la[1],!1);var ra=C.getCellStyle(la[1]).newEdgeStyle;if(null!=ra)try{var u=JSON.parse(ra),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",fa==mxConstants.DIRECTION_SOUTH||fa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=Q.geometry;V=[];C.view.currentRoot==Q&&(N=new mxRectangle);for(ra=0;ra<R.length;ra++){var W=C.model.getTerminal(R[ra],!1);null!=W&&V.push(W)}var S=C.view.getBounds(V),
P=C.view.translate,Z=C.view.scale;fa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):fa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=fa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==S?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(S.y+S.height)/Z-P.y+-N.y+10);return C.addCells(la,Q)}finally{C.model.endUpdate()}}function q(I,V,Q){I=C.getOutgoingTreeEdges(I);Q=C.view.getState(Q);var R=[];if(null!=Q&&null!=I){for(var fa=0;fa<I.length;fa++){var la=C.view.getState(C.model.getTerminal(I[fa],!1));null!=la&&(!V&&Math.min(la.x+la.width,Q.x+Q.width)>=Math.max(la.x,Q.x)||V&&Math.min(la.y+la.height,Q.y+
-Q.height)>=Math.max(la.y,Q.y))&&R.push(la)}R.sort(function(ra,u){return V?ra.x+ra.width-u.x-u.width:ra.y+ra.height-u.y-u.height})}return R}function y(I,V){var Q=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==R&&Q!=V?E.actions.get("selectParent").funct():Q==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(Q=C.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(R=q(C.model.getTerminal(Q[0],
-!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var E=this,C=E.editor.graph,H=C.getModel(),G=E.menus.createPopupMenu;E.menus.createPopupMenu=function(I,V,Q){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
-null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,Q)}};E.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],
-!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");E.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");E.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
-C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");E.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var Q=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&Q.push(fa);
+Q.height)>=Math.max(la.y,Q.y))&&R.push(la)}R.sort(function(ra,u){return V?ra.x+ra.width-u.x-u.width:ra.y+ra.height-u.y-u.height})}return R}function y(I,V){var Q=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==R&&Q!=V?F.actions.get("selectParent").funct():Q==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(Q=C.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(R=q(C.model.getTerminal(Q[0],
+!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(I,V,Q){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
+null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,Q)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],
+!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
+C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var Q=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&Q.push(fa);
null!=fa&&!la||null!=V&&mxEvent.isShiftDown(V)||Q.push(R);return null==fa||la})}C.setSelectionCells(Q)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(I,V){V=null!=V?V:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));V&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var Q=[],R=0;R<I.length;R++){var fa=I[R];H.isEdge(fa)&&t(fa)&&(Q.push(fa),fa=H.getTerminal(fa,!1));if(n(fa)){var la=[];C.traverse(fa,!0,function(ra,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
-(null==u||J)&&la.push(ra);return null==u||J});0<la.length&&(Q=Q.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&Q.push(I[R])}I=Q;return aa.apply(this,arguments)};E.hoverIcons.getStateAt=function(I,V,Q){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,Q))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),R=0;R<Q.length;R++){var fa=C.view.getState(Q[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
+(null==u||J)&&la.push(ra);return null==u||J});0<la.length&&(Q=Q.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&Q.push(I[R])}I=Q;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,Q){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,Q))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),R=0;R<Q.length;R++){var fa=C.view.getState(Q[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
for(fa=0;fa<la.length;fa++)mxUtils.remove(la[fa],I)}}this.model.beginUpdate();try{var ra=da.call(this,I,V);if(ra.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(ra[R]);la=C.getIncomingTreeEdges(I[R]);if(0==u.length&&0<la.length){var J=this.cloneCell(la[0]);this.addEdge(J,C.getDefaultParent(),this.model.getTerminal(la[0],!0),ra[R])}}}finally{this.model.endUpdate()}return ra};var ba=C.moveCells;C.moveCells=function(I,V,Q,R,fa,la,ra){var u=null;this.model.beginUpdate();
try{var J=fa,N=this.getCurrentCellStyle(fa);if(null!=I&&n(fa)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<I.length;W++)if(n(I[W])||C.model.isEdge(I[W])&&null==C.model.getTerminal(I[W],!0)){fa=C.model.getParent(I[W]);break}if(null!=J&&fa!=J&&null!=this.view.getState(I[0])){var S=C.getIncomingTreeEdges(I[0]);if(0<S.length){var P=C.view.getState(C.model.getTerminal(S[0],!0));if(null!=P){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-P.getCenterX())/C.view.scale,Q=(Z.getCenterY()-
P.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=I&&u.length==I.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(J)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],J,!0);else if(n(I[W])&&(S=C.getIncomingTreeEdges(I[W]),0<S.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(S[0],!0))&&this.model.setTerminal(S[0],J,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=J;if(null==N||N==C.model.getParent(I[W]))N=C.model.getTerminal(S[0],
-!0);R=this.cloneCell(S[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=E.sidebar){var Y=E.sidebar.dropAndConnect;E.sidebar.dropAndConnect=function(I,V,Q,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var ra=0;ra<la.length;ra++)if(fa.isEdge(la[ra])&&null==fa.getTerminal(la[ra],!0)){fa.setTerminal(la[ra],I,!0);var u=C.getCellGeometry(la[ra]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var qa=
-{88:E.actions.get("selectChildren"),84:E.actions.get("selectSubtree"),80:E.actions.get("selectParent"),83:E.actions.get("selectSiblings")},O=E.onKeyDown;E.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
-V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=E.hoverIcons&&E.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=qa[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){E.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,Q,R,fa,la,ra){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return J==V||0==u.length?m(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||F(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
-n(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
-mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;E.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.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=
+!0);R=this.cloneCell(S[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(I,V,Q,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var ra=0;ra<la.length;ra++)if(fa.isEdge(la[ra])&&null==fa.getTerminal(la[ra],!0)){fa.setTerminal(la[ra],I,!0);var u=C.getCellGeometry(la[ra]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var qa=
+{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):l(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
+V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=qa[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){F.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,Q,R,fa,la,ra){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return J==V||0==u.length?l(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
+n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.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 ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,V){U.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 n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-F.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(F);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
-t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var d=new mxCell("Topic",
-new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);
-var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;F.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-y.geometry.relative=!0;y.edge=!0;F.insertEdge(y,!0);q.insertEdge(y,!1);var E=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var C=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;F.insertEdge(C,!0);E.insertEdge(C,!1);t.insert(f);t.insert(m);t.insert(y);t.insert(C);t.insert(F);t.insert(d);t.insert(g);t.insert(q);t.insert(E);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
+t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
+new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);
+var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+y.geometry.relative=!0;y.edge=!0;E.insertEdge(y,!0);q.insertEdge(y,!1);var F=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var C=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(l);t.insert(y);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-t.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-m.geometry.relative=!0;m.edge=!0;F.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);t.insert(F);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
-"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
-!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([F,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+t.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);t.insert(f);t.insert(l);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
+"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
+!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var I=
O.createFormat(U);I.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(I,V){var Q=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){Q.funct.apply(this,arguments)}));
@@ -3921,12 +3922,12 @@ ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.wi
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(O){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(O);null==urlParams.dark&&(mxSettings.settings.darkMode=O,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var F=document.createElement("link");F.setAttribute("rel","stylesheet");F.setAttribute("href",STYLE_PATH+"/dark.css");F.setAttribute("charset","UTF-8");F.setAttribute("type",
+EditorUi.prototype.setDarkMode=function(O){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(O);null==urlParams.dark&&(mxSettings.settings.darkMode=O,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
"text/css");EditorUi.prototype.doSetDarkMode=function(O){if(Editor.darkMode!=O){var X=this.editor.graph;Editor.darkMode=O;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";X.view.gridColor=Editor.isDarkMode()?X.view.defaultDarkGridColor:X.view.defaultGridColor;X.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";X.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
"#ffffff";X.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";X.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";X.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.loadStylesheet();null!=this.actions.layersWindow&&(O=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null,O&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=X.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=X.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=X.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
X.shapeForegroundColor;Graph.prototype.defaultThemeName=X.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
-Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==F.parentNode&&document.getElementsByTagName("head")[0].appendChild(F):null!=F.parentNode&&F.parentNode.removeChild(F)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
+Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
@@ -3935,16 +3936,16 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
-X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):l.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==X?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div");O.style.display="inline-block";O.style.position="relative";O.style.marginTop="6px";O.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ea="1"==urlParams.publishClose?
mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(X,ea);X.setAttribute("title",ea);mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));O.appendChild(X)}}else mxUtils.write(X,mxResources.get("save")),X.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),O.appendChild(X),"1"==urlParams.saveAndExit&&(X=document.createElement("a"),
mxUtils.write(X,mxResources.get("saveAndExit")),X.setAttribute("title",mxResources.get("saveAndExit")),X.className="geMenuItem",X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),O.appendChild(X));"1"!=urlParams.noExitBtn&&(X=document.createElement("a"),ea="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(X,ea),X.setAttribute("title",ea),X.className="geMenuItem",
-X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(X));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var E=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);
-ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=E.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,
+X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(X));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);
+ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=F.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,
ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(O,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,ea),this.addMenuItems(O,["collapsible","-","lockUnlock","enterGroup"],null,ea),O.addSeparator(),this.addSubmenu("layout",O)):ka.isSelectionEmpty()&&ka.isEnabled()?(O.addSeparator(),this.addMenuItems(O,["editData"],null,ea),O.addSeparator(),this.addSubmenu("layout",O),this.addSubmenu("insert",O),this.addMenuItems(O,["-","exitGroup"],null,ea)):ka.isEnabled()&&
this.addMenuItems(O,["-","lockUnlock"],null,ea)};var H=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(O,X,ea){H.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(O,["copyAsImage"],null,ea)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
@@ -3958,35 +3959,35 @@ O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get
null,null,Editor.ctrlKey+"+Shift+K"));O.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var R=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var R=
new ParseDialog(O,mxResources.get("mermaid")+"...","mermaid");O.showDialog(R.container,620,420,!0,!1);R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,ra=la.getSelectionCell();ka.call(this,R,ra,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(ra)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,ra){R.addSeparator();
this.addSubmenu("editCell",R,ra,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],fa);O.menus.addSubmenu("openFrom",R,fa);isLocalStorage&&this.addSubmenu("openRecent",R,fa);R.addSeparator(fa);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["showRemoteCursors",
-"shareCursor"],fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&"1"!=urlParams.embedInline)){var ra=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ra)&&!/(\.svg)$/i.test(ra))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));
-R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,
-["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["showRemoteCursors","shareCursor"],fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,["outline"],fa);O.commentsSupported()&&O.menus.addMenuItems(R,
-["comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==
-App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
-this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",
-R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",
-R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen","search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),
-fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa),R.addSeparator(fa),O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa));("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
+"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&
+"1"!=urlParams.embedInline)){var ra=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ra)&&!/(\.svg)$/i.test(ra))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),
+fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,["outline"],fa);O.commentsSupported()&&O.menus.addMenuItems(R,["comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&
+"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();
+null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",
+new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);
+this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=
+urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen","search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&
+la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,ra){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ra),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ra),O.menus.addSubmenu("insertLayout",la,ra,mxResources.get("layout")),O.menus.addSubmenu("insertAdvanced",la,ra,mxResources.get("advanced"))):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,ra))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
Q=function(R,fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function O(za,wa,Ea){var Da=U.menus.get(za),La=R.addMenu(mxResources.get(za),mxUtils.bind(this,function(){Da.funct.apply(this,arguments)}),Q);La.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";La.style.display="inline-block";La.style.boxSizing="border-box";La.style.top="6px";La.style.marginRight="6px";La.style.height="30px";La.style.paddingTop="6px";La.style.paddingBottom="6px";La.style.cursor="pointer";La.setAttribute("title",mxResources.get(za));U.menus.menuCreated(Da,
-La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Za){var Va=document.createElement("a");Va.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Va.style.display="inline-block";Va.style.boxSizing="border-box";Va.style.height="30px";Va.style.padding="6px";Va.style.position="relative";Va.style.verticalAlign="top";Va.style.top="0px";"1"==urlParams.sketch&&(Va.style.borderStyle="none",Va.style.boxShadow="none",Va.style.padding="6px",Va.style.margin="0px");null!=U.statusContainer?V.insertBefore(Va,U.statusContainer):V.appendChild(Va);null!=Za?(Va.style.backgroundImage="url("+Za+")",Va.style.backgroundPosition=
-"center center",Va.style.backgroundRepeat="no-repeat",Va.style.backgroundSize="24px 24px",Va.style.width="34px"):mxUtils.write(Va,za);mxEvent.addListener(Va,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(eb){eb.preventDefault()}));mxEvent.addListener(Va,"click",function(eb){"disabled"!=Va.getAttribute("disabled")&&wa(eb);mxEvent.consume(eb)});null==Ea&&(Va.style.marginRight="4px");null!=Da&&Va.setAttribute("title",Da);null!=La&&(za=function(){La.isEnabled()?(Va.removeAttribute("disabled"),
-Va.style.cursor="pointer"):(Va.setAttribute("disabled","disabled"),Va.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Va}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
-for(var Da=0;Da<za.length;Da++)null!=za[Da]&&("1"==urlParams.sketch&&(za[Da].style.padding="10px 8px",za[Da].style.width="30px"),za[Da].style.margin="0px",za[Da].style.boxShadow="none",Ea.appendChild(za[Da]));null!=wa&&mxUtils.setOpacity(Ea,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ea,U.statusContainer):V.appendChild(Ea);return Ea}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za=
-V.firstChild;null!=za;){var wa=za.nextSibling;"geMenuItem"!=za.className&&"geItem"!=za.className||za.parentNode.removeChild(za);za=wa}Q=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;za=1E3>n||"1"==urlParams.sketch;var Ea=null;za||(Ea=O("diagram"));wa=za?O("diagram",null,Editor.drawLogoImage):null;null!=wa&&(Ea=wa);ea([Ea,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),za?Editor.shapesImage:
-null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),za?Editor.formatImage:null)],za?60:null);wa=O("insert",!0,za?N:null);ea([wa,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),za?Editor.trashImage:null)],za?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ua,640<=n?X("",Ta.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Ta,Editor.zoomInImage):null,640<=n?X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=Ea&&(mxEvent.disableContextMenu(Ea),mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Da){(mxEvent.isShiftDown(Da)||mxEvent.isAltDown(Da)||mxEvent.isMetaDown(Da)||mxEvent.isControlDown(Da)||mxEvent.isPopupTrigger(Da))&&U.appIconClicked(Da)}),null,null));wa=U.menus.get("language");null!=wa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+function(){function O(za,wa,Da){var Ea=U.menus.get(za),La=R.addMenu(mxResources.get(za),mxUtils.bind(this,function(){Ea.funct.apply(this,arguments)}),Q);La.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";La.style.display="inline-block";La.style.boxSizing="border-box";La.style.top="6px";La.style.marginRight="6px";La.style.height="30px";La.style.paddingTop="6px";La.style.paddingBottom="6px";La.style.cursor="pointer";La.setAttribute("title",mxResources.get(za));U.menus.menuCreated(Ea,
+La,"geMenuItem");null!=Da?(La.style.backgroundImage="url("+Da+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Da,Ea,La,Ta){var Wa=document.createElement("a");Wa.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Wa.style.display="inline-block";Wa.style.boxSizing="border-box";Wa.style.height="30px";Wa.style.padding="6px";Wa.style.position="relative";Wa.style.verticalAlign="top";Wa.style.top="0px";"1"==urlParams.sketch&&(Wa.style.borderStyle="none",Wa.style.boxShadow="none",Wa.style.padding="6px",Wa.style.margin="0px");null!=U.statusContainer?V.insertBefore(Wa,U.statusContainer):V.appendChild(Wa);null!=Ta?(Wa.style.backgroundImage="url("+Ta+")",Wa.style.backgroundPosition=
+"center center",Wa.style.backgroundRepeat="no-repeat",Wa.style.backgroundSize="24px 24px",Wa.style.width="34px"):mxUtils.write(Wa,za);mxEvent.addListener(Wa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Wa,"click",function(fb){"disabled"!=Wa.getAttribute("disabled")&&wa(fb);mxEvent.consume(fb)});null==Da&&(Wa.style.marginRight="4px");null!=Ea&&Wa.setAttribute("title",Ea);null!=La&&(za=function(){La.isEnabled()?(Wa.removeAttribute("disabled"),
+Wa.style.cursor="pointer"):(Wa.setAttribute("disabled","disabled"),Wa.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Wa}function ea(za,wa,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
+for(var Ea=0;Ea<za.length;Ea++)null!=za[Ea]&&("1"==urlParams.sketch&&(za[Ea].style.padding="10px 8px",za[Ea].style.width="30px"),za[Ea].style.margin="0px",za[Ea].style.boxShadow="none",Da.appendChild(za[Ea]));null!=wa&&mxUtils.setOpacity(Da,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Da,U.statusContainer):V.appendChild(Da);return Da}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za=
+V.firstChild;null!=za;){var wa=za.nextSibling;"geMenuItem"!=za.className&&"geItem"!=za.className||za.parentNode.removeChild(za);za=wa}Q=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;za=1E3>n||"1"==urlParams.sketch;var Da=null;za||(Da=O("diagram"));wa=za?O("diagram",null,Editor.drawLogoImage):null;null!=wa&&(Da=wa);ea([Da,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),za?Editor.shapesImage:
+null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),za?Editor.formatImage:null)],za?60:null);wa=O("insert",!0,za?N:null);ea([wa,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),za?Editor.trashImage:null)],za?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ua,640<=n?X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Ua,Editor.zoomInImage):null,640<=n?X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&U.appIconClicked(Ea)}),null,null));wa=U.menus.get("language");null!=wa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
n&&"1"!=urlParams.sketch?(null==Fa&&(wa=R.addMenu("",wa.funct),wa.setAttribute("title",mxResources.get("language")),wa.className="geToolbarButton",wa.style.backgroundImage="url("+Editor.globeImage+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.position="absolute",wa.style.height="24px",wa.style.width="24px",wa.style.zIndex="1",wa.style.right="8px",wa.style.cursor="pointer",wa.style.top="1"==urlParams.embed?"12px":
"11px",V.appendChild(wa),Fa=wa),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Fa&&(Fa.parentNode.removeChild(Fa),Fa=null))}qa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Ea=U.embedViewport.x+
-U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Za=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Ea-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,Za-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
+urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Da=U.embedViewport.x+
+U.embedViewport.width,Ea=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Ta=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Da-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ea,Ta-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var I=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var Q=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var fa=U.hideCurrentMenu;U.hideCurrentMenu=function(){fa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var za=U.getCurrentFile();if(null!=za&&null!=za.getTitle()){var wa=za.getMode();"google"==wa?wa="googleDrive":"github"==wa?wa="gitHub":"gitlab"==wa?wa="gitLab":"onedrive"==wa&&(wa="oneDrive");wa=mxResources.get(wa);V.setAttribute("title",za.getTitle()+(null!=wa?" ("+wa+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
@@ -4005,20 +4006,20 @@ mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlPa
U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(za);var wa=U.getCurrentFile();wa=null!=wa?wa.savingStatusKey:DrawioFile.prototype.savingStatusKey;za==mxResources.get(wa)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(wa))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",sa=!0):6<U.buttonContainer.clientWidth&&(U.statusContainer.style.display="none",sa=!1)}else U.statusContainer.style.display="inline-block",
Ba(null),sa=!0;V.style.visibility=20>V.clientWidth&&!sa?"hidden":""}}));pa=O("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";P.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(za){(mxEvent.isShiftDown(za)||mxEvent.isAltDown(za)||mxEvent.isMetaDown(za)||mxEvent.isControlDown(za)||mxEvent.isPopupTrigger(za))&&this.appIconClicked(za)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display=
"none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var ta=document.createElement("a");ta.style.padding="0px";ta.style.boxShadow="none";ta.className="geMenuItem";ta.style.display="inline-block";
-ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Za){Da=X("",Da.funct,null,La,Da,Za);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Za){null!=La&&Da.setAttribute("title",
-La);Da.style.cursor=null!=Za?Za:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.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"),!0,!1,null,!0),mxResources.get("note"));wa(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");wa(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Da=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Da.geometry.setTerminalPoint(new mxPoint(0,0),!0);Da.geometry.setTerminalPoint(new mxPoint(Da.geometry.width,0),!1);Da.geometry.points=[];Da.geometry.relative=!0;Da.edge=!0;wa(U.sidebar.createEdgeTemplateFromCells([Da],Da.geometry.width,Da.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Da=Da.clone();Da.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Da.geometry.width=I.defaultEdgeLength+20;Da.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Da.geometry.setTerminalPoint(new mxPoint(Da.geometry.width,20),!1);Da=wa(U.sidebar.createEdgeTemplateFromCells([Da],Da.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Da.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Da.style.paddingBottom="14px";Da.style.marginBottom="14px"})();za(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ea=U.actions.get("toggleShapes");za(Ea,mxResources.get("shapes")+
-" ("+Ea.shortcut+")",N);pa=O("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer");pa=O("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(ta)});mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){Na?(mxUtils.setPrefixedStyle(S.style,
+ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Ea,La,Ta){Ea=X("",Ea.funct,null,La,Ea,Ta);Ea.style.width="40px";Ea.style.opacity="0.7";return wa(Ea,null,"pointer")},wa=function(Ea,La,Ta){null!=La&&Ea.setAttribute("title",
+La);Ea.style.cursor=null!=Ta?Ta:"default";Ea.style.margin="2px 0px";S.appendChild(Ea);mxUtils.br(S);return Ea};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.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"),!0,!1,null,!0),mxResources.get("note"));wa(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");wa(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ea=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+Ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ea.geometry.setTerminalPoint(new mxPoint(Ea.geometry.width,0),!1);Ea.geometry.points=[];Ea.geometry.relative=!0;Ea.edge=!0;wa(U.sidebar.createEdgeTemplateFromCells([Ea],Ea.geometry.width,Ea.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ea=Ea.clone();Ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ea.geometry.width=I.defaultEdgeLength+20;Ea.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);Ea.geometry.setTerminalPoint(new mxPoint(Ea.geometry.width,20),!1);Ea=wa(U.sidebar.createEdgeTemplateFromCells([Ea],Ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ea.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ea.style.paddingBottom="14px";Ea.style.marginBottom="14px"})();za(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Da=U.actions.get("toggleShapes");za(Da,mxResources.get("shapes")+
+" ("+Da.shortcut+")",N);pa=O("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer");pa=O("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(ta)});mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){Na?(mxUtils.setPrefixedStyle(S.style,
"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ta.style.width="40px",ta.style.height="12px",ta.setAttribute("title","Minimize"),Na=!1,Ca()):(S.innerHTML="",S.appendChild(ta),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",ta.style.height="24px",ta.style.backgroundImage=
-"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Qa=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},Ta=U.actions.get("zoomIn"),
-Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
-"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Ea=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Ea?" ["+Ea+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca);
-T.addListener("stateChanged",function(){ca.style.opacity=T.enabled?"":"0.1"});var ia=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Ua.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};P.appendChild(z);P.appendChild(L);Ua.addListener("stateChanged",ia);$a.addListener("stateChanged",ia);ia();var ma=this.createPageMenuTab(!1,!0);ma.style.display="none";ma.style.position="";ma.style.marginLeft=
+"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Qa=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},Ua=U.actions.get("zoomIn"),
+Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Va=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Va.funct,null,mxResources.get("undo")+" ("+Va.shortcut+")",Va,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
+"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Da=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Da?" ["+Da+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca);
+T.addListener("stateChanged",function(){ca.style.opacity=T.enabled?"":"0.1"});var ia=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Va.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};P.appendChild(z);P.appendChild(L);Va.addListener("stateChanged",ia);$a.addListener("stateChanged",ia);ia();var ma=this.createPageMenuTab(!1,!0);ma.style.display="none";ma.style.position="";ma.style.marginLeft=
"";ma.style.top="";ma.style.left="";ma.style.height="100%";ma.style.lineHeight="";ma.style.borderStyle="none";ma.style.padding="3px 0";ma.style.margin="0px";ma.style.background="";ma.style.border="";ma.style.boxShadow="none";ma.style.verticalAlign="top";ma.style.width="auto";ma.style.maxWidth="160px";ma.style.position="relative";ma.style.padding="6px";ma.style.textOverflow="ellipsis";ma.style.opacity="0.8";W.appendChild(ma);U.editor.addListener("pagesPatched",bb);U.editor.addListener("pageSelected",
bb);U.editor.addListener("pageRenamed",bb);U.editor.addListener("fileLoaded",bb);bb();U.addListener("fileDescriptorChanged",J);U.addListener("pagesVisibleChanged",J);U.editor.addListener("pagesPatched",J);J();J=X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);W.appendChild(J);var pa=document.createElement("div");pa.innerHTML="100%";pa.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");pa.style.display=
-"inline-block";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";W.appendChild(pa);mxEvent.addListener(pa,"click",Qa);Qa=X("",Ta.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ta,Editor.zoomInImage);W.appendChild(Qa);u.visible&&(W.appendChild(M),mxEvent.addListener(document,
+"inline-block";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";W.appendChild(pa);mxEvent.addListener(pa,"click",Qa);Qa=X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ua,Editor.zoomInImage);W.appendChild(Qa);u.visible&&(W.appendChild(M),mxEvent.addListener(document,
"fullscreenchange",function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=U.actions.get("exit"),W.appendChild(X("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));U.tabContainer.style.visibility="hidden";V.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
P.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";ra.appendChild(P);ra.appendChild(W);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
mxClient.IS_POINTER&&(S.style.touchAction="none");ra.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(ra)}else{var ua=X("",Qa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",bb,Editor.zoomFitImage);V.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";pa=R.addMenu("100%",
@@ -4030,23 +4031,23 @@ urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mx
ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Ma=null,Oa=null,Pa=null,Sa=null;mxEvent.addGestureListeners(ja,function(za){Sa=parseInt(U.diagramContainer.style.height);Oa=mxEvent.getClientY(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(za){Pa=parseInt(U.diagramContainer.style.width);Ma=
mxEvent.getClientX(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});mxEvent.addGestureListeners(document.body,null,function(za){var wa=!1;null!=Ma&&(U.diagramContainer.style.width=Math.max(20,Pa+mxEvent.getClientX(za)-Ma)+"px",wa=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Sa+mxEvent.getClientY(za)-Oa)+"px",wa=!0);wa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
"*"),Z(),U.refresh())},function(za){null==Ma&&null==Oa||mxEvent.consume(za);Oa=Ma=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:
this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var n=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&
-this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,G=this.view.translate;F.setAttribute("viewBox",H.x+G.x-this.panDx+" "+(H.y+G.y-this.panDy)+" "+(H.width+1)+
-" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
+this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,G=this.view.translate;E.setAttribute("viewBox",H.x+G.x-this.panDx+" "+(H.y+G.y-this.panDy)+" "+(H.width+1)+
+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(H){return d.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
-0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var l=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:l.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
this.selectPageById=function(H){H=this.getIndexById(H);var G=0<=H;G&&this.selectPage(H);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var G=H.src,aa=G.indexOf(",");0<aa&&(aa=d.getIndexById(G.substring(aa+1)),0<=aa&&(H=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[aa])),
-H.originalSrc=G))}y.apply(this,arguments)};var E=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var G=E.apply(this,arguments);H=this.backgroundImage;if(null!=H){var aa=this.view.translate,da=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+H.x)*da,(aa.y+H.y)*da,H.width*da,H.height*da))}return G};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",
+H.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var G=F.apply(this,arguments);H=this.backgroundImage;if(null!=H){var aa=this.view.translate,da=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+H.x)*da,(aa.y+H.y)*da,H.width*da,H.height*da))}return G};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",
this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=
!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var G=H.indexOf(",");d.selectPageById(H.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return C.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});
-k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),t=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(t.disconnect(),n())}));t.observe(D,{attributes:!0})}else n()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),t=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(t.disconnect(),n())}));t.observe(D,{attributes:!0})}else n()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
@@ -4060,17 +4061,17 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=f,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",n),this.graph.addListener("size",n)):new ResizeSensor(this.graph.container,n));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var t=D=null;n=mxUtils.bind(this,function(){window.clearTimeout(t);this.handlingResize||(t=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",n):new ResizeSensor(this.graph.container,n))}else 9>=document.documentMode||this.graph.addListener("size",
-n);var F=mxUtils.bind(this,function(d){var f=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>g)?(d=null,null!=g&&e.height+2*this.graph.border>g-2&&(d=(g-2*this.graph.border-2)/e.height),this.fitGraph(d)):this.widthIsEmpty||
-null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+d.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=f});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(d){e=this.graph.getGraphBounds();D=null;F(d)}};
+n);var E=mxUtils.bind(this,function(d){var f=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>g)?(d=null,null!=g&&e.height+2*this.graph.border>g-2&&(d=(g-2*this.graph.border-2)/e.height),this.fitGraph(d)):this.widthIsEmpty||
+null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+d.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=f});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(d){e=this.graph.getGraphBounds();D=null;E(d)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
-d<F;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<F;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
+d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
-"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);l++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),F=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(F(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){F(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){F(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||F(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
-this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():F(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,E=null,C=null,H=0;H<g.length;H++){var G=
+function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
+mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
+this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,l=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
g[H];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var aa=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");aa.style.borderRightStyle="none";aa.style.paddingLeft="0px";aa.style.paddingRight="0px";k.appendChild(C);var da=
b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");da.style.paddingLeft="0px";da.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerHTML="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";aa.style.display=C.style.display;da.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==G){if(this.layersEnabled){var ba=this.graph.getModel(),
@@ -4078,10 +4079,10 @@ Y=b(mxUtils.bind(this,function(ea){if(null!=q)q.parentNode.removeChild(q),q=null
U.translate.x&&0<ja.y/U.scale+this.graph.originalViewState.translate.y-U.translate.y&&(U.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ea=Y.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var ka=mxUtils.getDocumentScrollOrigin(document);q.style.left=ka.x+ea.left-1+"px";q.style.top=ka.y+ea.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");ba.addListener(mxEvent.CHANGE,function(){Y.style.display=
1<ba.getChildCount(ba.root)?"inline-block":"none"});Y.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ea){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
-y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=E)E.parentNode.removeChild(E),E=null;else{E=y.div;mxEvent.addListener(E,"mouseleave",function(){E.parentNode.removeChild(E);E=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);E.style.left=ka.x+ea.left-1+"px";E.style.top=
-ka.y+ea.bottom-2+"px";document.body.appendChild(E);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
+y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);F.style.left=ka.x+ea.left-1+"px";F.style.top=
+ka.y+ea.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*l);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*l;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
{left:-ka.x,top:-ka.y};ea={left:ea.left-ka.left,top:ea.top-ka.top,bottom:ea.bottom-ka.top,right:ea.right-ka.left};k.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ea.top+1+"px"):k.style.top=ea.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(U){for(U=mxEvent.getSource(U);null!=U;){if(U==e||U==k||U==q)return;U=U.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(U){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
@@ -4093,20 +4094,20 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){n.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-n.refresh=function(){};var D=mxUtils.bind(this,function(m){27==m.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var F=n.editor.graph,d=F.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;F.getImageFromBundles=function(m){return f.getImageUrl(m)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(q){return f.getImageUrl(q)};return m};this.graphConfig.move&&(F.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(F,n);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
-"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(F,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
+n.refresh=function(){};var D=mxUtils.bind(this,function(l){27==l.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var E=n.editor.graph,d=E.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;E.getImageFromBundles=function(l){return f.getImageUrl(l)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=g.apply(this,arguments);l.getImageFromBundles=function(q){return f.getImageUrl(q)};return l};this.graphConfig.move&&(E.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(E,n);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
+"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(E,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerHTML="",GraphViewer.createViewerForElement(e)}catch(k){e.innerHTML=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var n=document.getElementsByTagName("*");e=[];for(k=0;k<n.length;k++){var D=n[k].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&e.push(n[k]))}return e};
GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var n=JSON.parse(k),D=function(t){t=mxUtils.parseXml(t);t=new GraphViewer(b,t.documentElement,n);null!=e&&e(t)};null!=n.url?GraphViewer.getUrl(n.url,function(t){D(t)}):D(n.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(E){this.q.push(E)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function F(q,y){if(!q.resizedAttached)q.resizedAttached=
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var E=q.resizeSensor.childNodes[0],C=E.childNodes[0],H=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";E.scrollLeft=1E5;E.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};G();var aa=!1,da=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(da))};b(da);var ba,Y,qa,O;y=function(){if((qa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)aa=!0,ba=qa,Y=O;G()};var X=
-function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(E,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)F(k[f],d)}else F(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],H=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};G();var aa=!1,da=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(da))};b(da);var ba,Y,qa,O;y=function(){if((qa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)aa=!0,ba=qa,Y=O;G()};var X=
+function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(F,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var l=k.length;f<l;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
y;q++)e.detach(k[q]);else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 14c3d132..a9974124 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -109,7 +109,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"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.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:"18.0.7",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.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:"18.0.8",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]"!==
@@ -1935,7 +1935,7 @@ function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};
Editor=function(b,e,k,n,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=n||this.createGraph(e,k);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(t){this.status=t;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(t,F){t=null!=F?F.getProperty("edit"):null;null!=t&&t.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+function(){return this.status};this.graphChangeListener=function(t,E){t=null!=E?E.getProperty("edit"):null;null!=t&&t.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -1968,7 +1968,7 @@ Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";
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.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.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),n=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(n,mxUtils.bind(this,function(D,t,F){D=n.substring(D+8,D+8+F);"zTXt"==t?(F=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,F)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(e=D))):"tEXt"==t&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
+Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),n=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(n,mxUtils.bind(this,function(D,t,E){D=n.substring(D+8,D+8+E);"zTXt"==t?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(e=D))):"tEXt"==t&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
D[0]||"mxfile"==D[0])&&(e=D[1]));if(null!=e||"IDAT"==t)return!0}))}catch(D){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
@@ -1985,89 +1985,89 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,n,D,t,F,d,f,g,m){var q=f?57:0,y=k,E=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
+function Dialog(b,e,k,n,D,t,E,d,f,g,l){var q=f?57:0,y=k,F=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";aa+=H.x;da+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+
"px",da+=b.embedViewport.y,aa+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(aa,da,k,n);aa=D.x;da=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
-g();null!=qa&&(y=k=qa.w,E=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));da=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(E,G-C);qa=this.getPosition(aa,da,k,n);aa=qa.x;da=qa.y;ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.width=k+"px";ba.style.height=
-n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!l)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
+g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));da=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(aa,da,k,n);aa=qa.x;da=qa.y;ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.width=k+"px";ba.style.height=
+n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,n,D,t,F,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var E=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
-E.className="geBtn";k.appendChild(E);null!=F&&(n=mxUtils.button(F,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){E.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(E){var C=F.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=F.checked?1:parseInt(m.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
-G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();E&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(F);var f=document.createElement("span");mxUtils.write(f,
-" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(E){F.checked=!F.checked;g.checked=!F.checked;mxEvent.consume(E)});mxEvent.addListener(F,"change",function(){g.checked=!F.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
-d.appendChild(f);mxEvent.addListener(f,"click",function(E){g.checked=!g.checked;F.checked=!g.checked;mxEvent.consume(E)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
-mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");F.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,l){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=l&&l()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=E.checked?1:parseInt(l.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var l=document.createElement("input");l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.setAttribute("size","4");l.setAttribute("disabled","disabled");l.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);
b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,n,D,t,F){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
+PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(E.setAttribute("src",G.src),E.style.display=""):(E.removeAttribute("src"),E.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
-"100%";D.style.height="100%";var t=document.createElement("tbody");var F=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");F.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);F.appendChild(d);t.appendChild(F);F=document.createElement("tr");d=document.createElement("td");
-mxUtils.write(d,mxResources.get("background")+":");F.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(aa){m=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});F.appendChild(d);t.appendChild(F);F=document.createElement("tr");
-d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");F.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var E=document.createElement("img");E.setAttribute("valign","middle");E.style.verticalAlign="middle";E.style.border="1px solid lightGray";E.style.borderRadius="4px";E.style.marginRight="14px";E.style.maxWidth="100px";E.style.cursor="pointer";E.style.height=
-"60px";E.style.padding="4px";var C=n.backgroundImage,H=function(G){b.showBackgroundImageDialog(function(aa,da){da||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",H);mxEvent.addListener(E,"click",H);k();d.appendChild(E);d.appendChild(y);F.appendChild(d);t.appendChild(F);F=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
-"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
-d.appendChild(H);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);t.appendChild(F);D.appendChild(t);this.container=D};
+var PageSetupDialog=function(b){function e(){null==l||l==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=l,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
+mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var l=n.background;e();mxEvent.addListener(g,
+"click",function(G){b.pickColor(l||"none",function(aa){l=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
+"60px";F.style.padding="4px";var C=n.backgroundImage,H=function(G){b.showBackgroundImageDialog(function(aa,da){da||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",H);mxEvent.addListener(F,"click",H);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
+"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,l,C,f.get());G.ignoreColor=n.background==l;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
+d.appendChild(H);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,O,X){if(X||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(O=0;O<C.length;O++)X=C[O],da?"custom"==X.key&&(d.value=X.key,da=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,qa=F.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
-"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
-var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";f.appendChild(F);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var E={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];E[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
-G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var ba=k,Y=function(qa,O){qa=E[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&F.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));O&&da||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){F.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(F,
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",l.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+"checked"),d.value="custom",f.style.display="none",l.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
+var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var l=document.createElement("div");l.style.marginLeft=
+"4px";l.style.width="210px";l.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";l.appendChild(q);mxUtils.write(l," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";l.appendChild(y);mxUtils.write(l," in");f.style.display="none";l.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];F[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
+G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(l);var ba=k,Y=function(qa,O){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,l.style.display="none",f.style.display=""):(f.style.display="none",l.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));O&&da||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(qa){da="custom"==d.value;Y(qa,!0)});Y();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:y}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,n,D,t,F,d,f,g,m,q){f=null!=f?f:!0;var y=document.createElement("table"),E=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
-G.setAttribute("value",e||"");G.style.marginLeft="4px";G.style.width=null!=q?q+"px":"180px";var aa=mxUtils.button(k,function(){if(null==t||t(G.value))f&&b.hideDialog(),n(G.value)});aa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==F)if(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var da=y.parentNode;if(null!=da){var ba=null;mxEvent.addListener(da,"dragleave",function(Y){null!=ba&&(ba.style.backgroundColor=
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,l,q){f=null!=f?f:!0;var y=document.createElement("table"),F=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
+G.setAttribute("value",e||"");G.style.marginLeft="4px";G.style.width=null!=q?q+"px":"180px";var aa=mxUtils.button(k,function(){if(null==t||t(G.value))f&&b.hideDialog(),n(G.value)});aa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var da=y.parentNode;if(null!=da){var ba=null;mxEvent.addListener(da,"dragleave",function(Y){null!=ba&&(ba.style.backgroundColor=
"",ba=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(da,"dragover",mxUtils.bind(this,function(Y){null==ba&&(!mxClient.IS_IE||10<document.documentMode)&&(ba=G,ba.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(da,"drop",mxUtils.bind(this,function(Y){null!=ba&&(ba.style.backgroundColor="",ba=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(G.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")),aa.click());
-Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==F)E.appendChild(C),null!=m&&(H.appendChild(FilenameDialog.createTypeHint(b,G,m)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
-":"),C.appendChild(H),H=document.createElement("td"),H.style.whiteSpace="nowrap",C.appendChild(H),e=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",H.appendChild(e),G.style.width=null!=q?q-40+"px":"190px",C.appendChild(H),E.appendChild(C)));null!=F&&(C=document.createElement("tr"),H=document.createElement("td"),H.colSpan=2,H.appendChild(F),C.appendChild(H),E.appendChild(C));C=document.createElement("tr");H=document.createElement("td");H.colSpan=
-2;H.style.paddingTop=null!=m?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&H.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(m);
-C.appendChild(H);E.appendChild(C);y.appendChild(E);this.container=y};FilenameDialog.filenameHelpLink=null;
+Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==E)F.appendChild(C),null!=l&&(H.appendChild(FilenameDialog.createTypeHint(b,G,l)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
+":"),C.appendChild(H),H=document.createElement("td"),H.style.whiteSpace="nowrap",C.appendChild(H),e=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",H.appendChild(e),G.style.width=null!=q?q-40+"px":"190px",C.appendChild(H),F.appendChild(C)));null!=E&&(C=document.createElement("tr"),H=document.createElement("td"),H.colSpan=2,H.appendChild(E),C.appendChild(H),F.appendChild(C));C=document.createElement("tr");H=document.createElement("td");H.colSpan=
+2;H.style.paddingTop=null!=l?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});l.className="geBtn";b.editor.cancelFirst&&H.appendChild(l);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(l);
+C.appendChild(H);F.appendChild(C);y.appendChild(F);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
-k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var F=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
+k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
D();return n};
-FilenameDialog.createFileTypes=function(b,e,k){var n=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");n.appendChild(D)}mxEvent.addListener(n,"change",function(t){t=k[n.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=t&&(t="drawio."+t);e.value=0<F?e.value.substring(0,F+1)+t:e.value+"."+t;"createEvent"in
-document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dispatchEvent(t)):e.fireEvent("onchange")});b=function(t){t=e.value.toLowerCase();for(var F=0,d=0;d<k.length;d++){var f=k[d].extension,g=null;"drawio"!=f&&(g=f,f=".drawio."+f);if(t.substring(t.length-f.length-1)=="."+f||null!=g&&t.substring(t.length-g.length-1)=="."+g){F=d;break}}n.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return n};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=F.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(F.container),f.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){F.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(g)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,d=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",m="";if(F.isGridEnabled()||F.gridVisible){m=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",m=F.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
-")";var q=f=0;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);m=-Math.round(m-mxUtils.mod(this.translate.x*this.scale-f,m))+"px "+-Math.round(m-mxUtils.mod(this.translate.y*this.scale-q,m))+"px"}f=F.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=m,F.view.backgroundPageShape.node.style.backgroundImage=g,F.view.backgroundPageShape.node.style.backgroundColor=d,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(F.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(F){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
-" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+F,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(F,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,E=this.view.getBackgroundPageBounds();
-d=E.width;f=E.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),H=(F=F&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=F?Math.ceil(d/C.width)-1:0,aa=E.x+d,da=E.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(E.x),
-Math.round(E.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(E.y+(qa+1)*C.height))]:[new mxPoint(Math.round(E.x+(qa+1)*C.width),Math.round(E.y)),new mxPoint(Math.round(E.x+(qa+1)*C.width),Math.round(da))];null!=ba[qa]?(ba[qa].points=O,ba[qa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[qa]=O)}for(qa=Y;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Y,ba.length-Y)}});
-F(this.horizontalPageBreaks);F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var F=k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),d=0<F.width?F.x/this.scale-this.translate.x:0,f=0<F.height?F.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
-m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+F.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+F.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(E){mxEvent.consume(E)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,d,f){var g=this.graph.model.getParent(F);if(d){var m=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(F)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(F))}else if(m=t.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var d=this.graph.getModel(),f=d.getParent(F),g=this.graph.view.getState(f),m=this.graph.isCellSelected(F);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=f;f=d.getParent(f)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.useCssTransforms&&(this.lazyZoomDelay=
+FilenameDialog.createFileTypes=function(b,e,k){var n=document.createElement("select");for(b=0;b<k.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(k[b].description)+" (."+k[b].extension+")");n.appendChild(D)}mxEvent.addListener(n,"change",function(t){t=k[n.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=t&&(t="drawio."+t);e.value=0<E?e.value.substring(0,E+1)+t:e.value+"."+t;"createEvent"in
+document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dispatchEvent(t)):e.fireEvent("onchange")});b=function(t){t=e.value.toLowerCase();for(var E=0,d=0;d<k.length;d++){var f=k[d].extension,g=null;"drawio"!=f&&(g=f,f=".drawio."+f);if(t.substring(t.length-f.length-1)=="."+f||null!=g&&t.substring(t.length-g.length-1)=="."+g){E=d;break}}n.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return n};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=E.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(E.container),f.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){E.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(g)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",l="";if(E.isGridEnabled()||E.gridVisible){l=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",l=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
+")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);l=-Math.round(l-mxUtils.mod(this.translate.x*this.scale-f,l))+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-q,l))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=l,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=l,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],l=1;l<this.gridSteps;l++){var q=l*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,l=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
+d=F.width;f=F.height;var C=new mxRectangle(g*l.x,g*l.y,q.width*y,q.height*y),H=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,aa=F.x+d,da=F.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(da))];null!=ba[qa]?(ba[qa].points=O,ba[qa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[qa]=O)}for(qa=Y;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Y,ba.length-Y)}});
+E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var l=this.graph.getCellGeometry(d[g]);if(null!=l&&l.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
+l=this.graph.pageScale,q=g.width*l;g=g.height*l;l=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+l*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-l)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,l,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,d,f){var g=this.graph.model.getParent(E);if(d){var l=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);l=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=l&&l.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(l=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))l=g,this.graph.isTable(l)||(l=this.graph.model.getParent(l)),l=!this.graph.selectionCellsHandler.isHandled(l)||this.graph.isCellSelected(l)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return l};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),l=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);l=l||q;if(q||!l&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.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(I,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),Q=[],R=[],fa;for(fa in V)Q.push(V[fa]),R.push(fa);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",Q,"cells",[I]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
-n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
-["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(t,F[e])&&t.push(F[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
-"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<m.length;ra++){var sa=m[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
+n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
+["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<l.length;e++)for(k=0;k<l[e].length;k++)t.push(l[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<l.length;ra++){var sa=l[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
va&&("shape"!=va||Na)&&(!Na||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Qa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));Q.setStyle(J,Ca)}}finally{Q.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
function(I){null==I&&(I=window.event);return n.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(I){if(null!=I){var V=mxEvent.getSource(I);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
-!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var E=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();E.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
+!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||n.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(I)!=n.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(I){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(I.getEvent()))&&
(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(I){return aa.apply(this,arguments)||13==I.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I)||mxClient.IS_SF&&mxEvent.isShiftDown(I))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,qa=null,O=null,
@@ -2076,7 +2076,7 @@ Y=I;qa=Q;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=f
"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(I,V){try{ja.apply(this,arguments),X()}catch(Q){ea.handleError(Q)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(I){}var U=n.fireMouseEvent;n.fireMouseEvent=function(I,V,Q){I==mxEvent.MOUSE_DOWN&&
this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,V,Q){this.menus.createPopupMenu(I,V,Q)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(I,V){var Q=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
(Q.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(Q[Q.length-1]))},0));q(Q)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var Q=V.getProperty("cells"),R=I=!1;if(0<Q.length)for(var fa=0;fa<Q.length&&(I=n.getModel().isVertex(Q[fa])||I,!(R=n.getModel().isEdge(Q[fa])||R)||!I);fa++);else R=I=!0;Q=V.getProperty("keys");V=V.getProperty("values");for(fa=0;fa<Q.length;fa++){var la=0<=mxUtils.indexOf(f,Q[fa]);if("strokeColor"!=
-Q[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(F,Q[fa]))R||0<=mxUtils.indexOf(g,Q[fa])?null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,Q[fa])&&(null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,Q[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,Q[fa]))null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=
+Q[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(E,Q[fa]))R||0<=mxUtils.indexOf(g,Q[fa])?null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,Q[fa])&&(null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,Q[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[Q[fa]]:n.currentVertexStyle[Q[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,Q[fa]))null==V[fa]?delete n.currentEdgeStyle[Q[fa]]:n.currentEdgeStyle[Q[fa]]=
V[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&
(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",n.currentEdgeStyle.shape,n.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
@@ -2085,7 +2085,7 @@ null!=Q&&(I=Q.style[mxConstants.STYLE_FONTFAMILY]||I,V=Q.style[mxConstants.STYLE
mxUtils.bind(this,function(I){null!=this.currentMenu&&mxEvent.getSource(I)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var F=n(b,4);if(null!=e&&e(t-8,F,k))break;value=n(b,k);n(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var n=b.getRubberband();null!=n&&n.cancel()}));mxEvent.addListener(b.container,
@@ -2093,23 +2093,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),n=!0,D=0;D<e.length;D++){var t=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(t,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,n),n=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),F=D.getIndex(n),d=null,f=1,g=1,m=0,q=F<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,F+1),t):null;m<e.length-1;){var y=e[++m];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=F+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,F+g),t):null);var E=this.editor.graph.view.getState(y);
-if(y==k.getChildAt(n,t+f)&&null!=E&&1==mxUtils.getValue(E.style,"colspan",1)&&1==mxUtils.getValue(E.style,"rowspan",1))f++;else break}m==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,l=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;l<e.length-1;){var y=e[++l];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(y);
+if(y==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}l==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,n){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var t=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=t:b.x!=t&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),t=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==t,k.mergeStyle(e.style,b.style,n))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(f,g){"mouseDown"==g.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var n=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?F.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,E,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(m.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
-H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var E=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-E.x;E=b.container.scrollTop+m.y-E.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,E,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
-function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,E,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var l=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.x,l.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,l){var q=l.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(l.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
+H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.getGraphX(),l.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var l=
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");l=l.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+l.x-F.x;F=b.container.scrollTop+l.y-F.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
+function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,l,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,F,d){var f=null;if(null!=F&&0<F.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>F.length?35*F.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);k=mxUtils.bind(this,function(y){var E=document.createElement("a");E.className="geItem";E.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(E);null!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,E,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(E,"click",function(){var C=m.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-y.geometry.width/2);C.geometry.y=m.snap(Math.round(e/m.view.scale)-m.view.translate.y-y.geometry.height/2);m.model.beginUpdate();try{m.addCell(C)}finally{m.model.endUpdate()}m.setSelectionCell(C);
-m.scrollCellToVisible(C);m.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(F.length,4):F.length);D++)k(F[D]);F=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<F&&(f.style.top=Math.max(m.container.scrollTop+22,e-F)+"px");F=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<F&&(f.style.left=Math.max(m.container.scrollLeft+22,b-F)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,l=this.editor.graph;f=document.createElement("div");D=l.view.getState(k);var q=null==k||null!=D&&l.isTransparentState(D)?null:l.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=l.background&&l.background!=mxConstants.NONE&&(f.style.backgroundColor=l.background);l.container.appendChild(f);k=mxUtils.bind(this,function(y){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,F,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(F,"click",function(){var C=l.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=l.snap(Math.round(b/l.view.scale)-l.view.translate.x-y.geometry.width/2);C.geometry.y=l.snap(Math.round(e/l.view.scale)-l.view.translate.y-y.geometry.height/2);l.model.beginUpdate();try{l.addCell(C)}finally{l.model.endUpdate()}l.setSelectionCell(C);
+l.scrollCellToVisible(C);l.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(l.container.scrollTop+l.container.offsetHeight);0<E&&(f.style.top=Math.max(l.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(l.container.scrollLeft+l.container.offsetWidth);0<E&&(f.style.left=Math.max(l.container.scrollLeft+22,b-E)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,n,D,t){return this.editor.graph.createVertex(null,null,t||"",0,0,n||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2122,9 +2122,9 @@ EditorUi.prototype.getCssClassForMarker=function(b,e,k,n){return"flexArrow"==e?n
k==mxConstants.ARROW_DIAMOND_THIN?"1"==n?"geSprite geSprite-"+b+"thindiamond":"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==k?"geSprite geSprite-"+b+"openasync":"dash"==k?"geSprite geSprite-"+b+"dash":"cross"==k?"geSprite geSprite-"+b+"cross":"async"==k?"1"==n?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==k||"circlePlus"==k?"1"==n||"circle"==k?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==k?"geSprite geSprite-"+b+"erone":"ERmandOne"==
k?"geSprite geSprite-"+b+"eronetoone":"ERmany"==k?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==k?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==k?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==k?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var F=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||t.getSelectionCells();F=t.getExportableCells(t.model.getTopmostCells(F));for(var d={},f=t.createCellLookup(F),g=t.cloneCells(F,null,d),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
-0),y=0;y<g.length;y++){m.add(q,g[y]);var E=t.view.getState(F[y]);if(null!=E){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(F[y])&&null==f[mxObjectIdentity.get(m.getParent(F[y]))]&&(C.offset=null,C.relative=!1,C.x=E.x/E.view.scale-E.view.translate.x,C.y=E.y/E.view.scale-E.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(t){var F=
-null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,F){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),l=new mxGraphModel,q=l.getChildAt(l.getRoot(),
+0),y=0;y<g.length;y++){l.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!l.isEdge(E[y])&&null==f[mxObjectIdentity.get(l.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
+null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Q=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Q.x*R.width),this.scale*(this.translate.y+Q.y*R.height),this.scale*Q.width*R.width,
this.scale*Q.height*R.height)};b.getPreferredPageSize=function(Q,R,fa){Q=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,Q.width*R.width,Q.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(Q,R,fa,la){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;la=null!=la?la:0;var ra=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
@@ -2132,13 +2132,13 @@ W=mxRectangle.fromRectangle(ra);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/
P)b.view.scaleAndTranslate(Q,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*Q/N,b.container.scrollLeft=S*Q/N;else if(0!=fa||0!=la)ra=b.view.translate,b.view.setTranslate(Math.floor(ra.x+fa/N),Math.floor(ra.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Q){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Q){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var F=0;t=mxUtils.bind(this,function(Q,R,fa){F++;
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(Q,R,fa){E++;
var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Q);null!=fa&&la.setAttribute("title",fa);Q=document.createElement("img");Q.setAttribute("border","0");Q.setAttribute("src",R);Q.style.width="36px";Q.style.filter="invert(100%)";la.appendChild(Q);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(Q){window.location.href=D.backBtn.url;mxEvent.consume(Q)}),
Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(Q){this.actions.get("previousPage").funct();mxEvent.consume(Q)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
-mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,E=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=E&&(window.clearTimeout(E),E=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);y=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),600)}),Q||200)}),H=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",l)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
+mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),Q||200)}),H=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var R=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
"4px 2px 4px 2px";this.layersDialog.style.left=R.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));R=mxUtils.getCurrentStyle(this.editor.graph.container);
this.layersDialog.style.zIndex=R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Q)}),Editor.layersImage,mxResources.get("layers")),aa=b.getModel();aa.addListener(mxEvent.CHANGE,function(){G.style.display=1<aa.getChildCount(aa.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,
@@ -2183,7 +2183,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,n=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,n);k.addListener(mxEvent.UNDO,n);k.addListener(mxEvent.REDO,n);k.addListener(mxEvent.CLEAR,n);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);n()};var t=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,d){t.apply(this,arguments);n()};n()};
+this.editor.graph.cellEditor.stopEditing=function(E,d){t.apply(this,arguments);n()};n()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),n="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<n.length;D++)this.actions.get(n[D]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
@@ -2192,10 +2192,10 @@ this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.
this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);n=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(n);this.actions.get("collapse").setEnabled(n);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var n=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(n=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
-e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+n;t=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
-t+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+n;t=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
+t+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=this.diagramContainer.style.right,D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2205,18 +2205,18 @@ 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";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=F){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-F.x:F.y-y.y)-k));mxEvent.consume(q);d!=m()&&(f=!0,g=null)}}function t(q){D(q);F=d=null}var F=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){F=new mxPoint(mxEvent.getClientX(q),
-mxEvent.getClientY(q));d=m();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=m();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-E.x:E.y-y.y)-k));mxEvent.consume(q);d!=l()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var l=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
+mxEvent.getClientY(q));d=l();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=l();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
EditorUi.prototype.handleError=function(b,e,k,n,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var t=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,t,k,null,null,null,null,null,null,null,null,n?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,n,D,t,F,d,f,g,m,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,F,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,m||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,F,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,F,d,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,l,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,l||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(F){this.handleError(F)}};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,n=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(t){k.cellEditor.restoreSelection(n);e(t)},function(){k.cellEditor.restoreSelection(n)});this.showDialog(b.container,230,D,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var n=b.lastIndexOf("&lt;/mxGraphModel&gt;");n>k&&(e=b.substring(k,n+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(k=n)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),F="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=F.lastIndexOf("%3E");
-0<=d&&d<F.length-3&&(F=F.substring(0,d+3))}catch(m){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(F);this.isCompatibleString(g)&&(F=g)}catch(m){}}catch(m){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){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(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+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(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),E="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=E.lastIndexOf("%3E");
+0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(l){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(l){}}catch(l){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){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(n){n.text().then(function(D){b(D)})["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"),
@@ -2226,18 +2226,18 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(b,e,k){var n=this.editor.graph;if(n.isEnabled()){n.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&e&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(n),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(n.getModel().endUpdate(),null!=k&&k())}}};
-EditorUi.prototype.showImageDialog=function(b,e,k,n){n=this.editor.graph.cellEditor;var D=n.saveSelection(),t=mxUtils.prompt(b,e);n.restoreSelection(D);if(null!=t&&0<t.length){var F=new Image;F.onload=function(){k(t,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=t}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.showImageDialog=function(b,e,k,n){n=this.editor.graph.cellEditor;var D=n.saveSelection(),t=mxUtils.prompt(b,e);n.restoreSelection(D);if(null!=t&&0<t.length){var E=new Image;E.onload=function(){k(t,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=t}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(n){n=new ChangePageSetup(this,null,n);n.ignoreColor=!0;this.editor.graph.model.execute(n)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(q,y,E){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),H=0<C.length?C[0]:null;if(null!=H)if(E){n.getModel().beginUpdate();try{for(H=0;H<C.length;H++)if(n.getModel().isVertex(C[H])&&n.isCellResizable(C[H])){var G=n.getCellGeometry(C[H]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[H],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getView().scale;E=null;1==n.getSelectionCount()&&n.model.isVertex(H)&&null!=n.layoutManager&&!n.isCellLocked(H)&&(E=n.layoutManager.getLayout(G));if(null!=E&&E.constructor==mxStackLayout)y=G.getIndex(H),37==q||38==q?n.model.add(G,H,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,H,Math.min(n.model.getChildCount(G),y+1));else{var da=n.graphHandler;null!=da&&(null==da.first&&da.start(H,0,0,C),null!=da.first&&(H=C=0,37==q?C=-y:
-38==q?H=-y:39==q?C=y:40==q&&(H=y),da.currentDx+=C*aa,da.currentDy+=H*aa,da.checkPreview(),da.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=da.first){var ba=da.roundLength(da.currentDx/aa),Y=da.roundLength(da.currentDy/aa);da.moveCells(da.cells,ba,Y);da.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
-90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var F=null,d={37:mxConstants.DIRECTION_WEST,
-38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var E=n.connectVertex(n.getSelectionCell(),
-d[q.keyCode],n.defaultEdgeLength,q,!0);null!=E&&0<E.length&&(1==E.length&&n.model.isEdge(E[0])?n.setSelectionCell(n.model.getTerminal(E[0],!1)):n.setSelectionCell(E[E.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
-mxUtils.bind(this,function(q,y,E,C){var H=this.actions.get(E);null!=H&&(E=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,E):D.bindControlKey(q,E):C?D.bindShiftKey(q,E):D.bindKey(q,E))});var g=this,m=D.escape;D.escape=function(q){m.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
+EditorUi.prototype.createKeyHandler=function(b){function e(q,y,F){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),H=0<C.length?C[0]:null;if(null!=H)if(F){n.getModel().beginUpdate();try{for(H=0;H<C.length;H++)if(n.getModel().isVertex(C[H])&&n.isCellResizable(C[H])){var G=n.getCellGeometry(C[H]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[H],
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(H)&&null!=n.layoutManager&&!n.isCellLocked(H)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(H),37==q||38==q?n.model.add(G,H,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,H,Math.min(n.model.getChildCount(G),y+1));else{var da=n.graphHandler;null!=da&&(null==da.first&&da.start(H,0,0,C),null!=da.first&&(H=C=0,37==q?C=-y:
+38==q?H=-y:39==q?C=y:40==q&&(H=y),da.currentDx+=C*aa,da.currentDy+=H*aa,da.checkPreview(),da.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=da.first){var ba=da.roundLength(da.currentDx/aa),Y=da.roundLength(da.currentDy/aa);da.moveCells(da.cells,ba,Y);da.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
+38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
+d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
+mxUtils.bind(this,function(q,y,F,C){var H=this.actions.get(F);null!=H&&(F=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,l=D.escape;D.escape=function(q){l.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){n.isEnabled()&&n.foldCells(!0)}),D.bindControlKey(35,function(){n.isEnabled()&&n.foldCells(!1)}),D.bindControlKey(13,function(){g.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"formatPanel",!0),
@@ -2247,31 +2247,31 @@ null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var n=0;n<b.length;n++)k=k.replace(new RegExp("&"+b[n][0]+";","g"),"&#"+b[n][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof F?t(m,g):t.call(F,m,g):m,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,l;g<d;)l=D[g],f[g]=t?"undefined"===typeof E?t(l,g):t.call(E,l,g):l,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
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,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!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(I){I=this.getCurrentCellStyle(I);
-return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(F=new mxPoint(I.getGraphX(),I.getGraphY()),m=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
+return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),l=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(Q.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(R=this.selectionCellsHandler.getHandler(Q.cell),null==R||null==R.getHandleForEvent(I))){var fa=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),la=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;fa.grow(la);if(this.isTableCell(Q.cell)&&!this.isCellSelected(Q.cell)&&!(mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()-R))){var ra=this.model.getParent(Q.cell);R=this.model.getParent(ra);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=ra&&mxUtils.intersects(fa,
new mxRectangle(Q.x,Q.y-la,Q.width,u))||this.model.getChildAt(ra,0)!=Q.cell&&mxUtils.intersects(fa,new mxRectangle(Q.x-la,Q.y,u,Q.height))||mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+Q.height-la,Q.width,u))||mxUtils.intersects(fa,new mxRectangle(Q.x+Q.width-la,Q.y,u,Q.height)))ra=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,I.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(I),null!=la&&(R.start(I.getGraphX(),I.getGraphY(),la),R.blockDelayedSelection=
!ra,I.consume()))}}for(;!I.isConsumed()&&null!=Q&&(this.isTableCell(Q.cell)||this.isTableRow(Q.cell)||this.isTable(Q.cell));)this.isSwimlane(Q.cell)&&(R=this.getActualStartSize(Q.cell),(0<R.x||0<R.width)&&mxUtils.intersects(fa,new mxRectangle(Q.x+(R.x-R.width-1)*V+(0==R.x?Q.width:0),Q.y,1,Q.height))||(0<R.y||0<R.height)&&mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+(R.y-R.height-1)*V+(0==R.y?Q.height:0),Q.width,1)))&&(this.selectCellForEvent(Q.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(Q.cell),
-null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var Q in I)if(null!=I[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=F&&null!=f&&null!=d){if(Q=f,Math.abs(F.x-
-V.getGraphX())>R||Math.abs(F.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
-mxEvent.LABEL_HANDLE||0==I||null!=Q.visibleSourceState||I==fa.bends.length-1||null!=Q.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=Q.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(F.x,F.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
-R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(Q,F.x,F.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,fa),this.selectCellForEvent(Q.cell,V.getEvent())):this.isCellSelected(Q.cell)||fa.destroy());
-m=!1;F=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var Q in I)if(null!=I[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(Q=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
+mxEvent.LABEL_HANDLE||0==I||null!=Q.visibleSourceState||I==fa.bends.length-1||null!=Q.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=Q.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(E.x,E.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
+R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(Q,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,fa),this.selectCellForEvent(Q.cell,V.getEvent())):this.isCellSelected(Q.cell)||fa.destroy());
+l=!1;E=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
null!=Q.visibleTargetState)I=this.view.getEdgeStyle(Q),fa="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(Q)&&(V=mxUtils.findNearestSegment(Q,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(fa=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;I=new mxRectangle(V.getGraphX(),V.getGraphY());I.grow(R);if(this.isTableCell(Q.cell)&&(V=this.model.getParent(Q.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
new mxRectangle(Q.x,Q.y-2,Q.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(Q.x,Q.y+Q.height-2,Q.width,4)))fa="row-resize";else if(mxUtils.intersects(I,new mxRectangle(Q.x-2,Q.y,4,Q.height))&&this.model.getChildAt(V,0)!=Q.cell||mxUtils.intersects(I,new mxRectangle(Q.x+Q.width-2,Q.y,4,Q.height)))fa="col-resize";for(V=Q;null==fa&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
-la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&Q.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=F=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&Q.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
function(I){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(V=1!=I.style.html?mxUtils.htmlEntities(V,!1):I.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(I,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],Q=this.graph.pageFormat,R=this.graph.pageScale,fa=Q.width*R;Q=Q.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
ra=this.graph.getPageLayout(),u=0;u<ra.width;u++)V.push(new mxRectangle(((ra.x+u)*fa+R.x)*la,(ra.y*Q+R.y)*la,fa*la,Q*la));for(u=1;u<ra.height;u++)V.push(new mxRectangle((ra.x*fa+R.x)*la,((ra.y+u)*Q+R.y)*la,fa*la,Q*la));I=V.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,V){return null==I.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(I){this.previewColor="#000000"==this.graph.background?
"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var V=y.apply(this,arguments),Q=new mxDictionary,R=[],fa=0;fa<V.length;fa++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[fa])&&this.graph.isCellSelected(V[fa])?this.graph.model.getParent(V[fa]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[fa])&&this.graph.isCellSelected(V[fa])?V[fa]:
-this.graph.getCompositeParent(V[fa]);null==la||Q.get(la)||(Q.put(la,!0),R.push(la))}return R};var E=this.graphHandler.start;this.graphHandler.start=function(I,V,Q,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+this.graph.getCompositeParent(V[fa]);null==la||Q.get(la)||(Q.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,Q,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var I=this.currentState;aa.apply(this,arguments);I!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(I){return mxEvent.isShiftDown(I.getEvent())&&mxEvent.isAltDown(I.getEvent())?!1:
null!=this.currentState&&I.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(I){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(I){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
mxClient.IS_FF&&mxClient.IS_WIN&&null==I.getState()&&mxEvent.isTouchEvent(I.getEvent())};var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=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=qa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(I){return mxEvent.isMouseEvent(I.getEvent())};
@@ -2286,6 +2286,8 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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.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,n,D){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!=n&&null!=D?'viewBox="0 0 '+n+" "+D+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
+Graph.createSvgNode=function(b,e,k,n,D){var t=mxUtils.createXmlDocument(),E=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"svg"):t.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==t.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",k+"px");E.setAttribute("height",n+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+n);t.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,n){var D=document.createElement("canvas");D.width=e;D.height=k;var t=document.createElement("img");t.onload=mxUtils.bind(this,function(){D.getContext("2d").drawImage(t,0,0);n(D.toDataURL())});t.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
Graph.zapGremlins=function(b){for(var e=0,k=[],n=0;n<b.length;n++){var D=b.charCodeAt(n);(32<=D||9==D||10==D||13==D)&&65535!=D&&65534!=D||(k.push(b.substring(e,n)),e=n+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,n=0;n<k;n++)e+=String.fromCharCode(b[n]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
@@ -2295,33 +2297,33 @@ Graph.fadeNodes=function(b,e,k,n,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(
Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};Graph.domPurify=function(b,e){return DOMPurify.sanitize(b,{IN_PLACE:e,ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=n.substring(D);Graph.sanitizeNode(k);var t=k.getElementsByTagName("svg");if(0<t.length){if(e||null!=t[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{n=
-e=1;var F=t[0].getAttribute("width"),d=t[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(F)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/F,n=parseFloat(g[3])/d)}var m=t[0].getBBox();0<m.width&&0<m.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",m.x+" "+m.y+" "+m.width+" "+m.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-m.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",m.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+e=1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var l=t[0].getBBox();0<l.width&&0<l.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",l.x+" "+l.y+" "+l.width+" "+l.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+l.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",l.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,F=null,d=mxUtils.bind(this,function(m){t=!0;F=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=F&&Math.abs(F.x-mxEvent.getClientX(m))<D&&Math.abs(F.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(t)for(var q=mxEvent.getSource(m);null!=
-q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,m);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(m){mxEvent.consume(m)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(l){t=!0;E=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l))}),f=mxUtils.bind(this,function(l){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(l))<D&&Math.abs(E.y-mxEvent.getClientY(l))<D}),g=mxUtils.bind(this,function(l){if(t)for(var q=mxEvent.getSource(l);null!=
+q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,l);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(l){mxEvent.consume(l)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
n&&this.graph.isCustomLink(n)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(n)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,n){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
-null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=
-function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var d=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(F){return"1"==mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=
-mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,d){F=null!=F?F:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return F&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(F){for(var d={},f=0;f<F.length;f++){var g=this.view.getState(F[f]);this.mergeStyle(g.style,
-d,0==f)}return d};Graph.prototype.mergeStyle=function(F,d,f){if(null!=F){var g={},m;for(m in F){var q=F[m];null!=q&&(g[m]=!0,null==d[m]&&f?d[m]=q:d[m]!=q&&delete d[m])}for(m in d)g[m]||delete d[m]}};Graph.prototype.getStartEditingCell=function(F,d){d=this.getCellStyle(F);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==d)&&""==this.getLabel(F)&&0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),d=this.getCellStyle(F),d=parseInt(mxUtils.getValue(d,
-mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==d)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(d=0;d<this.model.getChildCount(F);d++){var f=this.model.getChildAt(F,d);if(this.isCellEditable(f)){F=f;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(F,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(F,d)};Graph.prototype.updateCellStyles=
-function(F,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),m;for(m in F){var q=F[m];g[m]!=q&&this.setCellStyles(m,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
-mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,d,f,g,m,q){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,d,f,g,m,q){g=null!=g?g:!0;m=null!=m?m:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
-y;y--){var E=this.model.getChildAt(f,y),C=this.getScaledCellAt(F,d,E,g,m,q);if(null!=C)return C;if(this.isCellVisible(E)&&(m&&this.model.isEdge(E)||g&&this.model.isVertex(E))&&(C=this.view.getState(E),null!=C&&(null==q||!q(C,F,d))&&this.intersects(C,F,d)))return E}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,
-"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var d=this.getCellGeometry(F);null!=d&&d.relative;)F=this.getModel().getParent(F),d=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var d=new mxDictionary,f=[],g=0;g<F.length;g++){var m=this.getCompositeParent(F[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
-this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}return f};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var d=this.model.getParent(F);if(!this.model.isVertex(d))break;F=d}return F};Graph.prototype.filterSelectionCells=function(F){var d=this.getSelectionCells();if(null!=F){for(var f=[],g=0;g<d.length;g++)F(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var d=
-this.currentScale,f=this.currentTranslate;F=new mxRectangle((F.x+2*f.x)*d-f.x,(F.y+2*f.y)*d-f.y,F.width*d,F.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;F=new mxRectangle((F.x+d.x)*f,(F.y+d.y)*f,F.width*f,F.height*
-f)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
-this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var d=[],f=0;f<F.length;f++)this.isTableRow(F[f])||this.isTableCell(F[f])||d.push(F[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=n.apply(this,arguments);for(var d=[],f=0;f<F.length;f++)this.isTable(F[f])||
-this.isTableRow(F[f])||this.isTableCell(F[f])||d.push(F[f]);return d};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var d=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;F.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=F.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,d=this.scale,f=this.translate;F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);F&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(F,d,f){var g=this.useCssTransforms,m=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=m,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
+null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=
+function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var d=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(E){return"1"==mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=
+mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,d){E=null!=E?E:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return E&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(E){for(var d={},f=0;f<E.length;f++){var g=this.view.getState(E[f]);this.mergeStyle(g.style,
+d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},l;for(l in E){var q=E[l];null!=q&&(g[l]=!0,null==d[l]&&f?d[l]=q:d[l]!=q&&delete d[l])}for(l in d)g[l]||delete d[l]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
+mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(d=0;d<this.model.getChildCount(E);d++){var f=this.model.getChildAt(E,d);if(this.isCellEditable(f)){E=f;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(E,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(E,d)};Graph.prototype.updateCellStyles=
+function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),l;for(l in E){var q=E[l];g[l]!=q&&this.setCellStyles(l,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
+mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,l,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,l,q){g=null!=g?g:!0;l=null!=l?l:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
+y;y--){var F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,l,q);if(null!=C)return C;if(this.isCellVisible(F)&&(l&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
+"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var l=this.getCompositeParent(E[g]);this.isTableCell(l)&&(l=this.graph.model.getParent(l));
+this.isTableRow(l)&&(l=this.graph.model.getParent(l));null==l||d.get(l)||(d.put(l,!0),f.push(l))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
+this.currentScale,f=this.currentTranslate;E=new mxRectangle((E.x+2*f.x)*d-f.x,(E.y+2*f.y)*d-f.y,E.width*d,E.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;E=new mxRectangle((E.x+d.x)*f,(E.y+d.y)*f,E.width*f,E.height*
+f)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=n.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTable(E[f])||
+this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var d=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;E.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=E.getAttribute("transform")&&
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,d=this.scale,f=this.translate;E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,l=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=l,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var n=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else n=window.open(b,null!=e?e:"_blank"),null==n||k||(n.opener=null)}catch(t){}return n};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2334,10 +2336,10 @@ b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxU
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=n)for(var t=0;t<n.length;t++)D[n[t].nodeName]=n[t].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=this.view.getState(b[k]);if(null!=n){for(var D=this.cellRenderer.getShapesForState(n),t=0;t<D.length;t++)null!=D[t]&&null!=D[t].node&&e.push(D[t].node);null!=n.control&&null!=n.control.node&&e.push(n.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],n=0;n<b.length;n++){var D=this.view.getState(b[n]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(F,d){if(null!=b.shape){var f=[k[0]];d=F/d;e||(d=1-d);for(var g=D*d,m=1;m<t;m++)if(g<=n[m-1]){f.push(new mxPoint(k[m-1].x+(k[m].x-k[m-1].x)*g/n[m-1],k[m-1].y+(k[m].y-k[m-1].y)*g/n[m-1]));break}else g-=n[m-1],f.push(k[m]);b.shape.points=f;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,l=1;l<t;l++)if(g<=n[l-1]){f.push(new mxPoint(k[l-1].x+(k[l].x-k[l-1].x)*g/n[l-1],k[l-1].y+(k[l].y-k[l-1].y)*g/n[l-1]));break}else g-=n[l-1],f.push(k[l]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=d)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(n,D){null!=b.shape&&(D=n/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==n&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,F=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(F,n);F()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,E=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(E,n);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),n=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,n,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
n)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2347,28 +2349,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,F=function(aa,da){aa=String(aa);for(da=da||2;aa.length<da;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),E=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:F(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:F(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:F(y%12||12),H:y,HH:F(y),M:E,MM:F(E),s:C,ss:F(C),l:F(d,3),L:F(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(aa,da){aa=String(aa);for(da=da||2;aa.length<da;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),l=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:l+1,mm:E(l+1),mmm:n.i18n.monthNames[l],mmmm:n.i18n.monthNames[l+
+12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
aa.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(F){function d(){n.isVisible(F)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(F)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
-"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(F)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
-mxEvent.addListener(g,"click",function(){n.setVisible(F,!n.isVisible(F));d();null!=b&&b(F)});d()})(n.getChildAt(n.root,t));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var F=null;if(match.index>D&&"%"==e.charAt(match.index-1))F=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)F=b.id;else if(0>d.indexOf("{"))for(var f=b;null==F&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=f.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==F&&(F=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==F&&(F=this.getGlobalVariable(d));null==F&&null!=k&&(F=k[d])}n.push(e.substring(D,match.index)+(null!=F?F:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(l.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(l.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
+"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","absmiddle");l.setAttribute("border","0");l.style.position="relative";l.style.width="16px";l.style.padding="0px 6px 0 4px";e&&(l.style.filter="invert(100%)",l.style.top="-2px");g.appendChild(l);mxUtils.write(g,f);k.appendChild(g);
+mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)E=b.id;else if(0>d.indexOf("{"))for(var f=b;null==E&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==E&&(E=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==E&&(E=this.getGlobalVariable(d));null==E&&null!=k&&(E=k[d])}n.push(e.substring(D,match.index)+(null!=E?E:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var n=this.model.getParent(b),D=this.model.getParent(n),t=this.model.getParent(e);if(D==this.model.getParent(t)){b=n.getIndex(b);n=D.getIndex(n);var F=t.getIndex(e),d=D.getIndex(t);t=Math.max(n,d);e=Math.min(b,F);b=Math.max(b,F);F=[];for(n=Math.min(n,d);n<=t;n++){d=this.model.getChildAt(D,n);for(var f=e;f<=b;f++)F.push(this.model.getChildAt(d,f))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
-!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var n=this.model.getParent(b),D=this.model.getParent(n),t=this.model.getParent(e);if(D==this.model.getParent(t)){b=n.getIndex(b);n=D.getIndex(n);var E=t.getIndex(e),d=D.getIndex(t);t=Math.max(n,d);e=Math.min(b,E);b=Math.max(b,E);E=[];for(n=Math.min(n,d);n<=t;n++){d=this.model.getChildAt(D,n);for(var f=e;f<=b;f++)E.push(this.model.getChildAt(d,f))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var n=b[k],D=this.getCellGeometry(n);if(null!=D){D=D.clone();if(this.getModel().isVertex(n))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(n)&&null!=D.points)for(var t=0;t<D.points.length;t++)D.points[t].x=Math.round(D.points[t].x/e)*e,D.points[t].y=Math.round(D.points[t].y/e)*e;this.getModel().setGeometry(n,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,n,D,t,F,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
-this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var E=null,C=null;if(null!=t){t=t.reverse();for(var H=0;H<t.length;H++)if(!this.isCellLocked(t[H])&&!this.model.isEdge(t[H])&&t[H]!=b)if(!this.model.isAncestor(b,t[H])&&this.isContainer(t[H])&&(null==E||t[H]==this.model.getParent(b)))E=t[H];else if(null==C&&this.isCellConnectable(t[H])&&!this.model.isAncestor(t[H],b)&&!this.isSwimlane(t[H])){var G=this.view.getState(t[H]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[H])}}var aa=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var da=[],ba=C;C=E;D=mxUtils.bind(this,function(Y){if(null==F||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
-!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=O.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-O.width/2:m.x+O.width/2),O.x=m.x-O.width/2,O.y=m.y-O.height/2);null!=E?(this.addCells([ba],E,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),l=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(l.x+=g.geometry.width/2,l.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(l.x+=g.geometry.width/2,l.y+=g.geometry.height+k):(l.x=e==mxConstants.DIRECTION_WEST?l.x-k:l.x+(g.geometry.width+k),l.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(l.x+=b.parent.geometry.x,l.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+l.x*k,y+l.y*k)).grow(40*k);t=null!=t?
+this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var H=0;H<t.length;H++)if(!this.isCellLocked(t[H])&&!this.model.isEdge(t[H])&&t[H]!=b)if(!this.model.isAncestor(b,t[H])&&this.isContainer(t[H])&&(null==F||t[H]==this.model.getParent(b)))F=t[H];else if(null==C&&this.isCellConnectable(t[H])&&!this.model.isAncestor(t[H],b)&&!this.isSwimlane(t[H])){var G=this.view.getState(t[H]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[H])}}var aa=
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?l.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=b.geometry.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-b.geometry.width/2:l.x+b.geometry.width/2);var da=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
+!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?l.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=O.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-O.width/2:l.x+O.width/2),O.x=l.x-O.width/2,O.y=l.y-O.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&aa||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var ea=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(ea=Y.parent.getIndex(Y),this.model.add(Y.parent,X,ea))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ea=b.parent.getIndex(b),this.model.add(b.parent,
-ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==F||null!=ba||!aa||null==C&&f)return D(ba);F(g+m.x*k,y+m.y*k,D)};
+ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(l,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==E||null!=ba||!aa||null==C&&f)return D(ba);E(g+l.x*k,y+l.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2377,10 +2379,10 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,
k);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k){null!=b&&"default"==b[e]&&null!=k&&(b[e]=k)};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var n=this.layoutManager.getLayout(this.model.getParent(b));null!=n&&n.constructor==mxStackLayout&&(n.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var F=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=F&&null!=d){var f=Math.round(d.width-F.width/this.view.scale),g=Math.round(d.height-F.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
-null==q?null!=D&&this.isMoveCellsEvent(D,F)&&this.moveSiblings(F,m,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),F=this.getCellGeometry(D[e]);null!=t&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],F))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,F.width/this.view.scale-t.width):t.height+=n+Math.min(0,F.height/this.view.scale-t.height),this.model.setGeometry(b,
+Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var l=this.model.getParent(k[t]),q=this.layoutManager.getLayout(l);
+null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,l,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(l,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=t&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,E.width/this.view.scale-t.width):t.height+=n+Math.min(0,E.height/this.view.scale-t.height),this.model.setGeometry(b,
t));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,e,k){var n=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(n)&&(n=null);return n};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
@@ -2388,7 +2390,7 @@ Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.esc
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,n=this.container.clientHeight-e,D=Math.floor(20*Math.min(k/b.width,n/b.height))/20;this.zoomTo(D);if(mxUtils.hasScrollbars(this.container)){var t=this.view.translate;this.container.scrollTop=(b.y+t.y)*D-Math.max((n-b.height*D)/2+e/2,0);this.container.scrollLeft=(b.x+t.x)*D-Math.max((k-b.width*D)/2+e/2,0)}};
Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var n=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var D=0;D<b.length;D++)0>
-mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,F){return t.name<F.name?-1:t.name>F.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e};
+mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,E){return t.name<E.name?-1:t.name>E.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2415,67 +2417,67 @@ HoverIcons.prototype.click=function(b,e,k){var n=k.getEvent(),D=k.getGraphX(),t=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var m=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(m,k)&&(d==this.arrowUp?g-=m.y+m.height-k.y:d==this.arrowRight?f+=k.x+k.width-m.x:d==this.arrowDown?g+=k.y+k.height-m.y:d==this.arrowLeft&&(f-=m.x+m.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var l=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(l,k)&&(d==this.arrowUp?g-=l.y+l.height-k.y:d==this.arrowRight?f+=k.x+k.width-l.x:d==this.arrowDown?g+=k.y+k.height-l.y:d==this.arrowLeft&&(f-=l.x+l.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
-this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});F(e,this.arrowRight);F(n,this.arrowLeft);F(D,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
+this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});E(e,this.arrowRight);E(n,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var n=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,n=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(n=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&n<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||n>this.activationDelay)&&this.currentState!=b&&(n>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,
e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,n,D){b=this.cloneCell(b);for(var t=0;t<k;t++){var F=this.cloneCell(e),d=this.getCellGeometry(F);null!=d&&(d.x+=t*n,d.y+=t*D);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,n,D,t,F,d,f){k=null!=k?k:60;n=null!=n?n:40;t=null!=t?t:30;d=null!=d?d:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=D?D:"",0,0,e*k,b*n+(null!=D?t:0),null!=F?F:"shape=table;startSize="+(null!=D?t:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,n,d),this.createVertex(null,null,"",0,0,k,n,f),e,k,0),b,0,n)};
-Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCells(b,!0),D=0;D<n.length;D++)if(null!=k&&(n[D].value=k[D]),null!=e)for(var t=this.model.getChildCells(n[D],!0),F=0;F<t.length;F++)null!=e[D][F]&&(t[F].value=e[D][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,F,d,f){k=null!=k?k:120;n=null!=n?n:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;F=this.createVertex(null,
-null,"",0,t,e*k+t,n,F);D.insert(this.createParent(F,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(F.geometry.y=n+t,this.createParent(D,this.createParent(F,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),F=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],m=0;m<F.length;m++){var q=this.getCellGeometry(F[m]),y={cell:F[m],rospan:1,colspan:1,row:D,col:m,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[m]&&1<k[m].rowspan?(y.rowspan=k[m].rowspan-1,y.colspan=k[m].colspan,y.actual=k[m].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(F[m],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,F.length,
-n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(y);f=y}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,F,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<F-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,n,D){b=this.cloneCell(b);for(var t=0;t<k;t++){var E=this.cloneCell(e),d=this.getCellGeometry(E);null!=d&&(d.x+=t*n,d.y+=t*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:60;n=null!=n?n:40;t=null!=t?t:30;d=null!=d?d:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,e*k,b*n+(null!=D?t:0),null!=E?E:"shape=table;startSize="+(null!=D?t:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,n,d),this.createVertex(null,null,"",0,0,k,n,f),e,k,0),b,0,n)};
+Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCells(b,!0),D=0;D<n.length;D++)if(null!=k&&(n[D].value=k[D]),null!=e)for(var t=this.model.getChildCells(n[D],!0),E=0;E<t.length;E++)null!=e[D][E]&&(t[E].value=e[D][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:120;n=null!=n?n:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;E=this.createVertex(null,
+null,"",0,t,e*k+t,n,E);D.insert(this.createParent(E,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(E.geometry.y=n+t,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
+Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],l=0;l<E.length;l++){var q=this.getCellGeometry(E[l]),y={cell:E[l],rospan:1,colspan:1,row:D,col:l,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[l]&&1<k[l].rowspan?(y.rowspan=k[l].rowspan-1,y.colspan=k[l].colspan,y.actual=k[l].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(E[l],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,E.length,
+n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(y);f=y}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,E,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<E-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),F=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(F,b);if(d<F.length-1){var f=F[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var m=this.getCellGeometry(t);null!=m&&(k||(k=b==F[F.length-1]),k&&(m=m.clone(),m.height+=e,n.setGeometry(t,m)))}}finally{n.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),F=n.getChildCells(D,!0);b=mxUtils.indexOf(F,b);var d=b==F.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];F=n.getChildCells(D,!0);var m=F[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(m,q));b<F.length-1&&(m=F[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
-q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(m,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var l=this.getCellGeometry(t);null!=l&&(k||(k=b==E[E.length-1]),k&&(l=l.clone(),l.height+=e,n.setGeometry(t,l)))}}finally{n.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var l=E[b],q=this.getCellGeometry(l);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(l,q));b<E.length-1&&(l=E[b+1],q=this.getCellGeometry(l),null!=q&&(q=q.clone(),
+q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(l,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,n=0;n<b.length;n++)if(!this.isVertexIgnored(b[n])){var D=this.graph.getCellGeometry(b[n]);null!=D&&(k+=e?D.width:D.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var F=this.graph.getCellGeometry(k[t]);null!=F&&(n+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,D.push(Math.round(n)))}return D};
-TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=F,F+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
+TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var E=this.graph.getCellGeometry(k[t]);null!=E&&(n+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(n)))}return D};
+TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=E,E+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var F=this.graph.getModel(),d=0;F.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=F.getChildCells(b,!0),q=0;q<m.length;q++)F.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
-m.length&&0<y){if(D){var E=this.graph.getCellGeometry(m[m.length-1]);null!=E&&(E=E.clone(),E.height=f-y+E.height,F.setGeometry(m[m.length-1],E))}var C=t?null:this.getRowLayout(m[0],g),H=[],G=e.y;for(q=0;q<m.length;q++)E=this.graph.getCellGeometry(m[q]),null!=E&&(E=E.clone(),E.x=e.x,E.width=g,E.y=Math.round(G),G=D||n?G+E.height:G+E.height/y*f,E.height=Math.round(G)-E.y,F.setGeometry(m[q],E)),d=Math.max(d,this.layoutRow(m[q],C,E.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,F.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){F.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=da.width}aa.actual.col==aa.col&&(da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=da.height)}}))}else for(q=
-0;q<m.length;q++)F.setVisible(m[q],!1)}finally{F.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
-arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};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 m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,E=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;E.push(V);V=null!=m.routedPoints?m.routedPoints[E.length-1]:null;return null==V||V.type!=
-ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;E=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,l=E.getChildCells(b,!0),q=0;q<l.length;q++)E.setVisible(l[q],!0);var y=this.getSize(l,!1);if(0<f&&0<g&&0<
+l.length&&0<y){if(D){var F=this.graph.getCellGeometry(l[l.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(l[l.length-1],F))}var C=t?null:this.getRowLayout(l[0],g),H=[],G=e.y;for(q=0;q<l.length;q++)F=this.graph.getCellGeometry(l[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(l[q],F)),d=Math.max(d,this.layoutRow(l[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){E.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=da.width}aa.actual.col==aa.col&&(da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=da.height)}}))}else for(q=
+0;q<l.length;q++)E.setVisible(l[q],!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(l,q){q=null!=q?q:!0;var y=this.getState(l);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
+arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};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 l=this.node.getElementsByTagName("path");if(1<l.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&l[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&l[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(l,q){return n.apply(this,arguments)||null!=l.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,l.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(l){D.apply(this,arguments);this.graph.model.isEdge(l.cell)&&1!=l.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(l)};mxGraphView.prototype.updateLineJumps=function(l){var q=l.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=l.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(l.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=l.routedPoints?l.routedPoints[F.length-1]:null;return null==V||V.type!=
+ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(l,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
ea.x,ea.y)<1*this.scale*this.scale;)ea=Y,O++,Y=X[O+2];Y=mxUtils.intersection(da.x,da.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Y&&(Math.abs(Y.x-da.x)>H||Math.abs(Y.y-da.y)>H)&&(Math.abs(Y.x-aa.x)>H||Math.abs(Y.y-aa.y)>H)&&(Math.abs(Y.x-ka.x)>H||Math.abs(Y.y-ka.y)>H)&&(Math.abs(Y.x-ea.x)>H||Math.abs(Y.y-ea.y)>H)){ea=Y.x-da.x;ka=Y.y-da.y;Y={distSq:ea*ea+ka*ka,x:Y.x,y:Y.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Y.distSq){ba.splice(ea,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
-Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=E;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
-X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(m,ba,y,E,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x,O.y)):"line"==H?(m.moveTo(ea.x+
-Y.y*ba,ea.y-Y.x*ba),m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),m.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,m.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(m.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(m,ba,y,E,!1,null,G);m.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,E){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
-new mxPoint(q.getCenterX(),q.getCenterY()):F.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,E){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,E);var C=this.getNextPoint(m,y,E),H=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
-G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(m.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,E,C),E)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,E,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);E=y=null;if(null!=m)for(var H=0;H<m.length;H++){var G=this.graph.getConnectionPoint(q,m[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==E||aa<E)y=G,E=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var E=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(E=y.state.view.graph.replacePlaceholders(y.state.cell,
-E));return E};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),E=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(E.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}l.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(l,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;l.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
+X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(l,ba,y,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x,O.y)):"line"==H?(l.moveTo(ea.x+
+Y.y*ba,ea.y-Y.x*ba),l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),l.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,l.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(l.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(l,ba,y,F,!1,null,G);l.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(l,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(l,q,y,F){if(null==q||null==l||"1"!=q.style.snapToPoint&&"1"!=l.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(l,q,F);var C=this.getNextPoint(l,y,F),H=this.graph.isOrthogonal(l),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(l.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(l.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));l.setAbsoluteTerminalPoint(this.snapToAnchorPoint(l,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(l,q,y,F,C){if(null!=
+q&&null!=l){l=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=l)for(var H=0;H<l.length;H++){var G=this.graph.getConnectionPoint(q,l[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(l,q,y){var F=f.apply(this,arguments);"1"==l.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,
+F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(l){if(null!=l.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
-null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,D,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
+null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
-mxStencilRegistry.loadStencilSet=function(b,e,k,n){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var t=!1;if(null==D)try{if(n){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,t=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,t))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;t=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=D&&null!=
+mxStencilRegistry.loadStencilSet=function(b,e,k,n){var D=mxStencilRegistry.packages[b];if(null!=k&&k||null==D){var t=!1;if(null==D)try{if(n){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,t=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,t))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;t=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,e,t)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var n=b.firstChild;null!=n;)"shapes"==n.nodeName&&mxStencilRegistry.parseStencilSet(n,e,k),n=n.nextSibling;else{k=null!=k?k:!0;n=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=n;){if(n.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=n.getAttribute("name"),null!=b)){D=D.toLowerCase();var t=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+t.toLowerCase(),new mxStencil(n));if(null!=e){var F=n.getAttribute("w"),
-d=n.getAttribute("h");F=null==F?80:parseInt(F,10);d=null==d?80:parseInt(d,10);e(D,t,b,F,d)}}n=n.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var n=b.firstChild;null!=n;)"shapes"==n.nodeName&&mxStencilRegistry.parseStencilSet(n,e,k),n=n.nextSibling;else{k=null!=k?k:!0;n=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=n;){if(n.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=n.getAttribute("name"),null!=b)){D=D.toLowerCase();var t=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+t.toLowerCase(),new mxStencil(n));if(null!=e){var E=n.getAttribute("w"),
+d=n.getAttribute("h");E=null==E?80:parseInt(E,10);d=null==d?80:parseInt(d,10);e(D,t,b,E,d)}}n=n.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=L.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=L.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<L.length;M++)null!=this.currentEdgeStyle[L[M]]&&(z+=L[M]+"="+this.currentEdgeStyle[L[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var M=0;M<z.length;M++){var T=z[M];L[mxObjectIdentity.get(T)]=T.getId();for(var ca=this.model.getChildCount(T),
@@ -2488,10 +2490,10 @@ null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,T,ca,ia,m
mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var Oa=this.getCurrentCellStyle(Ma);null!=Oa&&"1"==Oa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var T=this.getSelectionCell(),ca=null,ia=[],ma=mxUtils.bind(this,function(pa){if(null!=this.view.getState(pa)&&(this.model.isVertex(pa)||this.model.isEdge(pa)))if(ia.push(pa),pa==T)ca=ia.length-1;else if(z&&null==T&&0<ia.length||null!=ca&&z&&ia.length>ca||!z&&0<ca)return;for(var ua=0;ua<this.model.getChildCount(pa);ua++)ma(this.model.getChildAt(pa,ua))});ma(this.model.root);0<ia.length&&
(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ia.length):0,this.setSelectionCell(ia[ca]))}};Graph.prototype.swapShapes=function(z,L,M,T,ca,ia,ma){L=!1;if(!T&&null!=ca&&1==z.length&&(T=this.view.getState(ca),M=this.view.getState(z[0]),null!=T&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==T.style.shape&&"umlLifeline"==M.style.shape)&&(T=this.getCellGeometry(ca),ia=this.getCellGeometry(z[0]),null!=T&&null!=ia))){L=T.clone();T=ia.clone();T.x=L.x;T.y=L.y;L.x=ia.x;L.y=ia.y;this.model.beginUpdate();
-try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
this.model.getParent(z[ua]),Fa=this.getCellGeometry(z[ua]);this.isTable(ya)&&pa.push(ya);if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(ca)&&(T||ya!=ca)){if(!T){var Ma=this.getCellGeometry(ya);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Fa.height,this.model.setGeometry(ya,Ma))}Ma=this.getCellGeometry(ca);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,this.model.setGeometry(ca,Ma));var Oa=this.model.getChildCells(ca,!0);if(0<Oa.length){z[ua]=T?this.cloneCell(z[ua]):z[ua];var Pa=this.model.getChildCells(z[ua],
-!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Ea=this.cloneCell(Pa[Pa.length-1]);null!=Ea&&(Ea.value="",this.model.add(z[ua],Ea))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Da=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Da&&null!=La&&(La=La.clone(),La.width=Da.width,this.model.setGeometry(Pa[wa],La))}}}}var Za=m.apply(this,
-arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Za)}finally{this.model.endUpdate()}return Za};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Da=this.cloneCell(Pa[Pa.length-1]);null!=Da&&(Da.value="",this.model.add(z[ua],Da))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Ea=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Ea&&null!=La&&(La=La.clone(),La.width=Ea.width,this.model.setGeometry(Pa[wa],La))}}}}var Ta=l.apply(this,
+arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Ta)}finally{this.model.endUpdate()}return Ta};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):this.labelChanged(z[T],"")}else{if(this.isTableRow(z[T])&&(ia=this.model.getParent(z[T]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var ma=this.model.getChildCells(ia,!0),pa=0,ua=0;ua<ma.length;ua++)0<=mxUtils.indexOf(z,ma[ua])&&pa++;pa==ma.length&&M.push(ia)}M.push(z[T])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
M:new Graph;for(var T=0;T<L.length;T++)null!=L[T]&&M.updateCustomLinksForCell(z,L[T],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),T=0;T<M;T++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,T))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);
for(L=0;L<M.length;L++){var T=M[L];z.push(new mxConnectionConstraint(new mxPoint(T[0],T[1]),2<T.length?"0"!=T[2]:!0,null,3<T.length?T[3]:0,4<T.length?T[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){T=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(T==mxConstants.DIRECTION_NORTH||T==mxConstants.DIRECTION_SOUTH)T=M,M=L,L=T;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
@@ -2501,7 +2503,7 @@ arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca
(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),T=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ia=z[ca];if(M.isEdge(ia)){var ma=M.getTerminal(ia,!0),pa=M.getTerminal(ia,!1);M.setTerminal(ia,pa,!0);M.setTerminal(ia,
ma,!1);var ua=M.getGeometry(ia);if(null!=ua){ua=ua.clone();null!=ua.points&&ua.points.reverse();var ya=ua.getTerminalPoint(!0),Fa=ua.getTerminalPoint(!1);ua.setTerminalPoint(ya,!1);ua.setTerminalPoint(Fa,!0);M.setGeometry(ia,ua);var Ma=this.view.getState(ia),Oa=this.view.getState(ma),Pa=this.view.getState(pa);if(null!=Ma){var Sa=null!=Oa?this.getConnectionConstraint(Ma,Oa,!0):null,za=null!=Pa?this.getConnectionConstraint(Ma,Pa,!1):null;this.setConnectionConstraint(ia,ma,!0,za);this.setConnectionConstraint(ia,
pa,!1,Sa);var wa=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,wa,[ia])}T.push(ia)}}else if(M.isVertex(ia)&&(ua=this.getCellGeometry(ia),null!=ua)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ua=ua.clone();ua.x+=ua.width/2-ua.height/
-2;ua.y+=ua.height/2-ua.width/2;var Ea=ua.width;ua.width=ua.height;ua.height=Ea;M.setGeometry(ia,ua)}var Da=this.view.getState(ia);if(null!=Da){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Za=mxUtils.getValue(Da.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Za)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};
+2;ua.y+=ua.height/2-ua.width/2;var Da=ua.width;ua.width=ua.height;ua.height=Da;M.setGeometry(ia,ua)}var Ea=this.view.getState(ia);if(null!=Ea){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ta=mxUtils.getValue(Ea.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Ta)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};
Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));
this.isTableRow(L)&&(L=this.model.getParent(L));var M=this.view.getState(L);null!=M&&null!=M.shape&&(this.view.invalidate(L),M.shape.bounds=null)}y.apply(this,arguments);z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var M=this.view.getState(z[L]);null!=M&&null!=M.shape&&
null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");
@@ -2510,8 +2512,8 @@ this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this
Graph.diagramLanguage,L):ia.setAttribute("label",L);L=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var T=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),T.push(ca))}for(M=0;M<T.length;M++)if(ca=this.view.getState(T[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
this.isTransparentState(ca)){for(var ia=!0,ma=0;ma<this.model.getChildCount(ca.cell)&&ia;ma++)L.get(this.model.getChildAt(ca.cell,ma))||(ia=!1);ia&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,L)};Graph.prototype.getAttributeForCell=function(z,L,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,L,
-M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(L,M):T.removeAttribute(L);this.model.setValue(z,T)};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,T){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
-E.apply(this,arguments);var ma=!0;for(ca=0;ca<z.length&&ma;ca++)ma=ma&&this.isTableRow(z[ca]);ma&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
+M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(L,M):T.removeAttribute(L);this.model.setValue(z,T)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,T){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
+F.apply(this,arguments);var ma=!0;for(ca=0;ca<z.length&&ma;ca++)ma=ma&&this.isTableRow(z[ca]);ma&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
z,L))};Graph.prototype.insertTextForEvent=function(z,L){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var T=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=T||this.firstClickSource!=ca||null!=T&&null!=T.text&&null!=T.text.node&&null!=T.text.boundingBox&&(mxUtils.contains(T.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(T.text.node,mxEvent.getSource(z)))||(null!=T||this.isCellLocked(this.getDefaultParent()))&&
(null==T||this.isCellLocked(T.cell))||!(null!=T||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==T&&(T=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,T))}return L};Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var T=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,T.x*ca.width);M=
Math.max(M,T.y*ca.height)}return new mxPoint(this.snap(L+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),M=this.getInsertPoint(),T=this.snap(Math.round(Math.max(M.x,L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(T,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
@@ -2534,86 +2536,85 @@ if(null!=ma){var pa=z?ma.getCenterX():ma.getCenterY();T=null!=T?Math.max(T,pa):p
Fa.clone(),z?Fa.x=Math.round(T-Fa.width/2)-ya.origin.x:Fa.y=Math.round(T-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(M[ia].cell,Fa))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Pa){var Sa=null;if(null!=Pa)for(Sa=new mxDictionary,Fa=0;Fa<Pa.length;Fa++)Sa.put(Pa[Fa],!0);if(Pa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma=
null!=ma?ma:!0;ya=null!=ya?ya:!1;var za="page"==Oa?this.view.getBackgroundPageBounds():ia&&null==Sa||T||"diagram"==Oa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),wa=this.view.scale;"diagram"==Oa&&null!=this.backgroundImage&&(za=mxRectangle.fromRectangle(za),za.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*wa,(this.view.translate.y+this.backgroundImage.y)*wa,this.backgroundImage.width*wa,this.backgroundImage.height*wa)));if(null==za)throw Error(mxResources.get("drawingEmpty"));
-var Ea=mxUtils.createXmlDocument(),Da=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"svg"):Ea.createElement("svg");null!=z&&(null!=Da.style?Da.style.backgroundColor=z:Da.setAttribute("style","background-color:"+z));null==Ea.createElementNS?(Da.setAttribute("xmlns",mxConstants.NS_SVG),Da.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):Da.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);z=L/wa;var La=Math.max(1,Math.ceil(za.width*z)+2*M)+(ya&&0==
-M?5:0),Za=Math.max(1,Math.ceil(za.height*z)+2*M)+(ya&&0==M?5:0);Da.setAttribute("version","1.1");Da.setAttribute("width",La+"px");Da.setAttribute("height",Za+"px");Da.setAttribute("viewBox",(ca?"-0.5 -0.5":"0 0")+" "+La+" "+Za);Ea.appendChild(Da);var Va=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"g"):Ea.createElement("g");Da.appendChild(Va);var eb=this.createSvgCanvas(Va);eb.foOffset=ca?-.5:0;eb.textOffset=ca?-.5:0;eb.imageOffset=ca?-.5:0;eb.translate(Math.floor(M/L-za.x/wa),Math.floor(M/
-L-za.y/wa));var jb=document.createElement("div"),hb=eb.getAlternateText;eb.getAlternateText=function(qb,yb,ub,vb,wb,lb,kb,fb,mb,xb,rb,zb,Bb){if(null!=lb&&0<this.state.fontSize)try{mxUtils.isNode(lb)?lb=lb.innerText:(jb.innerHTML=lb,lb=mxUtils.extractTextWithWhitespace(jb.childNodes));for(var Ab=Math.ceil(2*vb/this.state.fontSize),nb=[],c=0,l=0;(0==Ab||c<Ab)&&l<lb.length;){var x=lb.charCodeAt(l);if(10==x||13==x){if(0<c)break}else nb.push(lb.charAt(l)),255>x&&c++;l++}nb.length<lb.length&&1<lb.length-
-nb.length&&(lb=mxUtils.trim(nb.join(""))+"...");return lb}catch(p){return hb.apply(this,arguments)}else return hb.apply(this,arguments)};var ob=this.backgroundImage;if(null!=ob){L=wa/L;var pb=this.view.translate,cb=new mxRectangle((ob.x+pb.x)*L,(ob.y+pb.y)*L,ob.width*L,ob.height*L);mxUtils.intersects(za,cb)&&eb.image(ob.x+pb.x,ob.y+pb.y,ob.width,ob.height,ob.src,!0)}eb.scale(z);eb.textEnabled=ma;pa=null!=pa?pa:this.createSvgImageExport();var gb=pa.drawCellState,tb=pa.getLinkForCellState;pa.getLinkForCellState=
-function(qb,yb){var ub=tb.apply(this,arguments);return null==ub||qb.view.graph.isCustomLink(ub)?null:ub};pa.getLinkTargetForCellState=function(qb,yb){return qb.view.graph.getLinkTargetForCell(qb.cell)};pa.drawCellState=function(qb,yb){for(var ub=qb.view.graph,vb=null!=Sa?Sa.get(qb.cell):ub.isCellSelected(qb.cell),wb=ub.model.getParent(qb.cell);!(ia&&null==Sa||vb)&&null!=wb;)vb=null!=Sa?Sa.get(wb):ub.isCellSelected(wb),wb=ub.model.getParent(wb);(ia&&null==Sa||vb)&&gb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root),
-eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");
-null==ca.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);
-M.appendChild(T);ca.appendChild(z);M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);
-z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;
-null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=
-function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var ca=0;ca<T.points.length;ca++)L?T.points[ca].x=M+
-(M-T.points[ca].x):T.points[ca].y=M+(M-T.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=M+(M-ia.x):ia.y=M+(M-ia.y))};ca(T.getTerminalPoint(!0));ca(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),ca=0;ca<T;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var ma=this.getCellGeometry(ia);null!=ma&&(ma=ma.clone(),L?ma.x=M+(M-ma.x-ma.width):
-ma.y=M+(M-ma.y-ma.height),this.model.setGeometry(ia,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var ca=this.view.getState(z[T]);null!=ca&&this.flipEdgePoints(z[T],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],
-L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var ca=this.model.getParent(z[T]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[T]),ma=this.getCellGeometry(ca);null!=ia&&null!=ma&&(ma=ma.clone(),ma.height-=ia.height,this.model.setGeometry(ca,
-ma))}}var pa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=pa)for(M=[],T=0;T<pa.length;T++)this.model.contains(pa[T])&&(this.model.isVertex(pa[T])||this.model.isEdge(pa[T]))&&M.push(pa[T])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);T=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?
-T=M.getParent(z):z=M.getChildCells(T,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);var ma=M.getChildCells(T,!0),pa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var ua=M.getChildCells(ma[z],!0)[ca],ya=M.cloneCell(ua,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);pa=Fa.width;var Ma=
-this.getCellGeometry(ma[z]);null!=Ma&&(Fa.height=Ma.height)}M.add(ma[z],ya,ca+(L?0:1))}var Oa=this.getCellGeometry(T);null!=Oa&&(Oa=Oa.clone(),Oa.width+=pa,M.setGeometry(T,Oa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var T=L.getChildCells(M,!0);0==T.length?L.remove(M):(M==z&&(z=T[T.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=
-function(z,L){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){T=z;var ca=M.getChildCells(T,!0);z=ca[L?0:ca.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),T=M.getParent(ca);else if(this.isTableRow(z))T=M.getParent(z);
-else{var ia=M.getChildCells(T,!0);ca=ia[L?0:ia.length-1]}var ma=M.getChildCells(ca,!0),pa=T.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var ua=this.getCellGeometry(ca);if(null!=ua){for(ia=0;ia<ma.length;ia++){z=M.cloneCell(ma[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=
-ua.height);ca.insert(z)}M.add(T,ca,pa+(L?0:1));var Fa=this.getCellGeometry(T);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ua.height,M.setGeometry(T,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=L.getParent(z));this.isTableRow(T)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[0]);var ia=L.getChildCells(T,!0);if(1>=ia.length)L.remove(M);else{var ma=
-ia.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ia,z));for(T=z=0;T<ca.length;T++){var pa=L.getChildCells(ca[T],!0)[ma];L.remove(pa);var ua=this.getCellGeometry(pa);null!=ua&&(z=Math.max(z,ua.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(z=T=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(T));var ca=
-L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[ca.length-1]);L.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var ma=this.getCellGeometry(M);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(M,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],T=M.rows[0].cells,ca=z=0;ca<T.length;ca++){var ia=T[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));
-return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var ca=document.createElement("th");M.rows[T].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(L),mxUtils.br(T);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>
-L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&
-(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,M(L,40));this.isCustomLink(z)&&
-mxEvent.addListener(T,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var ma=
-this.getCellAt(ia.graphX,ia.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ia.graphX,ia.graphY)||(ia.state=this.view.getState(ma),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,T=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,ma,pa){ia==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),
-M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,ma){var pa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!pa&&(M&&null==ma.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));pa=!L||pa?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,
-function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,ua,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,ma,pa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};
-mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);
-M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=
-function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],M=0,T=z.rangeCount;M<T;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(T){}};
-var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
-mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);
-if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var ma=ia.firstChild;null!=ca&&null!=ma;)L(ca,ma),ca=ca.nextSibling,ma=ma.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=
-ca)T(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var ma=ca.nextSibling;null==ia?T(ca):(M(ca,ia),ia=ia.nextSibling);ca=ma}}function T(ca){for(var ia=ca.firstChild;null!=ia;){var ma=ia.nextSibling;T(ia);ia=ma}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),
-ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=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]>")?
-M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){pa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<pa.length&&"\n"==pa.charAt(pa.length-1)&&(pa=pa.substring(0,pa.length-1));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"<br/>"):pa,!0);this.textarea.className=
-"mxCellEditor geContentEditable";ua=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,
-ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.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=
-ma.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=pa&&(this.textarea.innerHTML=pa,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.innerHTML="");var pa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(pa=mxUtils.replaceTrailingNewlines(pa,"<div><br></div>"));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):pa,!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!=pa&&(this.textarea.innerHTML=pa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
-M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
-mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
-"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);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("+M+","+M+")")}else this.textarea.style.height=
-"",this.textarea.style.overflow="",da.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
-mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();ba.apply(this,arguments);
-this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,
-null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+
-this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);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 qa=mxStackLayout.prototype.resizeCell;
-mxStackLayout.prototype.resizeCell=function(z,L){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),ca=null!=T?this.graph.getCellGeometry(T):null;if(null!=ca&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var ma=this.graph.getActualStartSize(T);ca=ca.clone();M?ca.height=L.height+ma.y+ma.height+
-2*ia:ca.width=L.width+ma.x+ma.width+2*ia;this.graph.model.setGeometry(T,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(pa){M.get(pa)||(M.put(pa,!0),ca.push(pa))}for(var L=O.apply(this,arguments),M=new mxDictionary,T=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var ma=L[ia];this.graph.isTableCell(ma)?z(T.getParent(T.getParent(ma))):this.graph.isTableRow(ma)&&z(T.getParent(ma));z(ma)}return ca};
-var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
-(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Sa,za,wa){for(var Ea=[],Da=0;Da<Sa.length;Da++){var La=
-Sa[Da];Ea.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Ea},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Pa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,
-function(Sa){var za=Fa[Sa],wa=Sa<Fa.length-1?Fa[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var Ea=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Pa[Sa]?new V(Pa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"row-resize",null,wa);za.tableHandle=!0;var Da=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Da?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Sa],0,Da),this.shape.updateBoundsFromLine();else{var Za=T.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Da*ia;this.shape.bounds.x=ma.x+(Sa==Fa.length-1?0:Za.x*ia);this.shape.bounds.width=ma.width-(Sa==Fa.length-1?0:Za.width+Za.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Za,Va,eb){Da=Math.max(Graph.minTableRowHeight-
-Za.height,Va.y-Za.y-Za.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Za){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Va=T.getCellAt(Za.getGraphX(),Za.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Va,Za)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Sa){var za=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),
-Ea=null!=wa.alternateBounds?wa.alternateBounds:wa;null==za&&(za=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),za.x=ma.x+wa.x*ia,za.y=ma.y+wa.y*ia,za.width=Ea.width*ia,za.height=Ea.height*ia,za.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Da=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Oa[Sa]?new V(Oa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;
-za=new mxHandle(za,"col-resize",null,wa);za.tableHandle=!0;var La=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Sa],La,0),this.shape.updateBoundsFromLine();else{var Va=T.getActualStartSize(ma.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ea.width+La)*ia;this.shape.bounds.y=ma.y+(Sa==Ma.length-
-1?0:Va.y*ia);this.shape.bounds.height=ma.height-(Sa==Ma.length-1?0:(Va.height+Va.y)*ia)}this.shape.redraw()}};var Za=!1;za.setPosition=function(Va,eb,jb){La=Math.max(Graph.minTableColumnWidth-Ea.width,eb.x-Va.x-Ea.width);Za=mxEvent.isShiftDown(jb.getEvent());null==Da||Za||(La=Math.min(La,Da.width-Graph.minTableColumnWidth))};za.execute=function(Va){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Za);else if(!M.blockDelayedSelection){var eb=T.getCellAt(Va.getGraphX(),Va.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(eb,
-Va)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var z=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<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=
-M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=
-!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var ca=
-this.customHandles[T].shape.bounds,ia=ca.getCenterX(),ma=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-ma)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-ma)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
-function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.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 ra=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ra.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
-this.graph.view.translate,T=this.graph.view.scale,ca=this.roundLength(L.x/T-M.x);M=this.roundLength(L.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=e(ca,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
-"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),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"/>');
+T=L/wa;Oa=ca?-.5:0;var Da=Graph.createSvgNode(Oa,Oa,Math.max(1,Math.ceil(za.width*T)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(za.height*T)+2*M)+(ya&&0==M?5:0),z),Ea=Da.ownerDocument,La=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"g"):Ea.createElement("g");Da.appendChild(La);var Ta=this.createSvgCanvas(La);Ta.foOffset=ca?-.5:0;Ta.textOffset=ca?-.5:0;Ta.imageOffset=ca?-.5:0;Ta.translate(Math.floor(M/L-za.x/wa),Math.floor(M/L-za.y/wa));var Wa=document.createElement("div"),fb=Ta.getAlternateText;
+Ta.getAlternateText=function(cb,hb,lb,rb,vb,ob,Ab,Bb,ub,kb,eb,mb,wb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(Wa.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(Wa.childNodes));for(var pb=Math.ceil(2*rb/this.state.fontSize),xb=[],zb=0,yb=0;(0==pb||zb<pb)&&yb<ob.length;){var nb=ob.charCodeAt(yb);if(10==nb||13==nb){if(0<zb)break}else xb.push(ob.charAt(yb)),255>nb&&zb++;yb++}xb.length<ob.length&&1<ob.length-xb.length&&(ob=mxUtils.trim(xb.join(""))+"...");return ob}catch(c){return fb.apply(this,
+arguments)}else return fb.apply(this,arguments)};var gb=this.backgroundImage;if(null!=gb){z=wa/L;var ib=this.view.translate;Oa=new mxRectangle((gb.x+ib.x)*z,(gb.y+ib.y)*z,gb.width*z,gb.height*z);mxUtils.intersects(za,Oa)&&Ta.image(gb.x+ib.x,gb.y+ib.y,gb.width,gb.height,gb.src,!0)}Ta.scale(T);Ta.textEnabled=ma;pa=null!=pa?pa:this.createSvgImageExport();var tb=pa.drawCellState,qb=pa.getLinkForCellState;pa.getLinkForCellState=function(cb,hb){var lb=qb.apply(this,arguments);return null==lb||cb.view.graph.isCustomLink(lb)?
+null:lb};pa.getLinkTargetForCellState=function(cb,hb){return cb.view.graph.getLinkTargetForCell(cb.cell)};pa.drawCellState=function(cb,hb){for(var lb=cb.view.graph,rb=null!=Sa?Sa.get(cb.cell):lb.isCellSelected(cb.cell),vb=lb.model.getParent(cb.cell);!(ia&&null==Sa||rb)&&null!=vb;)rb=null!=Sa?Sa.get(vb):lb.isCellSelected(vb),vb=lb.model.getParent(vb);(ia&&null==Sa||rb)&&tb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root),Ta);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(Ta,
+Da);return Da}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
+null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(T);ca.appendChild(z);
+M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
+z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&
+this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&
+L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var ca=0;ca<T.points.length;ca++)L?T.points[ca].x=M+(M-T.points[ca].x):T.points[ca].y=M+(M-T.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=
+M+(M-ia.x):ia.y=M+(M-ia.y))};ca(T.getTerminalPoint(!0));ca(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),ca=0;ca<T;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var ma=this.getCellGeometry(ia);null!=ma&&(ma=ma.clone(),L?ma.x=M+(M-ma.x-ma.width):ma.y=M+(M-ma.y-ma.height),this.model.setGeometry(ia,ma))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var ca=this.view.getState(z[T]);null!=ca&&this.flipEdgePoints(z[T],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(L?
+mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var ca=this.model.getParent(z[T]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[T]),ma=this.getCellGeometry(ca);null!=ia&&null!=ma&&(ma=ma.clone(),ma.height-=ia.height,this.model.setGeometry(ca,ma))}}var pa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=pa)for(M=[],T=0;T<pa.length;T++)this.model.contains(pa[T])&&(this.model.isVertex(pa[T])||this.model.isEdge(pa[T]))&&M.push(pa[T])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);T=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?T=M.getParent(z):z=M.getChildCells(T,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var ma=M.getChildCells(T,!0),pa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var ua=M.getChildCells(ma[z],!0)[ca],ya=M.cloneCell(ua,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);pa=Fa.width;var Ma=this.getCellGeometry(ma[z]);null!=Ma&&(Fa.height=Ma.height)}M.add(ma[z],ya,ca+(L?
+0:1))}var Oa=this.getCellGeometry(T);null!=Oa&&(Oa=Oa.clone(),Oa.width+=pa,M.setGeometry(T,Oa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var T=L.getChildCells(M,!0);0==T.length?L.remove(M):(M==z&&(z=T[T.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==
+this.getCurrentCellStyle(z).childLayout){T=z;var ca=M.getChildCells(T,!0);z=ca[L?0:ca.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var T=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),T=M.getParent(ca);else if(this.isTableRow(z))T=M.getParent(z);else{var ia=M.getChildCells(T,!0);ca=ia[L?0:ia.length-1]}var ma=M.getChildCells(ca,
+!0),pa=T.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var ua=this.getCellGeometry(ca);if(null!=ua){for(ia=0;ia<ma.length;ia++){z=M.cloneCell(ma[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=ua.height);ca.insert(z)}M.add(T,ca,pa+(L?0:1));var Fa=this.getCellGeometry(T);
+null!=Fa&&(Fa=Fa.clone(),Fa.height+=ua.height,M.setGeometry(T,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=L.getParent(z));this.isTableRow(T)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(T)||(T=ca[0]);var ia=L.getChildCells(T,!0);if(1>=ia.length)L.remove(M);else{var ma=ia.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ia,z));for(T=z=0;T<
+ca.length;T++){var pa=L.getChildCells(ca[T],!0)[ma];L.remove(pa);var ua=this.getCellGeometry(pa);null!=ua&&(z=Math.max(z,ua.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(z=T=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(T));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(T)||
+(T=ca[ca.length-1]);L.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var ma=this.getCellGeometry(M);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(M,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],T=M.rows[0].cells,ca=z=0;ca<T.length;ca++){var ia=T[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
+Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var ca=document.createElement("th");M.rows[T].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(L),mxUtils.br(T);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=
+window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=
+z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(T,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
+return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var ma=this.getCellAt(ia.graphX,ia.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ia.graphX,ia.graphY)||
+(ia.state=this.view.getState(ma),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,T=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,ma,pa){ia==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(ia,ma){var pa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!pa&&(M&&null==ma.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));pa=!L||pa?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+
+ya.x+1,ma.getY()+ya.y+1,ua,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,ma,pa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
+document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=
+function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&
+z.rangeCount){for(var L=[],M=0,T=z.rangeCount;M<T;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(T){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var ma=ia.firstChild;null!=ca&&null!=ma;)L(ca,ma),ca=ca.nextSibling,ma=ma.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=ca)T(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var ma=ca.nextSibling;null==ia?T(ca):(M(ca,ia),
+ia=ia.nextSibling);ca=ma}}function T(ca){for(var ia=ca.firstChild;null!=ia;){var ma=ia.nextSibling;T(ia);ia=ma}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
+ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=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]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){pa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<pa.length&&"\n"==pa.charAt(pa.length-1)&&(pa=pa.substring(0,pa.length-1));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"<br/>"):pa,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.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=ma.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
+L;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=pa&&(this.textarea.innerHTML=pa,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.innerHTML="");var pa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(pa=mxUtils.replaceTrailingNewlines(pa,
+"<div><br></div>"));pa=this.graph.sanitizeHtml(L?pa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):pa,!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!=pa&&(this.textarea.innerHTML=pa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),
+this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);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("+M+","+M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",da.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,
+"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);
+return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();ba.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();
+try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=
+mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,
+mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?
+e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);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 qa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),ca=null!=T?this.graph.getCellGeometry(T):
+null;if(null!=ca&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var ma=this.graph.getActualStartSize(T);ca=ca.clone();M?ca.height=L.height+ma.y+ma.height+2*ia:ca.width=L.width+ma.x+ma.width+2*ia;this.graph.model.setGeometry(T,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(pa){M.get(pa)||(M.put(pa,!0),ca.push(pa))}for(var L=O.apply(this,arguments),M=new mxDictionary,T=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var ma=L[ia];this.graph.isTableCell(ma)?z(T.getParent(T.getParent(ma))):this.graph.isTableRow(ma)&&z(T.getParent(ma));z(ma)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
+mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=
+function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
+function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
+function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Sa,za,wa){for(var Da=[],Ea=0;Ea<Sa.length;Ea++){var La=Sa[Ea];Da.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Da},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+
+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Pa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,function(Sa){var za=Fa[Sa],wa=Sa<Fa.length-1?Fa[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var Da=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=
+Pa[Sa]?new V(Pa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"row-resize",null,wa);za.tableHandle=!0;var Ea=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ea?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Sa],0,Ea),this.shape.updateBoundsFromLine();else{var Ta=T.getActualStartSize(ma.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ea*ia;this.shape.bounds.x=ma.x+(Sa==Fa.length-1?0:Ta.x*ia);this.shape.bounds.width=ma.width-(Sa==Fa.length-1?0:Ta.width+Ta.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Ta,Wa,fb){Ea=Math.max(Graph.minTableRowHeight-Ta.height,Wa.y-Ta.y-Ta.height);La=mxEvent.isShiftDown(fb.getEvent());null!=Da&&La&&(Ea=Math.min(Ea,Da.height-Graph.minTableRowHeight))};za.execute=function(Ta){if(0!=Ea)T.setTableRowHeight(this.state.cell,
+Ea,!La);else if(!M.blockDelayedSelection){var Wa=T.getCellAt(Ta.getGraphX(),Ta.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Wa,Ta)}Ea=0};za.reset=function(){Ea=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Sa){var za=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),Da=null!=wa.alternateBounds?wa.alternateBounds:wa;null==za&&(za=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),za.x=ma.x+wa.x*ia,za.y=ma.y+wa.y*ia,za.width=Da.width*ia,za.height=Da.height*
+ia,za.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Ea=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Oa[Sa]?new V(Oa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=pa.isDashed;wa.svgStrokeTolerance++;za=new mxHandle(za,"col-resize",null,wa);za.tableHandle=!0;var La=0;za.shape.node.parentNode.insertBefore(za.shape.node,za.shape.node.parentNode.firstChild);za.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==La?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Sa],La,0),this.shape.updateBoundsFromLine();else{var Wa=T.getActualStartSize(ma.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Da.width+La)*ia;this.shape.bounds.y=ma.y+(Sa==Ma.length-1?0:Wa.y*ia);this.shape.bounds.height=ma.height-(Sa==Ma.length-1?0:(Wa.height+Wa.y)*ia)}this.shape.redraw()}};var Ta=!1;za.setPosition=function(Wa,fb,gb){La=Math.max(Graph.minTableColumnWidth-Da.width,fb.x-Wa.x-Da.width);
+Ta=mxEvent.isShiftDown(gb.getEvent());null==Ea||Ta||(La=Math.min(La,Ea.width-Graph.minTableColumnWidth))};za.execute=function(Wa){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Ta);else if(!M.blockDelayedSelection){var fb=T.getCellAt(Wa.getGraphX(),Wa.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(fb,Wa)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=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<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||
+this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));
+this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
+0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var ca=this.customHandles[T].shape.bounds,ia=ca.getCenterX(),ma=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-
+ma)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-ma)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.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 ra=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ra.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,T=this.graph.view.scale,ca=this.roundLength(L.x/T-M.x);M=this.roundLength(L.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=
+e(ca,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),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="'+
HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
24,24);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;
@@ -2647,257 +2648,257 @@ mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height
null);mxEvent.consume(ca)})))}if(null!=L)for(M=0;M<L.length;M++){var T=document.createElement("div");T.style.marginTop=null!=z||0<M?"6px":"0px";T.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(T)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=
-mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ta=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();
+mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ua=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();
var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-M+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?
-"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ta.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||
+"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ua.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||
"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=L&&(M=Math.max(M,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){Ka.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);
this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var bb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Ua=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Ua.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function E(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Va=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Va.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxShape.call(this)}function q(){mxShape.call(this)}
+function y(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(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,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function I(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}function ra(){mxEllipse.call(this)}
function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function S(){mxShape.call(this)}function P(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function Na(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Ta(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Ua(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
-function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Da(){mxConnector.call(this)}function La(c,l,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
-c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
-p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
-A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Ua(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Va(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
+function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Da(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Ea(){mxConnector.call(this)}function La(c,m,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var x=this.line[m];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,m,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,x,p){if(null!=m){var v=null;c.begin();for(var A=0;A<m.length;A++){var B=m[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
+p=0;p<this.line.length&&!m;p++){var v=this.line[p];null!=v&&null!=x&&(m=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,m,x,p,v)};e.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+A,B,m+p/2,x+v/2);s=this.scale;m=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,m,x,p,v)}};e.prototype.paintTableForeground=function(c,m,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],m,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Za=Math.tan(mxUtils.toRadians(30)),Va=(.5-Za)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Za);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Va);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Va)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Za));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Va)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Va)*l),c.lineTo(.5*l,(1-Va)*l)):(c.translate((p-
-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Va),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Va)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
-c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);
-q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
-mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
-c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
-x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
-"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
-c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
-0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
+n);var Ta=Math.tan(mxUtils.toRadians(30)),Wa=(.5-Ta)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/Ta);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*Wa);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-Wa)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-Wa)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-Wa)*m),c.lineTo(.5*m,(1-Wa)*m)):(c.translate((p-
+m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*Wa),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-Wa)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),
+c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,p,-m/3,p,m),c.lineTo(p,v-m),c.curveTo(p,v+m/3,0,v+m/3,0,v-m),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
+A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(l,mxShape);l.prototype.isoAngle=15;l.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(m,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",l);mxUtils.extend(q,mxShape);
+q.prototype.size=15;q.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
+mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
+c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));m=Math.max(m,K);m=Math.min(p-K,m);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,x)):(c.moveTo(p-m,x),c.lineTo(p-m,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
+x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
+"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,
+c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);A||(m=
+0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(p-m,0);c.arcTo(m,m,0,0,1,p,m);c.lineTo(p,v-m);c.arcTo(m,m,0,0,1,p-m,v);c.lineTo(A+m,v);c.arcTo(m,m,0,0,1,A,v-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=
-function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
-x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
-function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
-p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=
-mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
-.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
-function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var jb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){jb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
-var hb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){hb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ob=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ob.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)pb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+function(){return!0};G.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,m,
+x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,m/2);c.quadTo(p/4,1.4*m,p/2,m/2);c.quadTo(3*p/4,m*(1-1.4),p,m/2);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(c.x,c.y+m,x,p-2*m);m*=x;return new mxRectangle(c.x+m,c.y,x-2*m,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
+function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
+p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,m,x,p,v){m="0"!=
+mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
+.5;qa.prototype.redrawPath=function(c,m,x,p,v){c.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
+function(c,m,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);m=p/5;c.rect(0,0,m,v);c.fillAndStroke();c.rect(2*m,0,m,v);c.fillAndStroke();c.rect(4*m,0,m,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,m,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,m,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(m-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(m-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=m};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+var ib=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){ib.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var tb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&tb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)qb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
-A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
-ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
-v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
-ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,ib+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-ib):Ga+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
-J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
-40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};N.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ha-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ha);c.lineTo(l,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,x,p){p=N.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
-K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
-v,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
-K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
-v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(l,v-l),K=Math.min(ha+2*l,v-l);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
-32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
+A,v*A)),c.moveTo(m+A,x),c.lineTo(m+p-A,x),c.quadTo(m+p,x,m+p,x+A),c.lineTo(m+p,x+v-A),c.quadTo(m+p,x+v,m+p-A,x+v),c.lineTo(m+A,x+v),c.quadTo(m,x+v,m,x+v-A),c.lineTo(m,x+A),c.quadTo(m,x,m+A,x)):(c.moveTo(m,x),c.lineTo(m+p,x),c.lineTo(m+p,x+v),c.lineTo(m,x+v),c.lineTo(m,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.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,x=c.height;c=new mxRectangle(c.x,c.y,m,x);var p=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(m*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
+ea.prototype.paintForeground=function(c,m,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.moveTo(m+p-B,x);c.lineTo(m+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,m,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,m,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,m,x,p,v){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,m,x,p,
+v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(0,v),new mxPoint(m,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
+U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(p-m,0),new mxPoint(p,.5*v),new mxPoint(p-m,v),new mxPoint(m,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(m+p/2,x+A);c.lineTo(m+p/2,x+v-A);c.moveTo(m+A,x+v/2);c.lineTo(m+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,m,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.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};Q.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,jb+=db);db=m;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-jb):Ga+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,m,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/8,x+v);c.lineTo(m+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
+J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,m,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
+40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};N.prototype.paintBackground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,m,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,m,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+p/2,x+A),c.lineTo(m+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,m,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,x,p,v),c.setGradient(this.fill,this.gradient,m,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,x);c.lineTo(m+B,x);c.lineTo(m+B,x+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ha);c.lineTo(m,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+p,x);c.lineTo(m+p,x+v);c.lineTo(m,x+v);c.lineTo(m,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,m,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,x,p){p=N.prototype.size;null!=m&&(p=mxUtils.getValue(m.style,"size",p)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;x.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,x,p){p=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(p+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ja.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,x,p){var v="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
+v,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,
+ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=
+c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(m,v-m),K=Math.min(ha+2*m,v-m);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
+32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-m/2,K=.7*v-m/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,
+K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,x),new mxPoint(m+p,x+B),new mxPoint(m+A,x+v),new mxPoint(m,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(m+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
Na.prototype.defaultWidth=4;Na.prototype.isOpenEnded=function(){return!0};Na.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Na.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Na);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ta,mxRectangleShape);Ta.prototype.dx=20;Ta.prototype.dy=20;Ta.prototype.isHtmlAllowed=function(){return!1};Ta.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ta);
-mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend($a,
-mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
-l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),
-new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
-0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha-B/2);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha+B/2);c.moveTo(l+A,ha);c.lineTo(l+p-A,ha);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ha);c.lineTo(l+p-B-A,ha-B/2);c.moveTo(l+
-p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||na?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea,
-mxActor);Ea.prototype.cst={RECT2:"mxgraph.basic.rect"};Ea.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,m),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.prototype.paintForeground=function(c,m,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,x+A);c.lineTo(m+p,x+A);c.end();c.stroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ua);
+mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(m,x),
+new mxPoint(m,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+m)/2,x),new mxPoint((p+m)/2,v),new mxPoint((p-m)/2,v),new mxPoint((p-m)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Va);mxUtils.extend($a,
+mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-
+m,v),new mxPoint(p-m,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(m,0),new mxPoint(m,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(p-m,A),new mxPoint(m,A),new mxPoint(m,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(p,0);c.quadTo(p-2*m,v/2,p,v);c.lineTo(m,v);c.quadTo(m-2*m,v/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
+m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p-m,0),
+new mxPoint(p,.8*m),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
+0),new mxPoint(p,v-m),new mxPoint(p/2,v),new mxPoint(0,v-m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/2,x+v);c.lineTo(m+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(m+p/2,x);c.lineTo(m+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*p,x+.145*v);c.lineTo(m+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(m+.855*p,x+.145*v);c.lineTo(m+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,m,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,m,x,p,v){c.begin();c.moveTo(m,x);c.lineTo(m+p,x);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,x+v);c.lineTo(m+p,x+v);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha-B/2);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha+B/2);c.moveTo(m+A,ha);c.lineTo(m+p-A,ha);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ha);c.lineTo(m+p-B-A,ha-B/2);c.moveTo(m+
+p-A,ha);c.lineTo(m+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,m,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(m,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,x),this.outline||ha?c.lineTo(m+p,x):c.moveTo(m+p,x),this.outline||xa?c.lineTo(m+p,x+v):c.moveTo(m+p,x+v),this.outline||na?c.lineTo(m,x+v):c.moveTo(m,x+v),(this.outline||K)&&c.lineTo(m,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+p/2,x),c.lineTo(m+p/2,x+v)):(c.moveTo(m,x+v/2),c.lineTo(m+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+m,x,p,v){m=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,p);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(v-A)/2;x=m+A;var B=(p-A)/2;A=B+A;c.moveTo(0,m);c.lineTo(B,m);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(p,m);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/2);x=Math.min(p-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Da,
+mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ea.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};Ea.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Wa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Xa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ya=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
+x);this.strictDrawShape(c,0,0,p,v)};Da.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Za=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=Ea.prototype;c.setDashed(ab);ib&&""!=ib&&c.setDashPattern(ib);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,l,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
-l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Wa,Xa,Ya,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),
-c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
-K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
-Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
-Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
-l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,
-K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,
-K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,
-x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,
-l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
-l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,
-v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,
-l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,
-B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.paintSW(c,l,x,p,v,B,Ya,K,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,na),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-l,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ga),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,Ya,K,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,K,na,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Xa,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Wa,
-Xa,Ya,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ha,v)};Ea.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Ea.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Ea.prototype.paintNE=
-function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Ea.prototype.paintRight=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Ea.prototype.paintLeft=function(c,l,x,p,v,A,B,ha,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Ea.prototype.paintSE=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Ea.prototype.paintBottom=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ha,v)};Ea.prototype.paintSW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Ea.prototype.paintNWInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Ea.prototype.paintTopInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Ea.prototype.paintNEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Ea.prototype.paintRightInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Ea.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
-c.lineTo(K,v):c.lineTo(0,v)};Ea.prototype.paintSEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Ea.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
-v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Ea.prototype.paintSWInner=function(c,l,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Ea.prototype.moveSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
-c.moveTo(0,v-K)};Ea.prototype.lineSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Ea.prototype.moveSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Ea.prototype.lineSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
-c.lineTo(p-K,v)};Ea.prototype.moveNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Ea.prototype.lineNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Ea.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,ab,ib,db,Ga){if("fold"==
-A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&ib&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&ib&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Ea.prototype.cst.RECT2,Ea);
-Ea.prototype.constraints=null;mxUtils.extend(Da,mxConnector);Da.prototype.origPaintEdgeShape=Da.prototype.paintEdgeShape;Da.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Da.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Da.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Da);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),ib=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(ib-na/2-ab/2,db-ab/2+na/2);c.lineTo(ib-na/2+ab/2,db-ab/2-na/2);c.lineTo(ib+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(ib-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ha,K,
-xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),ib=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*ib+
-v*K,na.y-2*db+A*K);c.moveTo(na.x-ib-db+A*K,na.y-db+ib-v*K);c.lineTo(na.x+db-ib-A*K,na.y-db-ib+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),ib=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(ib.x-ab,ib.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,ib.x+ab,ib.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ha,K,xa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=l;na.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);K?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var gb=
-function(c,l,x){return tb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},tb=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
-p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var ib=K.y-ab.y,db=Math.sqrt(xa*xa+ib*ib);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,ib/db,ab,K,B,ha)})},qb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},yb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ub=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(kb(p));return v}},vb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[fb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
-ha},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},wb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[fb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return fb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,K));A=Da.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,m,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),Ja&&A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),Ia&&
+A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
+m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Ra,Xa,Ya,Za,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==
+xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,
+K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
+m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
+Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
+Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,
+m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,
+K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,
+K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,
+x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
+m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
+m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,
+v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,
+m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,
+B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),
+A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),
+A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Ra,Xa,
+Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.prototype.moveNW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Da.prototype.moveNE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Da.prototype.moveSE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Da.prototype.moveSW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(ha,v)};Da.prototype.paintNW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Da.prototype.paintTop=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Da.prototype.paintNE=
+function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Da.prototype.paintRight=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Da.prototype.paintLeft=function(c,m,x,p,v,A,B,ha,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Da.prototype.paintSE=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Da.prototype.paintBottom=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(ha,v)};Da.prototype.paintSW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Da.prototype.paintNWInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Da.prototype.paintTopInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Da.prototype.paintNEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Da.prototype.paintRightInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
+K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Da.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
+c.lineTo(K,v):c.lineTo(0,v)};Da.prototype.paintSEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Da.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
+v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Da.prototype.paintSWInner=function(c,m,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Da.prototype.moveSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
+c.moveTo(0,v-K)};Da.prototype.lineSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Da.prototype.moveSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Da.prototype.lineSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
+c.lineTo(p-K,v)};Da.prototype.moveNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Da.prototype.lineNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Da.prototype.moveNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Da.prototype.lineNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Da.prototype.paintFolds=function(c,m,x,p,v,A,B,ha,K,xa,na,ab,jb,db,Ga){if("fold"==
+A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&jb&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&jb&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);
+Da.prototype.constraints=null;mxUtils.extend(Ea,mxConnector);Ea.prototype.origPaintEdgeShape=Ea.prototype.paintEdgeShape;Ea.prototype.paintEdgeShape=function(c,m,x){for(var p=[],v=0;v<m.length;v++)p.push(mxUtils.clone(m[v]));v=c.state.dashed;var A=c.state.fixDash;Ea.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ea.prototype.origPaintEdgeShape.apply(this,
+[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==m.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb-na/2-ab/2,db-ab/2+na/2);c.lineTo(jb-na/2+ab/2,db-ab/2-na/2);c.lineTo(jb+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(jb-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ha,K,
+xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),jb=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*jb+
+v*K,na.y-2*db+A*K);c.moveTo(na.x-jb-db+A*K,na.y-db+jb-v*K);c.lineTo(na.x+db-jb-A*K,na.y-db-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,jb.x+ab,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ha,K,xa){m=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=m;na.y-=
+x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){m.begin();m.moveTo(ab.x,ab.y);K?m.lineTo(ab.x-A-B/c,ab.y-B+A/c):m.lineTo(ab.x+B/c-A,ab.y-B-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var hb=
+function(c,m,x){return lb(c,["width"],m,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,m,x,p,v){return eb(c,m,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
+p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,db=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,jb/db,ab,K,B,ha)})},rb=function(c){return function(m){return[eb(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(m){return[eb(m,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,m,x){return function(p){var v=[eb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(kb(p));return v}},Ab=function(c,m,x,p,v){x=null!=x?x:.5;return function(A){var B=[eb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
+ha},!1,p)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,m,x){c=null!=c?c:.5;return function(p){var v=[eb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m}},kb=function(c,m){return eb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=m?m:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},fb=function(c,l,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ha},mb={link:function(c){return[gb(c,!0,10),gb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(tb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},eb=function(c,m,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<m.length;na++)this.copyStyle(m[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ha},mb={link:function(c){return[hb(c,!0,10),hb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(tb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(tb(c,
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(tb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,x/2))}l.push(fb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(kb(c,x/2))}m.push(eb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:lb(),ext:lb(),rectangle:lb(),
-triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[fb(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
-p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[fb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[fb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",za.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[fb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[fb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[fb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ta.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Ta.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Ka.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:qb(1),doubleArrow:qb(.5),folder:function(c){return[fb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[fb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:yb(q.prototype.size),cylinder3:yb(y.prototype.size),offPageConnector:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:vb(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:vb(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:vb(qa.prototype.size,!1),display:vb(wa.prototype.size,!1),cube:ub(1,
-n.prototype.size,!1),card:ub(.5,G.prototype.size,!0),loopLimit:ub(.5,ca.prototype.size,!0),trapezoid:wb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:wb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=fb;Graph.handleFactory=mb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=mb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=mb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),zb=new mxPoint(1,0),Bb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(Bb),Math.sin(Bb));var Ab=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,ab=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
-db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return m},label:ub(),ext:ub(),rectangle:ub(),
+triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},umlFrame:function(c){return[eb(c,["width","height"],function(m){var x=Math.max(W.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
+p=Math.max(1.5*W.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(m.width,x.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(m.height,x.y-m.y)))},!1)]},process:function(c){var m=[eb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},cross:function(c){return[eb(c,["size"],function(m){var x=Math.min(m.width,m.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",za.prototype.size)))*x/2;return new mxPoint(m.getCenterX()-x,m.getCenterY()-x)},function(m,x){var p=Math.min(m.width,m.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-x.y)/p*2,Math.max(0,m.getCenterX()-x.x)/p*2)))})]},note:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},manualInput:function(c){var m=[eb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},dataStorage:function(c){return[eb(c,["size"],function(m){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
+L.prototype.size));return new mxPoint(m.x+m.width-p*(x?1:m.width),m.getCenterY())},function(m,x){m="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-x.x)):Math.max(0,Math.min(1,(m.x+m.width-x.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[eb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},internalStorage:function(c){var m=[eb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Ua.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},module:function(c){return[eb(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(m.x+x/2,m.y+2*p)},function(m,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y))/2)})]},corner:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,
+"dy",Ka.prototype.dy)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.dx=Math.round(Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},tee:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(m.x+(m.width+x)/2,m.y+p)},function(m,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,x.x-m.x-m.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(c,["tabWidth","tabHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=m.width-x);return new mxPoint(m.x+x,m.y+p)},function(m,x){var p=Math.max(0,Math.min(m.width,x.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=m.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},document:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",da.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},tape:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x*m.height/2)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[eb(c,
+["isoAngle"],function(m){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",l.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(x),.5*m.height))},function(m,x){this.state.style.isoAngle=Math.max(0,50*(x.y-m.y)/m.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});m.push(c);return m},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(qa.prototype.size,!1),display:Ab(wa.prototype.size,!1),cube:ob(1,
+n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=eb;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=mb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=mb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,na=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);jb?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
+db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(m,x/(.5+p));m=(m-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x+.75*p));return c};l.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(m*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,m,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,l,x){c=[];l=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};C.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ta.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
-ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,m,x){c=[];m=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};C.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ua.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -2905,85 +2906,85 @@ ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraint
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Va.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
-function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(m-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};N.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,E){E.getModel().beginUpdate();try{var C=E.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,E.getModel().setGeometry(g,
-C));E.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);E.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{E.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
-m=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&m==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var E=!0,C=0;C<
-y.length&&E;C++)E=E&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&E){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,E);null!=H&&(E=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,E-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
-null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
-try{var E=t.getEditableCells(t.getSelectionCells());if(0==E.length)q(y.getRoot(),n.copiedValue);else for(m=0;m<E.length;m++)q(E[m],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,m){g=null!=m?m:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
+Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),l=0;l<g.length;l++)t.cellLabelChanged(g[l],"")}finally{t.getModel().endUpdate()}}}function k(g,l,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
+C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,l,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
+l=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&l==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(g,l){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(l){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(l){if(null!=l){t.getModel().beginUpdate();try{n.pasteXml(l,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(l){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function l(y){if(null!=y){for(var F=!0,C=0;C<
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&F){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,F);null!=H&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,F-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{l(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{l(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),l=0;l<g.length;l++)if(t.getModel().isVertex(g[l])){var q=t.getCellGeometry(g[l]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[l],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
+null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,l){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=l?l:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
+try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(l=0;l<F.length;l++)q(F[l],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,l){g=null!=l?l:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{t.setSelectionCells(t.duplicateCells()),t.scrollCellToVisible(t.getSelectionCell())}catch(g){n.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var g=n.getSelectionState();if(null!=g.mergeCell){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",g.rowspan,[g.mergeCell]),t.setCellStyles("colspan",g.colspan,[g.mergeCell])}finally{t.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,m){g=null!=m?m:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,l){g=null!=l?l:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(g){g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.addSelectionCells(t.getEdges(g))}));this.addAction("selectVertices",function(){t.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){t.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){t.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){t.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(m,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(l,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
q,g);t.setCellStyles("connectable",q,g)}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){t.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){t.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){t.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){t.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){t.foldCells(!1)},
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){t.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){t.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(g){t.orderCells(!1,null,!0)});this.addAction("sendBackward",function(g){t.orderCells(!0,null,!0)});this.addAction("group",function(){if(t.isEnabled()){var g=mxUtils.sortCells(t.getSelectionCells(),!0);1!=g.length||t.isTable(g[0])||t.isTableRow(g[0])?
-(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var m=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),m.push(g[q]))}finally{t.model.endUpdate()}0<
-m.length&&t.setSelectionCells(m)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var m=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||m.push(g[q]);t.removeCellsFromParent(m)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(m=q)}m=new TextareaDialog(n,mxResources.get("editTooltip")+":",m,function(y){t.setTooltipForCell(g,
-y)});n.showDialog(m.container,320,200,!0,!0);m.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m=t.getLinkForCell(g)||"";n.showLinkDialog(m,mxResources.get("apply"),function(q,y,E){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",E)},!0,t.getLinkTargetForCell(g))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,m,q){g=mxUtils.trim(g);if(0<g.length){var y=null,E=t.getLinkTitle(g);null!=m&&0<m.length&&(y=m[0].iconUrl,
-E=m[0].name||m[0].type,E=E.charAt(0).toUpperCase()+E.substring(1),30<E.length&&(E=E.substring(0,30)+"..."));m=new mxCell(E,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));m.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([m],!0));m.geometry.x=y.x;m.geometry.y=y.y;t.setAttributeForCell(m,"linkTarget",q);t.setLinkForCell(m,g);t.cellSizeUpdated(m,
-!0);t.getModel().beginUpdate();try{m=t.addCell(m),t.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{t.getModel().endUpdate()}t.setSelectionCell(m);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),m=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==m&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
-E=0;E<y.length&&null==m;E++)y[E].textContent==g.textContent&&(m=y[E]);null!=m&&"A"==m.nodeName&&(q=m.getAttribute("href")||"",t.selectNode(m));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
-try{for(var m=0;m<g.length;m++){var q=g[m];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var m=t.getEditableCells(t.getSelectionCells()),
-q=0;q<m.length;q++)if(state=t.getView().getState(m[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var E=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(E=E.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(E);E=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,E);t.setCellStyles("html",g,[m[q]])}else"0"==y&&"1"==g&&(E=mxUtils.htmlEntities(t.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(E=E.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(E)),t.setCellStyles("html",g,[m[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",m))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),m="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(m=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-m)});this.addAction("rotation",function(){var g="0",m=t.getView().getState(t.getSelectionCell());null!=m&&(g=m.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),m=t.view.translate,q=t.view.scale;g.x=g.x/q-m.x;g.y=g.y/q-m.y;g.width/=q;
-g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(g.x-=m.x,g.y-=m.y,g.width+=m.width+m.x,g.height+=m.height+m.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*
-Math.min((t.container.clientWidth-10)/g.width/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
-10)/(2*g.width)/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
-t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&t.zoomTo(m/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
-300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&(m=new ChangePageSetup(n,null,null,null,m/100),m.ignoreColor=!0,m.ignoreImage=!0,t.model.execute(m))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
+(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var l=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),l.push(g[q]))}finally{t.model.endUpdate()}0<
+l.length&&t.setSelectionCells(l)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var l=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||l.push(g[q]);t.removeCellsFromParent(l)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(l=q)}l=new TextareaDialog(n,mxResources.get("editTooltip")+":",l,function(y){t.setTooltipForCell(g,
+y)});n.showDialog(l.container,320,200,!0,!0);l.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l=t.getLinkForCell(g)||"";n.showLinkDialog(l,mxResources.get("apply"),function(q,y,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,l,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=l&&0<l.length&&(y=l[0].iconUrl,
+F=l[0].name||l[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));l=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));l.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([l],!0));l.geometry.x=y.x;l.geometry.y=y.y;t.setAttributeForCell(l,"linkTarget",q);t.setLinkForCell(l,g);t.cellSizeUpdated(l,
+!0);t.getModel().beginUpdate();try{l=t.addCell(l),t.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{t.getModel().endUpdate()}t.setSelectionCell(l);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),l=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==l&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
+F=0;F<y.length&&null==l;F++)y[F].textContent==g.textContent&&(l=y[F]);null!=l&&"A"==l.nodeName&&(q=l.getAttribute("href")||"",t.selectNode(l));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
+try{for(var l=0;l<g.length;l++){var q=g[l];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var l=t.getEditableCells(t.getSelectionCells()),
+q=0;q<l.length;q++)if(state=t.getView().getState(l[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[l[q]])}else"0"==y&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[l[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",l))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),l="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(l=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+l)});this.addAction("rotation",function(){var g="0",l=t.getView().getState(t.getSelectionCell());null!=l&&(g=l.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),l=t.view.translate,q=t.view.scale;g.x=g.x/q-l.x;g.y=g.y/q-l.y;g.width/=q;
+g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(g.x-=l.x,g.y-=l.y,g.width+=l.width+l.x,g.height+=l.height+l.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*
+Math.min((t.container.clientWidth-10)/g.width/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
+10)/(2*g.width)/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
+t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&t.zoomTo(l/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
+300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&(l=new ChangePageSetup(n,null,null,null,l/100),l.ignoreColor=!0,l.ignoreImage=!0,t.model.execute(l))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
function(){t.setGridEnabled(!t.isGridEnabled());t.defaultGridEnabled=t.isGridEnabled();n.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.isGridEnabled()});d.setEnabled(!1);d=this.addAction("guides",function(){t.graphHandler.guidesEnabled=!t.graphHandler.guidesEnabled;n.fireEvent(new mxEventObject("guidesEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.graphHandler.guidesEnabled});
d.setEnabled(!1);d=this.addAction("tooltips",function(){t.tooltipHandler.setEnabled(!t.tooltipHandler.isEnabled());n.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.tooltipHandler.isEnabled()});d=this.addAction("collapseExpand",function(){var g=new ChangePageSetup(n);g.ignoreColor=!0;g.ignoreImage=!0;g.foldingEnabled=!t.foldingEnabled;t.model.execute(g)});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.foldingEnabled});
-d.isEnabled=F;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+d.isEnabled=E;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
null,"Alt+Shift+A");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionArrowsEnabled});d=this.addAction("connectionPoints",function(){t.setConnectable(!t.connectionHandler.isEnabled());n.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isEnabled()});d=this.addAction("copyConnect",function(){t.connectionHandler.setCreateTarget(!t.connectionHandler.isCreateTarget());
-n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=F;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=F;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
-"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,m,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var E=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,m,E);(m&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(E,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(E,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(E,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<E.length;C++)0==t.model.getChildCount(E[C])&&t.autoSizeCell(E[C],
+n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=E;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=E;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
+"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,l,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,l,F);(l&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
!1)}finally{t.getModel().endUpdate()}}},null,null,y)});d("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");d("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");d("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){n.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){n.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){n.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){n.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,null),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dashed",function(){t.getModel().beginUpdate();
try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dotted",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),n.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("sharp",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});
-this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(g[0]),
-q="1"==mxUtils.getValue(m,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),m="1";null!=g&&null!=t.getFoldingImage(g)&&(m="0");t.setCellStyles("collapsible",m);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[m],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var m=t.getModel();m=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",m.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(m.container,420,300,!0,!0);m.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var m=D.graph.selectionCellsHandler.getHandler(g);if(m instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,E=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)E+=C.x,q+=C.y,g=
-t.getModel().getParent(g),C=t.getCellGeometry(g);E=Math.round(t.snap(t.popupMenuHandler.triggerX/y-E));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,E,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
-0;y<q.length;y++){var E=q[y];if(t.getModel().isEdge(E)){var C=t.getCellGeometry(E);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[E]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[E]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[E]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[E])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(E,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
-mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var E=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(E),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(g[0]),
+q="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),l="1";null!=g&&null!=t.getFoldingImage(g)&&(l="0");t.setCellStyles("collapsible",l);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[l],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var l=t.getModel();l=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",l.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(l.container,420,300,!0,!0);l.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var l=D.graph.selectionCellsHandler.getHandler(g);if(l instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
+t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));l.addPointAt(l.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,l){g=null!=l?l:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
+0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=l&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
+mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",l=t.getView().getState(t.getSelectionCell()),
+q="",y=null;null!=l&&(q=l.style[mxConstants.STYLE_IMAGE]||q,y=l.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var O=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=O.x;Y[0].geometry.y=O.y;null!=aa&&k(Y[0],aa,da,ba,t);qa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
-null!=H&&null!=G){var ea=Y[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=H,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,da,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=F;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
-null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(E,C,H){k(g,E,C,H,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=F;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
+null!=H&&null!=G){var ea=Y[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=H,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,da,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+null!=g){var l=t.getCurrentCellStyle(g),q=l[mxConstants.STYLE_IMAGE],y=l[mxConstants.STYLE_SHAPE];q&&"image"==y&&(l=new CropImageDialog(n,q,l[mxConstants.STYLE_CLIP_PATH],function(F,C,H){k(g,F,C,H,t)}),n.showDialog(l.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var m=new ConnectionPointsDialog(n,
-g);n.showDialog(m.container,350,450,!0,!1,function(){m.destroy()});m.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var l=new ConnectionPointsDialog(n,
+g);n.showDialog(l.container,350,450,!0,!1,function(){l.destroy()});l.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,k,n,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=n;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
@@ -2991,26 +2992,26 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,n){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,n):this.reloadFile(b,
e))}catch(t){null!=e&&e(t)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var d=[this.ui.diffPages(null!=n?n:t,F)],f=this.ignorePatches(d);this.setShadowPages(F);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
-n),q=this.ui.getHashValueForPages(F,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(F)),E=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+E,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),l=this.ui.getHashValueForPages(g,
+n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",q,"valid",l==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var aa=this.getCurrentUser(),da=null!=aa?aa.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),da,ba)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(f){var g=this.compressReportData(JSON.stringify(e,null,2));f=null==f?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(f.data)),
-25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+g+(null!=f?"\n\nRemote:\n"+f:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(f){null!=f&&f.getCurrentEtag()==n?t(f):t(null)}),function(){})}else{var F=this.getCurrentUser(),d=null!=F?F.id:"unknown";EditorUi.logError("Checksum Error in "+D+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+g+(null!=f?"\n\nRemote:\n"+f:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(f){null!=f&&f.getCurrentEtag()==n?t(f):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown";EditorUi.logError("Checksum Error in "+D+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:D,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),d=null!=F?this.ui.hashValue(F.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");F="xml";0<m&&(F=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),l=g.lastIndexOf(".");E="xml";0<l&&(E=g.substring(l));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+D+"\n\nData:\n"+t,n)}catch(y){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){this.stats.fileReloaded++;var n=this.ui.editor.graph.getViewState(),D=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,n,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats);null!=b&&
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){this.stats.fileReloaded++;var n=this.ui.editor.graph.getViewState(),D=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,n,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=F.foldingEnabled,g=F.mathEnabled,m=F.cellRenderer.redraw;F.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=m;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=F.mathEnabled?
-(this.ui.editor.updateGraphComponents(),F.refresh()):(f!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,l=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());l.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=l;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(f!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,n,D,t){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",n,"overwrite",D,"manual",t,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
DrawioFile.prototype.saveFile=function(b,e,k,n){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3046,26 +3047,26 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),n=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,n,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),n=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,n,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,n,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),n)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,n,D):this.invalidChecksum?this.showRefreshDialog(k,n,this.getErrorMessage(b)):e?this.showConflictDialog(D,t):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(k,n)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,n,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var t=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(t),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(t,e,k,n,D)}catch(f){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=n&&n(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var F=this.getCurrentUser(),d=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,f)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=n&&n(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,f)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,n){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"saving",this.savingFile,"modified",this.isModified(),"now",this.isAutosaveNow());if(this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();
-t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=n&&n(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=n&&n(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,n,D,t){DrawioFile.call(this,b,e);this.title=k;this.mode=n?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=t};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var m=mxUtils.bind(this,
-function(y){this.savingFile=!1;null!=n&&n({error:y})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(y){this.fileHandle.getFile().then(mxUtils.bind(this,function(E){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[E],"conflict",this.desc.lastModified!=E.lastModified);this.desc.lastModified==E.lastModified?y.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){y.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(F,H,d,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(E){this.invalidFileHandle=!0;m(E)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):f(F)};
+LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
+function(y){this.savingFile=!1;null!=n&&n({error:y})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(y){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[F],"conflict",this.desc.lastModified!=F.lastModified);this.desc.lastModified==F.lastModified?y.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){y.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,H,d,l);this.removeDraft()}catch(G){l(G)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;l(F)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):f(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3184,15 +3185,15 @@ mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u(
P=0;P<J.length;P++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[oa]=va;N.push(va+"\n");W--;S()}),mxUtils.bind(this,function(va){W--;N.push("@import url("+oa+");\n");S()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[P].name,J[P].url);S()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
if(null!=u&&0<u.length)for(var J=document.getElementsByTagName("style"),N=0;N<J.length;N++){var W=mxUtils.getTextContent(J[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(J[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,J){J=null!=J?J:this.absoluteCssFonts(this.fontCss);if(null!=J){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,J);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,J,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/J))};Editor.prototype.exportToCanvas=function(u,J,N,
-W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na,Ca,Qa,Ta,Ka){try{P=null!=P?P:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;ta=null!=ta?ta:0;var bb=va?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==va&&(bb=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,ta,Na,null,Z,null,null,null,Aa,null,Qa,Ta,Ka),mxUtils.bind(this,function(Ua){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
-0,0);u(M,Ua)},0):(ia.drawImage($a,0,0),u(M,Ua))},M=document.createElement("canvas"),T=parseInt(Ua.getAttribute("width")),ca=parseInt(Ua.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=P?Math.min(1,Math.min(3*J/(4*ca),J/T)):J/T);oa=this.getMaxCanvasScale(T,ca,oa);T=Math.ceil(oa*T);ca=Math.ceil(oa*ca);M.setAttribute("width",T);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,T,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var ma=Ba.view,
-pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Pa=Ma+(Fa.x-Ma)/pa-ta,Sa=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Pa)*oa,ya)),Ea=-Math.round(ya-mxUtils.mod((Oa-Sa)*oa,ya));wa<T;wa+=ya)for(var Da=Ea;Da<ca;Da+=ya)ia.drawImage(za,wa/oa,Da/oa);L()}catch(La){null!=
-S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});$a.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Ua);this.graph.mathEnabled&&this.addMathCss(Ua);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ua,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Ua))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Ua,L),this.loadFonts(z)}catch(M){null!=
-S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Ua){null!=S&&S(Ua)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
+W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na,Ca,Qa,Ua,Ka){try{P=null!=P?P:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;ta=null!=ta?ta:0;var bb=va?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==va&&(bb=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,ta,Na,null,Z,null,null,null,Aa,null,Qa,Ua,Ka),mxUtils.bind(this,function(Va){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
+0,0);u(M,Va)},0):(ia.drawImage($a,0,0),u(M,Va))},M=document.createElement("canvas"),T=parseInt(Va.getAttribute("width")),ca=parseInt(Va.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=P?Math.min(1,Math.min(3*J/(4*ca),J/T)):J/T);oa=this.getMaxCanvasScale(T,ca,oa);T=Math.ceil(oa*T);ca=Math.ceil(oa*ca);M.setAttribute("width",T);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,T,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var ma=Ba.view,
+pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Pa=Ma+(Fa.x-Ma)/pa-ta,Sa=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Pa)*oa,ya)),Da=-Math.round(ya-mxUtils.mod((Oa-Sa)*oa,ya));wa<T;wa+=ya)for(var Ea=Da;Ea<ca;Ea+=ya)ia.drawImage(za,wa/oa,Ea/oa);L()}catch(La){null!=
+S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});$a.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Va);this.graph.mathEnabled&&this.addMathCss(Va);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Va,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Va))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Va,L),this.loadFonts(z)}catch(M){null!=
+S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Va){null!=S&&S(Va)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"==
P(u,4)){S=u.substring(0,va-8);"pHYs"==J&&"dpi"==N?(N=Math.round(W/.0254),N=oa(N)+oa(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==J?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,J,0,4);W=Editor.updateCRC(W,N,0,N.length);S+=oa(N.length)+J+N+oa(W^4294967295);S+=u.substring(va-8,u.length);break}S+=u.substring(va-8,va-4+Aa);P(u,Aa);P(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(S):Base64.encode(S,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,J){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,J){var N=null;null!=u.editor.graph.getModel().getParent(J)?
-N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
+N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var J=this.editorUi,N=J.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(S){var P=new ChangePageSetup(J);
P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=S;N.model.execute(P)},{install:function(S){this.listener=function(){S(N.shadowVisible)};J.addListener("shadowVisibleChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
arguments);var J=this.editorUi,N=J.editor.graph;if(N.isEnabled()){var W=J.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var S=this.createOption(mxResources.get("autosave"),function(){return J.editor.autosave},function(Z){J.editor.setAutosave(Z);J.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(J.editor.autosave)};J.editor.addListener("autosaveChanged",this.listener)},destroy:function(){J.editor.removeListener(this.listener)}});u.appendChild(S)}}if(this.isMathOptionVisible()&&
@@ -3220,8 +3221,8 @@ stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,J,N){if(null!=J){var W=function(P){if(null!=P)if(N)for(var Z=0;Z<P.length;Z++)J[P[Z].name]=P[Z];else for(var oa in J){var va=!1;for(Z=0;Z<P.length;Z++)if(P[Z].name==oa&&P[Z].type==J[oa].type){va=!0;break}va||delete J[oa]}},
-S=this.editorUi.editor.graph.view.getState(u);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),W(S.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(P){}}};var E=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));E.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,S=0;S<N.length;S++)this.findCommonProperties(N[S],J,0==S);for(S=0;S<W.length;S++)this.findCommonProperties(W[S],J,0==N.length&&0==S);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
+S=this.editorUi.editor.graph.view.getState(u);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),W(S.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(P){}}};var F=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,S=0;S<N.length;S++)this.findCommonProperties(N[S],J,0==S);for(S=0;S<W.length;S++)this.findCommonProperties(W[S],J,0==N.length&&0==S);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
this.container.appendChild(this.addProperties(this.createPanel(),J,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,J,N){function W(ia,ma,pa,ua){Ba.getModel().beginUpdate();try{var ya=[],Fa=[];if(null!=pa.index){for(var Ma=[],Oa=pa.parentRow.nextSibling;Oa&&Oa.getAttribute("data-pName")==
ia;)Ma.push(Oa.getAttribute("data-pValue")),Oa=Oa.nextSibling;pa.index<Ma.length?null!=ua?Ma.splice(ua,1):Ma[pa.index]=ma:Ma.push(ma);null!=pa.size&&Ma.length>pa.size&&(Ma=Ma.slice(0,pa.size));ma=Ma.join(",");null!=pa.countProperty&&(Ba.setCellStyles(pa.countProperty,Ma.length,Ba.getSelectionCells()),ya.push(pa.countProperty),Fa.push(Ma.length))}Ba.setCellStyles(ia,ma,Ba.getSelectionCells());ya.push(ia);Fa.push(ma);if(null!=pa.dependentProps)for(ia=0;ia<pa.dependentProps.length;ia++){var Pa=pa.dependentPropsDefVal[ia],
Sa=pa.dependentPropsVals[ia];if(Sa.length>ma)Sa=Sa.slice(0,ma);else for(var za=Sa.length;za<ma;za++)Sa.push(Pa);Sa=Sa.join(",");Ba.setCellStyles(pa.dependentProps[ia],Sa,Ba.getSelectionCells());ya.push(pa.dependentProps[ia]);Fa.push(Sa)}if("function"==typeof pa.onChange)pa.onChange(Ba,ma);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function S(ia,ma,pa){var ua=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(ia,
@@ -3230,25 +3231,25 @@ function(Fa){ua.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImag
ia)Pa=Pa.nextSibling,Sa++;else break;var za={type:pa,parentRow:Fa,index:Sa,isDeletable:!0,defVal:ua,countProperty:ya};Sa=Aa(ia,"",za,0==Sa%2,Ma);W(ia,ua,za);Pa.parentNode.insertBefore(Sa,Pa.nextSibling);mxEvent.consume(Oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(ia,ma,pa,ua,ya,Fa,Ma){if(0<ya){var Oa=Array(ya);ma=null!=ma?ma.split(","):[];for(var Pa=0;Pa<ya;Pa++)Oa[Pa]=null!=ma[Pa]?ma[Pa]:null!=ua?ua:"";ta.push({name:ia,values:Oa,type:pa,
defVal:ua,parentRow:Fa,flipBkg:Ma,size:ya})}return document.createElement("div")}function va(ia,ma,pa){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==ma;mxEvent.addListener(ua,"change",function(){W(ia,ua.checked?"1":"0",pa)});return ua}function Aa(ia,ma,pa,ua,ya){var Fa=pa.dispName,Ma=pa.type,Oa=document.createElement("tr");Oa.className="gePropRow"+(ya?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Oa.setAttribute("data-pName",ia);Oa.setAttribute("data-pValue",ma);ua=!1;
null!=pa.index&&(Oa.setAttribute("data-index",pa.index),Fa=(null!=Fa?Fa:"")+"["+pa.index+"]",ua=!0);var Pa=document.createElement("td");Pa.className="gePropRowCell";Fa=mxResources.get(Fa,null,Fa);mxUtils.write(Pa,Fa);Pa.setAttribute("title",Fa);ua&&(Pa.style.textAlign="right");Oa.appendChild(Pa);Pa=document.createElement("td");Pa.className="gePropRowCell";if("color"==Ma)Pa.appendChild(P(ia,ma,pa));else if("bool"==Ma||"boolean"==Ma)Pa.appendChild(va(ia,ma,pa));else if("enum"==Ma){var Sa=pa.enumList;
-for(ya=0;ya<Sa.length;ya++)if(Fa=Sa[ya],Fa.val==ma){mxUtils.write(Pa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){var za=document.createElement("select");S(Pa,za);for(var wa=0;wa<Sa.length;wa++){var Ea=Sa[wa],Da=document.createElement("option");Da.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));za.appendChild(Da)}za.value=ma;u.appendChild(za);mxEvent.addListener(za,"change",function(){var La=
+for(ya=0;ya<Sa.length;ya++)if(Fa=Sa[ya],Fa.val==ma){mxUtils.write(Pa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){var za=document.createElement("select");S(Pa,za);for(var wa=0;wa<Sa.length;wa++){var Da=Sa[wa],Ea=document.createElement("option");Ea.value=mxUtils.htmlEntities(Da.val);mxUtils.write(Ea,mxResources.get(Da.dispName,null,Da.dispName));za.appendChild(Ea)}za.value=ma;u.appendChild(za);mxEvent.addListener(za,"change",function(){var La=
mxUtils.htmlEntities(za.value);W(ia,La,pa)});za.focus();mxEvent.addListener(za,"blur",function(){u.removeChild(za)})}))}else"dynamicArr"==Ma?Pa.appendChild(Z(ia,ma,pa.subType,pa.subDefVal,pa.countProperty,Oa,ya)):"staticArr"==Ma?Pa.appendChild(oa(ia,ma,pa.subType,pa.subDefVal,pa.size,Oa,ya)):"readOnly"==Ma?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=ma,ya.style.width="96px",ya.style.borderWidth="0px",Pa.appendChild(ya)):(Pa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),
-mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){function za(){var Ea=wa.value;Ea=0==Ea.length&&"string"!=Ma?0:Ea;pa.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ma="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=pa.min&&Ea<pa.min?Ea=pa.min:null!=pa.max&&Ea>pa.max&&(Ea=pa.max);Ea=encodeURIComponent(("int"==Ma?parseInt(Ea):Ea)+"");W(ia,Ea,pa)}var wa=document.createElement("input");S(Pa,wa,!0);wa.value=decodeURIComponent(ma);wa.className="gePropEditor";"int"!=
-Ma&&"float"!=Ma||pa.allowAuto||(wa.type="number",wa.step="int"==Ma?"1":"any",null!=pa.min&&(wa.min=parseFloat(pa.min)),null!=pa.max&&(wa.max=parseFloat(pa.max)));u.appendChild(wa);mxEvent.addListener(wa,"keypress",function(Ea){13==Ea.keyCode&&za()});wa.focus();mxEvent.addListener(wa,"blur",function(){za()})})));pa.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(sa,function(za){W(ia,"",pa,pa.index);mxEvent.consume(za)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
-"geColorBtn",Pa.appendChild(ya));Oa.appendChild(Pa);return Oa}var sa=this,Ba=this.editorUi.editor.graph,ta=[];u.style.position="relative";u.style.padding="0";var Na=document.createElement("table");Na.className="geProperties";Na.style.whiteSpace="nowrap";Na.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign=
-"middle";Qa.appendChild(Ta);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var ia=Na.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var ma="none";for(var pa=u.childNodes.length-1;0<=pa;pa--)try{var ua=u.childNodes[pa],ya=ua.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(ua)}catch(Fa){}}else Ta.src=Sidebar.prototype.expandedImage,ma="";for(pa=0;pa<ia.length;pa++)ia[pa].style.display=
-ma};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);Na.appendChild(Ca);var bb=!1,Ua=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Na.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
-!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Ua=!Ua;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],T=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];T.push(J[L[Qa]].subDefVal);M.push(null!=
-ca?ca.split(","):[])}Ca.dependentPropsDefVal=T;Ca.dependentPropsVals=M}Na.appendChild(Aa($a,z,Ca,bb,Ua));bb=!bb}}for(Qa=0;Qa<ta.length;Qa++)for(Ca=ta[Qa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Na);Ka();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
+mxEvent.addListener(Pa,"click",mxUtils.bind(sa,function(){function za(){var Da=wa.value;Da=0==Da.length&&"string"!=Ma?0:Da;pa.allowAuto&&(null!=Da.trim&&"auto"==Da.trim().toLowerCase()?(Da="auto",Ma="string"):(Da=parseFloat(Da),Da=isNaN(Da)?0:Da));null!=pa.min&&Da<pa.min?Da=pa.min:null!=pa.max&&Da>pa.max&&(Da=pa.max);Da=encodeURIComponent(("int"==Ma?parseInt(Da):Da)+"");W(ia,Da,pa)}var wa=document.createElement("input");S(Pa,wa,!0);wa.value=decodeURIComponent(ma);wa.className="gePropEditor";"int"!=
+Ma&&"float"!=Ma||pa.allowAuto||(wa.type="number",wa.step="int"==Ma?"1":"any",null!=pa.min&&(wa.min=parseFloat(pa.min)),null!=pa.max&&(wa.max=parseFloat(pa.max)));u.appendChild(wa);mxEvent.addListener(wa,"keypress",function(Da){13==Da.keyCode&&za()});wa.focus();mxEvent.addListener(wa,"blur",function(){za()})})));pa.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(sa,function(za){W(ia,"",pa,pa.index);mxEvent.consume(za)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
+"geColorBtn",Pa.appendChild(ya));Oa.appendChild(Pa);return Oa}var sa=this,Ba=this.editorUi.editor.graph,ta=[];u.style.position="relative";u.style.padding="0";var Na=document.createElement("table");Na.className="geProperties";Na.style.whiteSpace="nowrap";Na.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign=
+"middle";Qa.appendChild(Ua);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var ia=Na.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var ma="none";for(var pa=u.childNodes.length-1;0<=pa;pa--)try{var ua=u.childNodes[pa],ya=ua.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(ua)}catch(Fa){}}else Ua.src=Sidebar.prototype.expandedImage,ma="";for(pa=0;pa<ia.length;pa++)ia[pa].style.display=
+ma};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);Na.appendChild(Ca);var bb=!1,Va=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Na.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Va=!Va;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],T=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];T.push(J[L[Qa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=T;Ca.dependentPropsVals=M}Na.appendChild(Aa($a,z,Ca,bb,Va));bb=!bb}}for(Qa=0;Qa<ta.length;Qa++)for(Ca=ta[Qa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Na);Ka();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
"mouseenter",function(){Ca.style.opacity="1"});mxEvent.addListener(Ca,"mouseleave",function(){Ca.style.opacity="0.5"})}var N=this.editorUi,W=N.editor.graph,S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.paddingLeft="24px";S.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(S);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],va=0;va<this.defaultColorSchemes.length;va++){var Aa=document.createElement("div");Aa.style.display="inline-block";Aa.style.width="6px";Aa.style.height="6px";Aa.style.marginLeft="4px";Aa.style.marginRight="3px";Aa.style.borderRadius="3px";Aa.style.cursor="pointer";Aa.style.background="transparent";Aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,
function(Ca){mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(Ca)}))})(va);oa.push(Aa);Z.appendChild(Aa)}var sa=mxUtils.bind(this,function(Ca){null!=oa[Ca]&&(null!=this.format.currentScheme&&null!=oa[this.format.currentScheme]&&(oa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Ba(this.defaultColorSchemes[this.format.currentScheme]),oa[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(Ca){var Qa=mxUtils.bind(this,
function(Ka){var bb=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var T=W.getModel().getStyle(L[M]),ca=0;ca<P.length;ca++)T=mxUtils.removeStylename(T,P[ca]);var ia=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ka?(mxEvent.isShiftDown(z)||(T=""==Ka.fill?mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,Ka.fill||mxUtils.getValue(ia,
mxConstants.STYLE_FILLCOLOR,null)),T=mxUtils.setStyle(T,mxConstants.STYLE_GRADIENTCOLOR,Ka.gradient||mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(T=mxUtils.setStyle(T,mxConstants.STYLE_FONTCOLOR,Ka.font||mxUtils.getValue(ia,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(T=""==Ka.stroke?mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,
Ka.stroke||mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,null)))):(T=mxUtils.setStyle(T,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_FILLCOLOR,"#ffffff")),T=mxUtils.setStyle(T,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,"#000000")),T=mxUtils.setStyle(T,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(T=mxUtils.setStyle(T,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ia,
-mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],T)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ka){var Ua="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ka.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ka.fill+"', EndColorStr='"+Ka.gradient+"', GradientType=0)":
-bb.style.backgroundImage="linear-gradient("+Ka.fill+" 0px,"+Ka.gradient+" 100%)":Ka.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ka.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ka.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ka.stroke==mxConstants.NONE?Ua+" transparent":
-""==Ka.stroke?Ua+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ua+" "+(Ka.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ka.title&&bb.setAttribute("title",Ka.title)}else{Ua=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
-Ua;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";S.appendChild(bb)});S.innerHTML="";for(var Ta=0;Ta<Ca.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(S),Qa(Ca[Ta])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var ta=document.createElement("div");ta.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],T)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ka){var Va="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ka.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ka.fill+"', EndColorStr='"+Ka.gradient+"', GradientType=0)":
+bb.style.backgroundImage="linear-gradient("+Ka.fill+" 0px,"+Ka.gradient+" 100%)":Ka.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ka.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ka.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ka.stroke==mxConstants.NONE?Va+" transparent":
+""==Ka.stroke?Va+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Va+" "+(Ka.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ka.title&&bb.setAttribute("title",Ka.title)}else{Va=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
+Va;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";S.appendChild(bb)});S.innerHTML="";for(var Ua=0;Ua<Ca.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(S),Qa(Ca[Ua])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var ta=document.createElement("div");ta.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Na=document.createElement("div");Na.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(u.appendChild(ta),u.appendChild(Na));mxEvent.addListener(Na,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(ta);J(Na);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var J=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==J.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(S){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==J.cells.length?N.view.getState(J.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(J=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(S){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
@@ -3261,22 +3262,22 @@ null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}return u};Graph.prototype
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(S){J=S}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var J=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(S){J=null});this.isMouseInsertPoint=function(){return null!=J};var N=this.getInsertPoint;
this.getInsertPoint=function(){return null!=J?this.getPointForEvent(J):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(S){var P=this.graph.getCellStyle(S);if(null!=P&&"rack"==P.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=P.marginLeft||0;Z.marginRight=P.marginRight||0;Z.marginTop=P.marginTop||0;Z.marginBottom=
P.marginBottom||0;Z.allowGaps=P.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,J){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,J,N,W,S,P,Z,oa,va,Aa,sa){aa.apply(this,arguments);
-Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Ta=0;Ta<Ca.length;Ta++)Z.isCellVisible(Ca[Ta])&&Qa.push(Ca[Ta]);Z.setSelectionCells(Qa)}function S(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function P(Ca,Qa){Aa.innerHTML="";if(0<Ca.length){var Ta=
-document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Ka=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Ua){var $a=0>mxUtils.indexOf(Z.hiddenTags,Ua),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:Editor.hiddenImage);
-M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(Z.hiddenTags,Ua);mxEvent.isShiftDown(ca)?S(0<=mxUtils.indexOf(Z.hiddenTags,Ua)):(0>ia?Z.hiddenTags.push(Ua):0<=ia&&Z.hiddenTags.splice(ia,1),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);
-L=document.createElement("td");L.style.overflow="hidden";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Ua);a=document.createElement("a");mxUtils.write(a,Ua);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){S(!0);var ia=Z.getCellsForTags([Ua],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):
-Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)S(!0);else{ia=oa.slice();var ma=mxUtils.indexOf(ia,Ua);ia.splice(ma,1);Z.hiddenTags=ia;W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",
-[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Ua);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Ua]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px";T.defaultChecked=
-null!=Qa&&0<=mxUtils.indexOf(Qa,Ua);T.checked=T.defaultChecked;T.style.background="transparent";T.setAttribute("title",mxResources.get(T.defaultChecked?"removeIt":"add",[Ua]));mxEvent.addListener(T,"change",function(ca){T.checked?Z.addTagsForCells(Z.getSelectionCells(),[Ua]):Z.removeTagsForCells(Z.getSelectionCells(),[Ua]);mxEvent.consume(ca)});L.appendChild(T)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ta.appendChild(Ka);Aa.appendChild(Ta)}}var Z=this,oa=Z.hiddenTags.slice(),va=document.createElement("div");
+Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Ua=0;Ua<Ca.length;Ua++)Z.isCellVisible(Ca[Ua])&&Qa.push(Ca[Ua]);Z.setSelectionCells(Qa)}function S(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function P(Ca,Qa){Aa.innerHTML="";if(0<Ca.length){var Ua=
+document.createElement("table");Ua.setAttribute("cellpadding","2");Ua.style.boxSizing="border-box";Ua.style.tableLayout="fixed";Ua.style.width="100%";var Ka=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Va){var $a=0>mxUtils.indexOf(Z.hiddenTags,Va),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:Editor.hiddenImage);
+M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Va]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(Z.hiddenTags,Va);mxEvent.isShiftDown(ca)?S(0<=mxUtils.indexOf(Z.hiddenTags,Va)):(0>ia?Z.hiddenTags.push(Va):0<=ia&&Z.hiddenTags.splice(ia,1),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);
+L=document.createElement("td");L.style.overflow="hidden";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Va);a=document.createElement("a");mxUtils.write(a,Va);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){S(!0);var ia=Z.getCellsForTags([Va],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):
+Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)S(!0);else{ia=oa.slice();var ma=mxUtils.indexOf(ia,Va);ia.splice(ma,1);Z.hiddenTags=ia;W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",
+[Va]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Va);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Va]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px";T.defaultChecked=
+null!=Qa&&0<=mxUtils.indexOf(Qa,Va);T.checked=T.defaultChecked;T.style.background="transparent";T.setAttribute("title",mxResources.get(T.defaultChecked?"removeIt":"add",[Va]));mxEvent.addListener(T,"change",function(ca){T.checked?Z.addTagsForCells(Z.getSelectionCells(),[Va]):Z.removeTagsForCells(Z.getSelectionCells(),[Va]);mxEvent.consume(ca)});L.appendChild(T)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ua.appendChild(Ka);Aa.appendChild(Ua)}}var Z=this,oa=Z.hiddenTags.slice(),va=document.createElement("div");
va.style.userSelect="none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.borderRadius="4px";Aa.style.userSelect="none";Aa.style.overflow="auto";Aa.style.position="absolute";Aa.style.left="10px";Aa.style.right="10px";Aa.style.top="10px";Aa.style.border=Z.isEnabled()?"1px solid #808080":"none";Aa.style.bottom=Z.isEnabled()?"48px":"10px";va.appendChild(Aa);var sa=mxUtils.button(mxResources.get("reset"),
function(Ca){Z.hiddenTags=[];mxEvent.isShiftDown(Ca)||(oa=Z.hiddenTags.slice());W();Z.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;ta()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var ta=mxUtils.bind(this,function(Ca,Qa){if(u()){Ca=Z.getAllTags();
for(Qa=0;Qa<Ca.length;Qa++)0>mxUtils.indexOf(oa,Ca[Qa])&&oa.push(Ca[Qa]);oa.sort();Z.isSelectionEmpty()?P(oa):P(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,ta);Z.model.addListener(mxEvent.CHANGE,ta);Z.addListener(mxEvent.REFRESH,ta);var Na=document.createElement("div");Na.style.boxSizing="border-box";Na.style.whiteSpace="nowrap";Na.style.position="absolute";Na.style.overflow="hidden";Na.style.bottom="0px";Na.style.height="42px";Na.style.right=
"10px";Na.style.left="10px";Z.isEnabled()&&(Na.appendChild(sa),Na.appendChild(Ba),va.appendChild(Na));return{div:va,refresh:ta}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var J in Graph.customFontElements){var N=Graph.customFontElements[J];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,J){Graph.addFont(u,J);document.execCommand("fontname",!1,u);if(null!=J){var N=this.cellEditor.textarea.getElementsByTagName("font");J=Graph.getFontUrl(u,
J);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==u&&N[W].getAttribute("data-font-src")!=J&&N[W].setAttribute("data-font-src",J)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=u)for(var J in u)this.globalVars[J]=u[J]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var J=Y.apply(this,arguments);null==J&&null!=this.globalVars&&(J=this.globalVars[u]);return J};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na){var Ca=null,Qa=null,Ta=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ka=qa.apply(this,arguments),bb=this.getCustomFonts();if(sa&&0<bb.length){var Ua=Ka.ownerDocument,$a=null!=Ua.createElementNS?Ua.createElementNS(mxConstants.NS_SVG,"style"):Ua.createElement("style");null!=Ua.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var T=
-bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+T+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Ua.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return Ka};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,S,P,Z,oa,va,Aa,sa,Ba,ta,Na){var Ca=null,Qa=null,Ua=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Ua=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ka=qa.apply(this,arguments),bb=this.getCustomFonts();if(sa&&0<bb.length){var Va=Ka.ownerDocument,$a=null!=Va.createElementNS?Va.createElementNS(mxConstants.NS_SVG,"style"):Va.createElement("style");null!=Va.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var T=
+bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+T+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Va.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return Ka};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;
u.drawText=function(N,W){if(null!=N.text&&null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var S=N.text.getContentNode();if(null!=S){S=S.cloneNode(!0);if(S.getElementsByTagNameNS)for(var P=S.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<P.length;)P[0].parentNode.removeChild(P[0]);null!=S.innerHTML&&(P=N.text.value,N.text.value=S.innerHTML,J.apply(this,arguments),N.text.value=P)}}else J.apply(this,arguments)}}return u};
var X=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(u){X.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ea.apply(this,arguments);this.enumerationState=0};var ka=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=
function(u){null!=u.shape&&this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var J="1"==mxUtils.getValue(u.style,"enumerate",0);J&&null==u.secondLabel?
@@ -3318,113 +3319,113 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var J=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?J="mxgraph.er":"sysML"==u.substring(0,5)&&(J="mxgraph.sysml"));return J};var Q=mxMarker.createMarker;mxMarker.createMarker=function(u,J,N,W,S,P,Z,oa,va,Aa){if(null!=N&&null==mxMarker.markers[N]){var sa=this.getPackageForType(N);null!=sa&&mxStencilRegistry.getStencil(sa)}return Q.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
-function(u,J,N,W,S,P){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){ta.value=Math.max(1,Math.min(oa,Math.max(parseInt(ta.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(ta.value),parseInt(Ba.value))))}function W(Fa){function Ma(cb,gb,tb){var qb=cb.useCssTransforms,yb=cb.currentTranslate,ub=cb.currentScale,
-vb=cb.view.translate,wb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var lb=cb.getGraphBounds(),kb=0,fb=0,mb=ua.get(),xb=1/cb.pageScale,rb=Ka.checked;if(rb){xb=parseInt(ma.value);var zb=parseInt(pa.value);xb=Math.min(mb.height*zb/(lb.height/cb.view.scale),mb.width*xb/(lb.width/cb.view.scale))}else xb=parseInt(Ta.value)/(100*cb.pageScale),isNaN(xb)&&(Oa=1/cb.pageScale,Ta.value="100 %");
-mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Oa);mb.height=Math.ceil(mb.height*Oa);xb*=Oa;!rb&&cb.pageVisible?(lb=cb.getPageLayout(),kb-=lb.x*mb.width,fb-=lb.y*mb.height):rb=!0;if(null==gb){gb=PrintDialog.createPrintPreview(cb,xb,mb,0,kb,fb,rb);gb.pageSelector=!1;gb.mathEnabled=!1;Na.checked&&(gb.isCellVisible=function(nb){return cb.isCellSelected(nb)});kb=u.getCurrentFile();null!=kb&&(gb.title=kb.getTitle());var Bb=gb.writeHead;gb.writeHead=function(nb){Bb.apply(this,arguments);if(mxClient.IS_GC||
-mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?
-nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=gb.renderPage;gb.renderPage=function(nb,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
-var B=Ab.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;fb=S.shapeForegroundColor;rb=S.shapeBackgroundColor;mb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(kb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());gb.open(null,null,tb,!0);S.enableFlowAnimation=mb;null!=kb&&
-(S.shapeForegroundColor=fb,S.shapeBackgroundColor=rb,S.stylesheet=kb,S.refresh())}else{mb=cb.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";gb.backgroundColor=mb;gb.autoOrigin=rb;gb.appendGraph(cb,xb,kb,fb,tb,!0);tb=cb.getCustomFonts();if(null!=gb.wnd)for(kb=0;kb<tb.length;kb++)fb=tb[kb].name,rb=tb[kb].url,Graph.isCssFontUrl(rb)?gb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(gb.wnd.document.writeln('<style type="text/css">'),
-gb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),gb.wnd.document.writeln("</style>"))}qb&&(cb.useCssTransforms=qb,cb.currentTranslate=yb,cb.currentScale=ub,cb.view.translate=vb,cb.view.scale=wb);return gb}var Oa=parseInt(ya.value)/100;isNaN(Oa)&&(Oa=1,ya.value="100 %");Oa*=.75;var Pa=null,Sa=S.shapeForegroundColor,za=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(Pa=S.stylesheet,S.stylesheet=
-S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());var wa=Ba.value,Ea=ta.value,Da=!Aa.checked,La=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,wa,Ea,Ka.checked,ma.value,pa.value,parseInt(Ta.value)/100,parseInt(ya.value)/100,ua.get());else{Da&&(Da=Na.checked||wa==va&&Ea==va);if(!Da&&null!=u.pages&&u.pages.length){var Za=0;Da=u.pages.length-1;Aa.checked||(Za=parseInt(wa)-1,Da=parseInt(Ea)-1);for(var Va=Za;Va<=Da;Va++){var eb=
-u.pages[Va];wa=eb==u.currentPage?S:null;if(null==wa){wa=u.createTemporaryGraph(S.stylesheet);wa.shapeForegroundColor=S.shapeForegroundColor;wa.shapeBackgroundColor=S.shapeBackgroundColor;Ea=!0;Za=!1;var jb=null,hb=null;null==eb.viewState&&null==eb.root&&u.updatePageRoot(eb);null!=eb.viewState&&(Ea=eb.viewState.pageVisible,Za=eb.viewState.mathEnabled,jb=eb.viewState.background,hb=eb.viewState.backgroundImage,wa.extFonts=eb.viewState.extFonts);null!=hb&&null!=hb.originalSrc&&(hb=u.createImageForPageLink(hb.originalSrc,
-eb));wa.background=jb;wa.backgroundImage=null!=hb?new mxImage(hb.src,hb.width,hb.height,hb.x,hb.y):null;wa.pageVisible=Ea;wa.mathEnabled=Za;var ob=wa.getGraphBounds;wa.getGraphBounds=function(){var cb=ob.apply(this,arguments),gb=this.backgroundImage;if(null!=gb&&null!=gb.width&&null!=gb.height){var tb=this.view.translate,qb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((tb.x+gb.x)*qb,(tb.y+gb.y)*qb,gb.width*qb,gb.height*qb))}return cb};var pb=wa.getGlobalVariable;wa.getGlobalVariable=
-function(cb){return"page"==cb?eb.getName():"pagenumber"==cb?Va+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:pb.apply(this,arguments)};document.body.appendChild(wa.container);u.updatePageRoot(eb);wa.model.setRoot(eb.root)}La=Ma(wa,La,Va!=Da);wa!=S&&wa.container.parentNode.removeChild(wa.container)}}else La=Ma(S);null==La?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(La.mathEnabled&&(Da=La.wnd.document,Fa&&(La.wnd.IMMEDIATE_PRINT=!0),Da.writeln('<script type="text/javascript" src="'+
+function(u,J,N,W,S,P){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){ta.value=Math.max(1,Math.min(oa,Math.max(parseInt(ta.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(ta.value),parseInt(Ba.value))))}function W(Fa){function Ma(cb,hb,lb){var rb=cb.useCssTransforms,vb=cb.currentTranslate,ob=cb.currentScale,
+Ab=cb.view.translate,Bb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var ub=cb.getGraphBounds(),kb=0,eb=0,mb=ua.get(),wb=1/cb.pageScale,pb=Ka.checked;if(pb){wb=parseInt(ma.value);var xb=parseInt(pa.value);wb=Math.min(mb.height*xb/(ub.height/cb.view.scale),mb.width*wb/(ub.width/cb.view.scale))}else wb=parseInt(Ua.value)/(100*cb.pageScale),isNaN(wb)&&(Oa=1/cb.pageScale,Ua.value="100 %");
+mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Oa);mb.height=Math.ceil(mb.height*Oa);wb*=Oa;!pb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*mb.width,eb-=ub.y*mb.height):pb=!0;if(null==hb){hb=PrintDialog.createPrintPreview(cb,wb,mb,0,kb,eb,pb);hb.pageSelector=!1;hb.mathEnabled=!1;Na.checked&&(hb.isCellVisible=function(nb){return cb.isCellSelected(nb)});kb=u.getCurrentFile();null!=kb&&(hb.title=kb.getTitle());var zb=hb.writeHead;hb.writeHead=function(nb){zb.apply(this,arguments);if(mxClient.IS_GC||
+mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),m=0;m<c.length;m++){var x=c[m].name,p=c[m].url;Graph.isCssFontUrl(p)?
+nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=hb.renderPage;hb.renderPage=function(nb,c,m,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
+var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;eb=S.shapeForegroundColor;pb=S.shapeBackgroundColor;mb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(kb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());hb.open(null,null,lb,!0);S.enableFlowAnimation=mb;null!=kb&&
+(S.shapeForegroundColor=eb,S.shapeBackgroundColor=pb,S.stylesheet=kb,S.refresh())}else{mb=cb.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";hb.backgroundColor=mb;hb.autoOrigin=pb;hb.appendGraph(cb,wb,kb,eb,lb,!0);lb=cb.getCustomFonts();if(null!=hb.wnd)for(kb=0;kb<lb.length;kb++)eb=lb[kb].name,pb=lb[kb].url,Graph.isCssFontUrl(pb)?hb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(pb)+'" charset="UTF-8" type="text/css">'):(hb.wnd.document.writeln('<style type="text/css">'),
+hb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(pb)+'");\n}'),hb.wnd.document.writeln("</style>"))}rb&&(cb.useCssTransforms=rb,cb.currentTranslate=vb,cb.currentScale=ob,cb.view.translate=Ab,cb.view.scale=Bb);return hb}var Oa=parseInt(ya.value)/100;isNaN(Oa)&&(Oa=1,ya.value="100 %");Oa*=.75;var Pa=null,Sa=S.shapeForegroundColor,za=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(Pa=S.stylesheet,S.stylesheet=
+S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());var wa=Ba.value,Da=ta.value,Ea=!Aa.checked,La=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,wa,Da,Ka.checked,ma.value,pa.value,parseInt(Ua.value)/100,parseInt(ya.value)/100,ua.get());else{Ea&&(Ea=Na.checked||wa==va&&Da==va);if(!Ea&&null!=u.pages&&u.pages.length){var Ta=0;Ea=u.pages.length-1;Aa.checked||(Ta=parseInt(wa)-1,Ea=parseInt(Da)-1);for(var Wa=Ta;Wa<=Ea;Wa++){var fb=
+u.pages[Wa];wa=fb==u.currentPage?S:null;if(null==wa){wa=u.createTemporaryGraph(S.stylesheet);wa.shapeForegroundColor=S.shapeForegroundColor;wa.shapeBackgroundColor=S.shapeBackgroundColor;Da=!0;Ta=!1;var gb=null,ib=null;null==fb.viewState&&null==fb.root&&u.updatePageRoot(fb);null!=fb.viewState&&(Da=fb.viewState.pageVisible,Ta=fb.viewState.mathEnabled,gb=fb.viewState.background,ib=fb.viewState.backgroundImage,wa.extFonts=fb.viewState.extFonts);null!=ib&&null!=ib.originalSrc&&(ib=u.createImageForPageLink(ib.originalSrc,
+fb));wa.background=gb;wa.backgroundImage=null!=ib?new mxImage(ib.src,ib.width,ib.height,ib.x,ib.y):null;wa.pageVisible=Da;wa.mathEnabled=Ta;var tb=wa.getGraphBounds;wa.getGraphBounds=function(){var cb=tb.apply(this,arguments),hb=this.backgroundImage;if(null!=hb&&null!=hb.width&&null!=hb.height){var lb=this.view.translate,rb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((lb.x+hb.x)*rb,(lb.y+hb.y)*rb,hb.width*rb,hb.height*rb))}return cb};var qb=wa.getGlobalVariable;wa.getGlobalVariable=
+function(cb){return"page"==cb?fb.getName():"pagenumber"==cb?Wa+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:qb.apply(this,arguments)};document.body.appendChild(wa.container);u.updatePageRoot(fb);wa.model.setRoot(fb.root)}La=Ma(wa,La,Wa!=Ea);wa!=S&&wa.container.parentNode.removeChild(wa.container)}}else La=Ma(S);null==La?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(La.mathEnabled&&(Ea=La.wnd.document,Fa&&(La.wnd.IMMEDIATE_PRINT=!0),Ea.writeln('<script type="text/javascript" src="'+
DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),La.closeDocument(),!La.mathEnabled&&Fa&&PrintDialog.printPreview(La));null!=Pa&&(S.shapeForegroundColor=Sa,S.shapeBackgroundColor=za,S.stylesheet=Pa,S.refresh())}}var S=u.editor.graph,P=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,J||mxResources.get("print"));P.appendChild(Z);var oa=1,va=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
var Aa=document.createElement("input");Aa.style.cssText="margin-right:8px;margin-bottom:8px;";Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.setAttribute("name","pages-printdialog");Z.appendChild(Aa);J=document.createElement("span");mxUtils.write(J,mxResources.get("printAllPages"));Z.appendChild(J);mxUtils.br(Z);var sa=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");sa.setAttribute("value","range");Z.appendChild(sa);J=document.createElement("span");mxUtils.write(J,mxResources.get("pages")+
":");Z.appendChild(J);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("type","number");Ba.setAttribute("min","1");Ba.style.width="50px";Z.appendChild(Ba);J=document.createElement("span");mxUtils.write(J,mxResources.get("to"));Z.appendChild(J);var ta=Ba.cloneNode(!0);Z.appendChild(ta);mxEvent.addListener(Ba,"focus",function(){sa.checked=!0});mxEvent.addListener(ta,"focus",function(){sa.checked=!0});mxEvent.addListener(Ba,"change",
N);mxEvent.addListener(ta,"change",N);if(null!=u.pages&&(oa=u.pages.length,null!=u.currentPage))for(J=0;J<u.pages.length;J++)if(u.currentPage==u.pages[J]){va=J+1;Ba.value=va;ta.value=va;break}Ba.setAttribute("max",oa);ta.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(P.appendChild(Z),sa.checked=!0):sa.checked=!0;mxUtils.br(Z);var Na=document.createElement("input");Na.setAttribute("value","all");Na.setAttribute("type","radio");Na.style.marginRight="8px";S.isSelectionEmpty()&&Na.setAttribute("disabled",
"disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Na.setAttribute("type","checkbox"),Na.style.marginBottom="12px",Ca.appendChild(Na)):(Na.setAttribute("name","pages-printdialog"),Na.style.marginBottom="8px",Z.appendChild(Na));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Na.parentNode.appendChild(J);1==oa&&mxUtils.br(Na.parentNode);var Qa=document.createElement("input");Qa.style.marginRight="8px";Qa.setAttribute("value","adjust");
-Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));Ca.appendChild(J);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width="50px";Ca.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Qa.checked=!0});P.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Qa.cloneNode(!0);Ka.setAttribute("value","fit");Qa.setAttribute("checked",
-"checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ka);Z.appendChild(J);Ca=document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Ua=document.createElement("tr"),$a=Ua.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),T=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";T.style.textAlign="right";mxUtils.write(z,
+Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));Ca.appendChild(J);var Ua=document.createElement("input");Ua.style.cssText="margin:0 8px 0 8px;";Ua.setAttribute("value","100 %");Ua.style.width="50px";Ca.appendChild(Ua);mxEvent.addListener(Ua,"focus",function(){Qa.checked=!0});P.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Qa.cloneNode(!0);Ka.setAttribute("value","fit");Qa.setAttribute("checked",
+"checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ka);Z.appendChild(J);Ca=document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Va=document.createElement("tr"),$a=Va.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),T=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";T.style.textAlign="right";mxUtils.write(z,
mxResources.get("fitTo"));var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";L.appendChild(ma);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(T,mxResources.get("fitToBy"));var pa=ma.cloneNode(!0);ca.appendChild(pa);mxEvent.addListener(ma,"focus",function(){Ka.checked=!0});mxEvent.addListener(pa,
-"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Ua.appendChild(z);Ua.appendChild(L);Ua.appendChild(M);$a.appendChild(T);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Ua);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);P.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));
+"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Va.appendChild(z);Va.appendChild(L);Va.appendChild(M);$a.appendChild(T);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Va);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);P.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));
Z.appendChild(J);J=document.createElement("div");J.style.marginBottom="12px";var ua=PageSetupDialog.addPageFormatPanel(J,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(J);J=document.createElement("span");mxUtils.write(J,mxResources.get("pageScale"));Z.appendChild(J);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","100 %");ya.style.width="60px";Z.appendChild(ya);P.appendChild(Z);J=document.createElement("div");
J.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&J.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){S.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",J.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",J.appendChild(Ca));
Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";J.appendChild(Ca);u.editor.cancelFirst||J.appendChild(Z);P.appendChild(J);this.container=P};var fa=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 u=
this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}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 fa.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 la=document.createElement("canvas"),ra=new Image;ra.onload=function(){try{la.getContext("2d").drawImage(ra,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};ra.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,y,E){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{E||null==window.console||console.error(y,d,f,g,m,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+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,l,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=l?":colno:"+
+encodeURIComponent(l):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||null==window.console||console.error(y,d,f,g,l,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var q=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var m=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var l=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var l=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(l&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=H.substring(H.length-3,H.length)&&"!"!=H.charAt(H.length-1)&&(H+="..."),G.innerHTML=H,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,H)}));this.stop();return aa}),G=!0);return G};var E=q.stop;q.stop=function(){E.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=H.substring(H.length-3,H.length)&&"!"!=H.charAt(H.length-1)&&(H+="..."),G.innerHTML=H,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,H)}));this.stop();return aa}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var E=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<E&&q.movePage(E,E-1)};if(38==y.keyCode)return function(){0<E&&q.movePage(E,0)};if(39==y.keyCode)return function(){E<q.pages.length-1&&q.movePage(E,
-E+1)};if(40==y.keyCode)return function(){E<q.pages.length-1&&q.movePage(E,q.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<E&&q.selectNextPage(!1)};if(38==y.keyCode)return function(){0<E&&q.selectPage(q.pages[0])};if(39==y.keyCode)return function(){E<q.pages.length-1&&q.selectNextPage(!0)};if(40==y.keyCode)return function(){E<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
-var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var m=d.lastIndexOf("&lt;/mxfile&gt;");m>g&&(f=d.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
-y?mxUtils.getXml(y):""}}catch(E){}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,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,l=this.editor.graph,q=this;f.getFunction=function(y){if(l.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
+F+1)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,q.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<F&&q.selectNextPage(!1)};if(38==y.keyCode)return function(){0<F&&q.selectPage(q.pages[0])};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.selectNextPage(!0)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
+var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var l=d.lastIndexOf("&lt;/mxfile&gt;");l>g&&(f=d.substring(g,l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
+y?mxUtils.getXml(y):""}}catch(F){}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,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=l.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(l[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y: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(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,y,E,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
+function(d,f,g,l,q,y,F,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=l;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(qa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
-aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(E||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),aa=this.getEmbeddedSvg(aa,f,m,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
-m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
-Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],E=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(E);mxUtils.setTextContent(E,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
-y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),E=E.cloneNode(!1),mxUtils.setTextContent(E,
-Graph.compressNode(C))));d(E)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],m=0;m<d.length;m++){var q=d.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
-function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var m in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][m];null!=q.name&&
-(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(y){var E=q.cells[y];if(null!=E){for(var C in E)null!=E[C].value&&(E[C].value="["+E[C].value.length+"]"),null!=E[C].xmlValue&&(E[C].xmlValue="["+E[C].xmlValue.length+"]"),null!=E[C].style&&(E[C].style="["+E[C].style.length+"]"),mxUtils.isEmptyObject(E[C])&&delete E[C];mxUtils.isEmptyObject(E)&&delete q.cells[y]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
-delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
+aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),aa=this.getEmbeddedSvg(aa,f,l,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,l){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+l);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,l);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else l&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
+y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,l),F=F.cloneNode(!1),mxUtils.setTextContent(F,
+Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],l=0;l<d.length;l++){var q=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
+function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var l in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][l];null!=q.name&&
+(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(y){var F=q.cells[y];if(null!=F){for(var C in F)null!=F[C].value&&(F[C].value="["+F[C].value.length+"]"),null!=F[C].xmlValue&&(F[C].xmlValue="["+F[C].xmlValue.length+"]"),null!=F[C].style&&(F[C].style="["+F[C].style.length+"]"),mxUtils.isEmptyObject(F[C])&&delete F[C];mxUtils.isEmptyObject(F)&&delete q.cells[y]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
+delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,E,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
-da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(O){return"page"==O?qa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}E=null!=E?E:this.getXmlFileData(q,y,
-G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(E,da,H,window.location.href,d,f,g,m,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var E=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){E=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(E.x/H-f.view.translate.x);H=Math.floor(E.y/H-f.view.translate.y);E=f.background;null==
-q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
-return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=E&&E!=mxConstants.NONE?' style="background-color:'+E+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
-m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,l,q,y,F,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
+da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(O){return"page"==O?qa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
+G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(F,da,H,window.location.href,d,f,g,l,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,l,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(F.x/H-f.view.translate.x);H=Math.floor(F.y/H-f.view.translate.y);F=f.background;null==
+q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}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!=l&&d.setAttribute("edit",l));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));
+return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
+l+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,l,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),
-"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+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 q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
-E=y.getChildren(y.root);for(m=0;m<E.length;m++){var C=E[m];y.setVisible(C,f[C.id]||!1)}}catch(H){}};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,m,q,y,E,C,H,G,aa,da){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),f=new DiagramPage(d[l]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[l+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 q=urlParams["layer-ids"].split(" ");f={};for(l=0;l<q.length;l++)f[q[l]]=!0;var y=this.editor.graph.getModel(),
+F=y.getChildren(y.root);for(l=0;l<F.length;l++){var C=F[l];y.setVisible(C,f[C.id]||!1)}}catch(H){}};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,l,q,y,F,C,H,G,aa,da){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
ba),this.saveData(Y,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(H);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var X=this.editor.graph,ea=X.getGraphBounds();var ka=Math.ceil(ea.width*C/X.view.scale+2*O);var ja=Math.ceil(ea.height*C/X.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(R,
-fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,m,fa,E,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
-if(E||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,E,C,H,
+fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,l,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
+if(F||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),l)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,l,q,y,F,C,H,
G,aa,da,ba){var Y=this.editor.graph,qa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",X="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?X="&from="+aa.from+"&to="+aa.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=E?"&scale="+E:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var E=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<E.length&&(E+="\n"),E+=y);y=new LocalFile(this,"csv"!=d.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(E,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+l+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var l=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return l};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var E=null;try{for(d=
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){l.alert(ja.tooltip)});return U}var g=null,l=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var H=d.getAttribute("value");if(null!=H){var G=mxUtils.parseXml(H).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,da=0;da<aa.length;da++)q.setAttributeForCell(C,aa[da].nodeName,0<aa[da].nodeValue.length?aa[da].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Y=d.getAttribute("icon");if(null!=Y){var qa=0<Y.length?JSON.parse(Y):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in O){var ea=parseFloat(O[key]);
"dx"==key?X.x+=ea:"dy"==key?X.y+=ea:"dw"==key?X.width+=ea:"dh"==key?X.height+=ea:X[key]=parseFloat(O[key])}q.model.setGeometry(C,X)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
-d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(E=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=E&&this.chromelessResize&&this.chromelessResize(!0,E)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
-g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),E=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+E+"-"+C+"-"+q))}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 m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=g.lastIndexOf(".");0<=l&&(d=g.substring(l),g=
+g.substring(0,l));if(f){f=g;var q=new Date;g=q.getFullYear();l=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+l+"-"+y+"-"+F+"-"+C+"-"+q))}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 l=!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 q=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.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
-if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+E.message,label:"stack_"+
-E.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(E,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
-var E=d[y].node.cloneNode(!1);E.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");E.appendChild(C);null!=f&&(f.eltCount+=E.getElementsByTagName("*").length,f.nodeCount+=E.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(E,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
-"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,E=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=E&&(m^=this.hashValue(y,
-f,g)+this.hashValue(E,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,E){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));l=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return l};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,l=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");l.root=d[y].root;var C=q.encode(l);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
+"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(l^=this.hashValue(y,
+f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)l=(l<<5)-l+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;l^=f}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,l,q,y,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,E=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});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 C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(ka){E(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;m=H.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);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";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
+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 l=g.previousSibling;f.insertBefore(g,d);f.insertBefore(l,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,l,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});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 C=this.sidebar.addPalette(d.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;l=H.getAttribute("title");
+null!=l&&0<l.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);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";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var da=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Y=null,qa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),O=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=aa.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,
G.firstChild),H.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),H.style.paddingRight=18*G.childNodes.length+"px")})):null==da&&(da=aa.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),G.insertBefore(da,G.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
@@ -3434,175 +3435,175 @@ U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x
mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ea(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility=
"visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,
this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,Q,R,fa,la,ra){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,Q,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,Q,R),ka,mxEvent.isAltDown(ka)?null:fa.substring(0,fa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,J=
-mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(N.documentElement));E(S,C);f=f.concat(S);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var P=N.documentElement.getElementsByTagName("diagram");for(S=0;S<P.length;S++){var Z=this.stringToCells(Editor.getDiagramNodeXml(P[S])),
+mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(N.documentElement));F(S,C);f=f.concat(S);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var P=N.documentElement.getElementsByTagName("diagram");for(S=0;S<P.length;S++){var Z=this.stringToCells(Editor.getDiagramNodeXml(P[S])),
oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=ra&&null!=fa&&(/(\.v(dx|sdx?))($|\?)/i.test(fa)||/(\.vs(x|sx?))($|\?)/i.test(fa))?this.importVisio(ra,function(N){J(N,"text/xml")},null,fa):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(ja,fa)&&null!=ra?this.isExternalDataComms()?this.parseFile(ra,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?J(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):J(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
-mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
-G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}H.appendChild(G);H.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
-m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});l=aa.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));G.insertBefore(l,
+G.firstChild);mxEvent.addListener(l,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(l,G.firstChild))}H.appendChild(G);H.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var l=d[g],q=l.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(q=this.stringToCells(Graph.decompress(l.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
+l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,y,E){d=new ImageDialog(this,d,f,g,m,q,y,E);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&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);
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,l,q,y,F){d=new ImageDialog(this,d,f,g,l,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,l){l||(g=new ChangePageSetup(this,null,g),
+g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,l,q){d=new LibraryDialog(this,d,f,g,l,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=
-f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,E){var C=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{E?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(Y){}if(null!=H||null!=f){E=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=H){null!=
-H.retry&&(G=mxResources.get("cancel"),aa=function(){C();H.retry()});if(404==H.code||404==H.status||403==H.code){E=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=q?null:null!=y?y:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
-da.substring(0,45))&&(null!=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==H.code||404==H.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,E,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(d,f,g,
-m,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
+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(l){l.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,l,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?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(Y){}if(null!=H||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=H){null!=
+H.retry&&(G=mxResources.get("cancel"),aa=function(){C();H.retry()});if(404==H.code||404==H.status||403==H.code){F=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=q?null:null!=y?y:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+da.substring(0,45))&&(null!=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==H.code||404==H.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(d,f,g,
+l,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
ea.appendChild(ja)}var qa=this.drive.getUsersList(),O=document.createElement("div"),X=document.createElement("span");X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");O.appendChild(X);var ea=document.createElement("select");ea.style.width="200px";Y();mxEvent.addListener(ea,"change",mxUtils.bind(this,function(){var ka=ea.value,ja=qa.length!=ka;ja&&this.drive.setUser(qa[ka]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,
-function(U){this.handleError(U)}),!0)}));O.appendChild(ea);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=H.message?E=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name):mxUtils.htmlEntities(H.message):null!=H.response&&null!=H.response.error?E=mxUtils.htmlEntities(H.response.error):
-"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?E=mxUtils.htmlEntities(mxResources.get("timeout")):H.code==App.ERROR_BUSY?E=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof H&&0<H.length&&(E=mxUtils.htmlEntities(H)))}var ba=y=null;null!=H&&null!=H.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):null!=H&&null!=H.ownerEmail&&(y=mxResources.get("contactOwner"),E+=mxUtils.htmlEntities(" ("+y+": "+H.ownerEmail+
-")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,E,G,g,aa,null,null,y,ba,null,null,null,m?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,m,q,y){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
-50));d=new ConfirmDialog(this,d,function(){E();null!=f&&f()},function(){E();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+function(U){this.handleError(U)}),!0)}));O.appendChild(ea);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=H.message?F=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name):mxUtils.htmlEntities(H.message):null!=H.response&&null!=H.response.error?F=mxUtils.htmlEntities(H.response.error):
+"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):H.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof H&&0<H.length&&(F=mxUtils.htmlEntities(H)))}var ba=y=null;null!=H&&null!=H.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):null!=H&&null!=H.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+H.ownerEmail+
+")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,F,G,g,aa,null,null,y,ba,null,null,null,l?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,l,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
+50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},l,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,l){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var E=document.createElement("input");
-E.setAttribute("type","checkbox");E.setAttribute("id","geDoNotShowAgainCheckbox");E.style.marginRight="6px";if(!m){f.appendChild(E);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,E.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);H()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){H()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var da=mxEvent.getSource(aa);da!=E&&da!=C?(null!=g&&g(),H(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
-/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
-g,m);else{var E=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof E.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){E.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?E.download=f:E.setAttribute("target","_blank");document.body.appendChild(E);try{window.setTimeout(function(){URL.revokeObjectURL(E.href)},
-2E4),E.click(),E.parentNode.removeChild(E)}catch(H){}}else this.createEchoRequest(d,f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),
-y=0;y<m;++y){for(var E=1024*y,C=Math.min(E+1024,g),H=Array(C-E),G=0;E<C;++G,++E)H[G]=d[E].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,E,C){y=null!=y?y:!1;E=null!=E?E:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,E,null,1<q,H,d,g,m);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?m.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=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(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
+q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");
+F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!l){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);H()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){H()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var da=mxEvent.getSource(aa);da!=F&&da!=C?(null!=g&&g(),H(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,l){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
+"tEXt","mxfile",encodeURIComponent(f))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,l,q){var y="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(l,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,l,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
+/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
+g,l);else{var F=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(l?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},
+2E4),F.click(),F.parentNode.removeChild(F)}catch(H){}}else this.createEchoRequest(d,f,g,l,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,l,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,l=Math.ceil(g/1024),q=Array(l),
+y=0;y<l;++y){for(var F=1024*y,C=Math.min(F+1024,g),H=Array(C-F),G=0;F<C;++G,++F)H[G]=d[F].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,l,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,l,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,l,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,F,null,1<q,H,d,g,l);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?l.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+
+f+";base64,"+d+'"/></html>')):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var n=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(l){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();f.style.display=0<l.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(m){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+function(l){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=y.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=y.zIndex;var E=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});E.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){E.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
+this.exportDialog.style.zIndex=y.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",H);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(H.substring(H.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,E){return this.createEchoRequest(g,y,m,q,f,E)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,E){E=null!=E?E:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,aa,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,l,q){this.isLocalFileSave()?this.saveLocalFile(g,d,l,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,l,q,f,F)}),g,q,l)};EditorUi.prototype.saveRequest=function(d,f,g,l,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=l)try{this.exportFile(l,G,y,!0,aa,
ba)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),G,y,!0,aa,ba)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
-!1,!1,E,null,1<C,H,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!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,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,E,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);m&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
+!1,!1,F,null,1<C,H,l,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!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,l,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
+g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);l&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var ka=mxUtils.bind(this,function(U){this.spinner.stop();q&&U.setAttribute("content",this.getFileData(!0,null,null,null,g,H,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ja=mxUtils.bind(this,function(U){y?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,E){return this.addCheckbox(d,g,m,q,y,E,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,E,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",E?"radio":"checkbox");E="geCheckbox-"+Editor.guid();
-H.id=E;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);m&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",E),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=
-App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,
-"change",mxUtils.bind(this,function(){if("custom"==y.value){var E=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
+(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,l,q,y,F){return this.addCheckbox(d,g,l,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();
+H.id=F;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);l&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var l=this.getCurrentFile(),q="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=
+App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));y.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");y.appendChild(l);d.appendChild(y);mxEvent.addListener(y,
+"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");E.innerHTML="";E.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);
-q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",E=null;E=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
-mxEvent.consume(C)}));g();E.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";E.style.marginLeft="4px";E.style.height="22px";E.style.width="22px";E.style.position="relative";E.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";E.className="geColorBtn";d.appendChild(E);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,E){E=null!=E?E:[];m&&("https://viewer.diagrams.net"==
-EditorUi.lightboxHost&&"1"!=urlParams.dev||E.push("lightbox=1"),"auto"!=d&&E.push("target="+d),null!=f&&f!=mxConstants.NONE&&E.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&E.push("edit="+encodeURIComponent(q)),y&&E.push("layers=1"),this.editor.graph.foldingEnabled&&E.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&E.push("page-id="+this.currentPage.getId());return E};EditorUi.prototype.createLink=function(d,f,g,m,q,y,E,C,
-H,G){H=this.createUrlParameters(d,f,g,m,q,y,H);d=this.getCurrentFile();f=!0;null!=E?g="#U"+encodeURIComponent(E):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
-g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,E,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==m&&(ba.target=m);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
-100==g||(ba.zoom=g/100);g=[];E&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");H&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!E);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");
-q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var E=document.createElement("div");E.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
-"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");E.appendChild(y);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));E.appendChild(H);mxUtils.br(E);E.appendChild(C);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));E.appendChild(H);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(H=document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor=
-"pointer",mxUtils.write(H,mxResources.get("share")),E.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(E);var aa=this.addLinkSection(q),da=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
-"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),E,!E),O=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;E=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
-ja.style.marginBottom="16px";E+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
-this.showDialog(d.container,340,E,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,E,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)E=null!=E?E:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
-else{d=80;E=null!=E?E:"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 da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
+"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));l.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));l.appendChild(q);
+q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));l.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(f));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
+mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,l,q,y,F){F=null!=F?F:[];l&&("https://viewer.diagrams.net"==
+EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,l,q,y,F,C,
+H,G){H=this.createUrlParameters(d,f,g,l,q,y,H);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
+g.substring(1)),g="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,l,q,y,F,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==l&&(ba.target=l);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
+100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");H&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,l){var q=document.createElement("div");
+q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
+"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(H);mxUtils.br(F);F.appendChild(C);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));F.appendChild(H);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(H=document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor=
+"pointer",mxUtils.write(H,mxResources.get("share")),F.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var aa=this.addLinkSection(q),da=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
+"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),O=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;F=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
+ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){l(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
+this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,l,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
+else{d=80;F=null!=F?F:"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 da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,
-null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
-":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
+null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=l)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=l+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
X.style.marginLeft,X.style.display="none",d-=20);var ja=this.addCheckbox(H,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(H,mxResources.get("tags"),!0);U.style.marginLeft=ka.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
-ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),E,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
-!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var E=document.createElement("h3");mxUtils.write(E,mxResources.get("image"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(E);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
-C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);E=this.editor.graph;var da=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),E.background==mxConstants.NONE||null==E.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,m,q,y,E,C,H){E=null!=E?E:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
+ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
+!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,l,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
+C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=l?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram);F=this.editor.graph;var da=l?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(d,f,g,l,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
"4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight=
"8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}H?(mxUtils.write(G,mxResources.get("size")+
":"),G.appendChild(ea),mxUtils.br(G),da+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(O.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),da+=30,mxEvent.addListener(O,"change",function(){O.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?H&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",da-=30):(ea.value="diagram",X.setAttribute("checked",
"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),Q=null;if("png"==C||"jpeg"==C)Q=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
-this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),E,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(fa.checked=!0,
fa.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",ra.style.display="none"):"disabled"==fa.getAttribute("disabled")&&(fa.checked=!1,fa.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",ra.style.display="")}));f&&(G.appendChild(fa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var ra=document.createElement("select");ra.style.maxWidth="260px";ra.style.marginLeft="8px";ra.style.marginRight="10px";ra.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ra.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ra.appendChild(f);f=document.createElement("option");
f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ra.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(ra),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
-V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var E=this.editor.graph;
-if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),E.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<E.model.getChildCount(E.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
+V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,l);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,l,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
+if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&l,!l),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
qa,!qa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&da.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(H.checked,G.checked,aa.checked,
-da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,E,C){function H(Y){var qa=" ",O="";m&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');E('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=m?this.getFileData(!0):null;
-Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({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 da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
-ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,m,q,y,E){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}m&&
-C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";m&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
-"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){E('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),E(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
+da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,l,q,y,F,C){function H(Y){var qa=" ",O="";l&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=l?this.getFileData(!0):null;
+Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({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 da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
+ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,l,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}l&&
+C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";l&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
+"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",l&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};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 m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
-1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,E=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(E?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),y),C=g;else if(E||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(E?y.getDefaultStylesheet():y.getStylesheet());var H=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:H.apply(this,
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){g=l[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}l=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(f=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(g=l))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,l,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var H=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:H.apply(this,
arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(aa){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=aa.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(C));d(da.substring(da.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(aa){null!=
-f&&f(aa)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;E=null!=H?H:f.background;E==mxConstants.NONE&&(E=null);y=f.getSvg(E,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
-function(qa){qa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};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(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,E,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,E){f=null!=f?f:0;g=null!=g?g:0;var C=
+f&&f(aa)}),null,null,l,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;F=null!=H?H:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(qa){qa=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};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(l){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,l,null,null,y,F,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,l,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
[];try{var H=this.editor.graph;if(null!=d&&0<d.length){H.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var aa=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var da=aa.getElementsByTagName("diagram");if(1==da.length&&!y){if(aa=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=da[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),m=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
-O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}E&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};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(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),E=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),E=!0);E&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};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 m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var E=y.open.substring(y.open.indexOf(",")+1);g=d[E];null!=g?y.open="data:page/id,"+g:null==this.getPageById(E)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}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,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(E){this.handleError(E)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",H=m.lastIndexOf(".");if(0<=H&&H<m.length)C=m.substring(H+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:E?"remote":"local"})}catch(da){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",d,m);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
-null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,m)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
-new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(E)}else try{this.doImportVisio(d,f,g,m)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
-function(q){this.handleError(q)});var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};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 m=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var E=0;E<q.svgThumbs.length;E++)y.push(Editor.createSvgDataUri(q.svgThumbs[E]));null!=q.thumb&&y.push(q.thumb);
-console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(E){try{if(mxClient.IS_IE||mxClient.IS_IE11)E=
-E.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(E).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(E)),H,G)}else m({message:mxResources.get("invalidInput")})}catch(da){m(da)}})}catch(E){m(E)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
-C);C-=26;return 0==C?"-":1==C?"_":"?"}var E=new XMLHttpRequest;E.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(E.responseType="blob");E.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){m(ea)}};aa.src=H.result};H.onerror=function(G){m(G)}}else m(C)};
-E.onerror=function(C){m(C)};E.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,E,C){y=null!=y?y:!0;E=null!=E?E:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
+this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),l=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
+O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,l);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}F&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
+this.handleError(ja)}return C};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(l){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),l=this.editor.graph,q=l.getLinkForCell(f);null!=q&&l.setLinkForCell(f,this.updatePageLink(d,q));if(l.isHtmlLabel(f)){g.innerHTML=l.sanitizeHtml(l.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&l.labelChanged(f,g.innerHTML)}for(C=0;C<l.model.getChildCount(f);C++)this.updatePageLinksForCell(d,l.model.getChildAt(f,C))};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 l=JSON.parse(f.substring(17));if(null!=l.actions){for(var q=0;q<l.actions.length;q++){var y=l.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(l)}}catch(C){}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,l,q){l=null!=l?l:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(l);try{var C="UNKNOWN-VISIO",H=l.lastIndexOf(".");if(0<=H&&H<l.length)C=l.substring(H+1).toUpperCase();else{var G=l.lastIndexOf("/");0<=
+G&&G<l.length&&(l=l.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+l,label:F?"remote":"local"})}catch(da){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,l);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
+null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,l)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
+new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(F)}else try{this.doImportVisio(d,f,g,l)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
+function(q){this.handleError(q)});var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};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 l=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);
+console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,f,g,l){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=
+F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),H,G)}else l({message:mxResources.get("invalidInput")})}catch(da){l(da)}})}catch(F){l(F)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,l){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
+f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){l(ea)}};aa.src=H.result};H.onerror=function(G){l(G)}}else l(C)};
+F.onerror=function(C){l(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var l=this.editor.graph,q=null;l.getModel().beginUpdate();try{q=l.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(q,!0)}finally{l.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!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(ba){4==ba.readyState&&200<=ba.status&&299>=ba.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ba.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var H=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,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);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 aa=this.importXml(G,f,g,y,!0,C);if(0<aa.length)return aa}catch(ba){}this.loadImage(d,
-mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,X,ea){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),X,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),E,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Y);ba=Math.round(ba.height*
-Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(m?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
-Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));
+mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,X,ea){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),X,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Y);ba=Math.round(ba.height*
+Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(l?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));
H.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");q.value=d;H.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var da=H.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=da.width;q.geometry.height=da.height}Graph.isLink(q.value)&&H.setLinkForCell(q,q.value);q.geometry.width+=H.gridSize;q.geometry.height+=
H.gridSize}finally{H.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(E,C){StorageFile.listFiles(this,"F",E,C)});window.openBrowserFile=mxUtils.bind(this,function(E,C,H){StorageFile.getFileContent(this,E,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(E,C,H){StorageFile.deleteFile(this,E,C,H)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
-new OpenFile(mxUtils.bind(this,function(E){this.hideDialog(E)}));window.openFile.setConsumer(mxUtils.bind(this,function(E,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(E=new Blob([E],{type:"application/octet-stream"}),this.importVisio(E,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(E,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=m;y.apply(q,arguments);E&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var E=0,C,H=!1;y.forEach(function(G,aa){G=
-aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>E&&(E=G,C=aa))});0<E?C.async("string").then(function(G){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
-g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,E,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,E)):X=this.importXml(O,g,m,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
-C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=H&&null!=E&&(/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E))?(ba=!0,this.importVisio(H,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,E)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?qa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,E):this.parseFile(H,
-q,E)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(E)||/(\.vs(s|x))($|\?)/i.test(E)||(Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,E,C,H,G,aa,da,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.getFileContent(this,F,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.deleteFile(this,F,C,H)});if(!f){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=l;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var l=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,H=!1;y.forEach(function(G,aa){G=
+aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&l.isRemoteFileFormat(G,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
+g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,l,q,y,F,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):X=this.importXml(O,g,l,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
+C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,l,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),l=f.snap(l)),Y=[f.insertVertex(null,null,"",g,l,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=H&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(H,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?qa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(H,
+q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){l=null!=l?l:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,ra,u,J,N,W,S,P,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
la,S)),null):this.importFile(la,ra,u,J,N,W,S,P,Z,Y,da,ba)}catch(oa){return this.handleError(oa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,V=I,Q=[],R=mxUtils.bind(this,function(la,ra){Q[la]=ra;if(0==--V){this.spinner.stop();if(null!=C)C(Q);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<Q.length;la++){var J=Q[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
-fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var ra=d[la];if(null!=ra){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==E||E(ra))if("image/"==ra.type.substring(0,6))if("image/svg"==ra.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var S=mxUtils.parseXml(W);W=S.getElementsByTagName("svg");if(0<W.length){W=W[0];var P=da?null:W.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
+fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var ra=d[la];if(null!=ra){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(ra))if("image/"==ra.type.substring(0,6))if("image/svg"==ra.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var S=mxUtils.parseXml(W);W=S.getElementsByTagName("svg");if(0<W.length){W=W[0];var P=da?null:W.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=S){var va=S.getElementsByTagName("svg");if(0<va.length){var Aa=va[0],sa=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var ta=Aa.getAttribute("viewBox");
-if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(m/Math.max(1,sa)),m/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ta.width);Ba=Math.max(1,
-Ta.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ka=N.indexOf(";");0<Ka&&(N=N.substring(0,Ka)+N.substring(N.indexOf(",",Ka+1)));ja.setCellStyles("image",N,[Qa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Qa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*U,g+la*U,0,0,ra.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(l/Math.max(1,sa)),l/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ua.width);Ba=Math.max(1,
+Ua.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ka=N.indexOf(";");0<Ka&&(N=N.substring(0,Ka)+N.substring(N.indexOf(",",Ka+1)));ja.setCellStyles("image",N,[Qa[0]])});Ua.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Qa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*U,g+la*U,0,0,ra.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
!1;if("image/png"==ra.type){var Z=da?null:this.extractGraphModelFromPng(J.target.result);if(null!=Z&&0<Z.length){var oa=new Image;oa.src=J.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,oa.width,oa.height,ra.name)}));W=!0}}W||(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(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(m/sa,m/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+this.loadImage(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(l/sa,l/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,l,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
J.target.result,q(N,ra.type,f+la*U,g+la*U,240,160,ra.name,function(va){R(la,function(){return va})},ra)});/(\.v(dx|sdx?))($|\?)/i.test(ra.name)||/(\.vs(x|sx?))($|\?)/i.test(ra.name)?q(null,ra.type,f+la*U,g+la*U,240,160,ra.name,function(J){R(la,function(){return J})},ra):"image"==ra.type.substring(0,5)||"application/pdf"==ra.type?u.readAsDataURL(ra):u.readAsText(ra)}})(fa)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){qa=ja;ka()},H)}else ka()};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(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,E){if(y||f)mxSettings.setResizeImages(y?E:null),mxSettings.save();g();d(E)};null==m||f?this.showDialog((new ConfirmDialog(this,
-mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
-f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
-f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,E){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=E?E:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
-Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
+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(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==l||f?this.showDialog((new ConfirmDialog(this,
+mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,l)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,
+f,g)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){f(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
+f};EditorUi.prototype.resizeImage=function(d,f,g,l,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
+Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;f(l)};null!=g&&(l.onerror=g);l.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ea=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==X.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+I+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(I),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=Q,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",I,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
Math.max(R.width,V),R.height=Math.max(R.height,Q),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
-"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
+"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var l=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=l.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.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(X,ea){X=null!=f.backgroundImage?
f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][X]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
-{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var E=this.clearDefaultStyle;this.clearDefaultStyle=function(){E.apply(this,arguments)};
+{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var H=
f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,I){if(null==I){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(I=V.getAttribute("href"))}null!=I&&f.isCustomLink(I)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(I)&&mxEvent.consume(U);null!=ja&&ja(U,I)};H.call(this,X,ea,ka)};D.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(X,ea,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}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 aa=f.getExportVariables;f.getExportVariables=function(){var X=aa.apply(this,arguments),ea=d.getCurrentFile();
@@ -3622,15 +3623,15 @@ mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka
ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var fa=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(fa=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,ra=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
I,V,!0,fa,null,la,mxEvent.isControlDown(X)))});fa&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;ra()},mxEvent.isControlDown(X)):ra()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(u){var J=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,J)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",I,V,J*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
Q+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(Q,I,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),I,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var E=y[index];if("file"===E.kind){if(d.isEditing())this.importFiles([E.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
-else{var C=this.editor.graph.getInsertPoint();this.importFiles([E.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!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 m=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var E=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==E.nodeName||"TEXTAREA"==E.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
-f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var E=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=E&&17!=E&&91!=E&&93!=E||(m=!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(y){if(f.isEnabled())try{mxClipboard.copy(f),
-this.copyCells(g),d()}catch(E){this.handleError(E)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(E){this.handleError(E)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
+mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,l=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){l=!0;break}if(!l){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
+else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!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 l=!1;this.keyHandler.bindControlKey(88,
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||l||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
+f.container.appendChild(g),l=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=F&&17!=F&&91!=F&&93!=F||(l=!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(y){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=
-d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;
+d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(l,q,y){null==l[q]&&(l[q]=y)},g=this.editor.graph;
Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop",
"1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap",
"4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==
@@ -3640,142 +3641,142 @@ mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),E=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,E,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var E=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,E,E),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){E=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
-d,[E]);else{q.model.beginUpdate();try{q.labelChanged(E,d),Graph.isLink(d)&&q.setLinkForCell(E,d)}finally{q.model.endUpdate()}}q.setSelectionCell(E)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(E=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+E,y.y+E,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
-function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var E=d.clipboardData.getData("text/plain"),C=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==E.substring(0,18))try{var H=decodeURIComponent(E);this.isCompatibleString(H)&&(C=!0,E=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=E&&0<E.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
-C))}E=q.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))g=E[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(da){var ba=this.editor.graph;ba.lastPasteXml==da?ba.pasteCounter++:(ba.lastPasteXml=da,ba.pasteCounter=0);var Y=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(da,Y,Y));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
-function(da){this.handleError(da)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(da){}try{E=q.getElementsByTagName("span"),(H=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(H)||0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=H)}catch(da){}try{if(null!=
-y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}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(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),
-f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
-(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
-null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()&&this.openLocalFile(E.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
-"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
-"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
-m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
-10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
+this.editor.exportToCanvas(mxUtils.bind(this,function(l,q){try{this.spinner.stop();var y=this.createImageDataUri(l,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,l){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var l=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(l,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,l){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
+function(d,f,g,l){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var H=decodeURIComponent(F);this.isCompatibleString(H)&&(C=!0,F=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
+C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(da){var ba=this.editor.graph;ba.lastPasteXml==da?ba.pasteCounter++:(ba.lastPasteXml=da,ba.pasteCounter=0);var Y=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(da,Y,Y));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
+function(da){this.handleError(da)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(da){}try{F=q.getElementsByTagName("span"),(H=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(H)||0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=H)}catch(da){}try{if(null!=
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,l,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}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(l){null!=f&&(f.parentNode.removeChild(f),f=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(l){null!=f&&(f.parentNode.removeChild(f),
+f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(l);if(null==q){var y=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
+(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
+null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var l=document.body;var q=document.documentElement;var y=(l.clientWidth||q.clientWidth)-3;l=Math.max(l.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,l=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
+"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
+l=new mxGraphModel;g.decode(f,l);f=l.getChildAt(l.getRoot(),0);for(g=0;g<l.getChildCount(f);g++)d.push(l.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,l,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
+10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&
-(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var E=Editor.extractGraphModelFromPdf(d);null!=E&&(q=null,m=!0,d=E)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
-0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(E){this.handleError(E)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),
-E=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(E){if(null!=E){var C=E.lastIndexOf(".");0<C&&(E=E.substring(C+1,E.length));null==f[E]&&(f[E]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
+(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,l)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
+d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,l)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,l=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,l,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
+0;g<d.length;g++)mxUtils.bind(this,function(l){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,l.name,l,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==l.type.substring(0,5)&&"application/pdf"!==l.type||"image/svg"===l.type.substring(0,9)?q.readAsText(l):q.readAsDataURL(l)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,l,q){var y=this.getCurrentFile(),
+F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,l,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var l=this.editor.graph,q=l.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));l.model.isEdge(d)&&
+(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=l.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(l.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var E=y.model.cells,C;for(C in E){var H=E[C];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,l,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var H=F[C];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(H,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&
+f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var l=f.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,l=!1,q=null,y=mxUtils.bind(this,function(H,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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(H){if(H.source==(window.opener||window.parent)){var G=H.data,aa=null,da=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==P.substring(0,26)?P=
atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(Z){}return P});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[G])}catch(P){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.executeLayoutList(G.layouts);return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?E.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):E.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?
-mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();E.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();E.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){E.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,
-X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;E.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,O?mxUtils.bind(this,
+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.executeLayoutList(G.layouts);return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?F.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?
+mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){F.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,
+X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,O?mxUtils.bind(this,
function(P,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,P,Z)}):null,X?mxUtils.bind(this,function(P,Z,oa,va){this.remoteInvoke("searchDiagrams",[P,va],null,Z,oa)}):null,mxUtils.bind(this,function(P,Z,oa){this.remoteInvoke("getFileContent",[P.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,
-!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?E.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,"Network Error!")})}):
-null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){E.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));
-Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();E.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==
+!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,"Network Error!")})}):
+null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));
+Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==
G.show||G.show?this.spinner.spin(document.body,I):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 V=null!=G.xml?G.xml:this.getFileData(!0);
-this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;E.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);R(P)}),
+this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);R(P)}),
la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ra=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var P=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);Q.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():"pagenumber"==
Ba?1:P.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Z.root)}if(null!=G.layerIds){var va=Q.model,Aa=va.getChildCells(va.getRoot()),sa={};for(oa=0;oa<G.layerIds.length;oa++)sa[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)va.setVisible(Aa[oa],sa[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,null,Q,G.border,
null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
function(P){200<=P.getStatus()&&299>=P.getStatus()?R("data:image/png;base64,"+P.getText()):fa(null)}),mxUtils.bind(this,function(){fa(null)}))}}else ra=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();P.xml=mxUtils.getXml(Z);P.data=this.getFileData(null,null,!0,null,null,null,Z);P.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
-P.data=this.getHtml(Z,this.editor.graph),P.xml=mxUtils.getXml(Z),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var oa=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(va);E.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&
+P.data=this.getHtml(Z,this.editor.graph),P.xml=mxUtils.getXml(Z),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var oa=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(va);F.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&
null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,oa,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
-(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(va))}));return}E.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra();return}if("load"==
-G.action){ba=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
+(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(va))}));return}F.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra();return}if("load"==
+G.action){ba=G.toSketch;l=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var J=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var P=this.editor.graph,Z=P.maxFitScale;P.maxFitScale=G.maxFitScale;P.fit(2*J);P.maxFitScale=Z;P.container.scrollTop-=2*J;P.container.scrollLeft-=2*J;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(P){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var N=this.getCurrentFile();null!=N&&(qa=da(G.xml),null!=qa&&""!=qa&&N.mergeFile(new LocalFile(this,
-qa),function(){E.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){E.postMessage(JSON.stringify({event:"merge",message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(E):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):E.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var W=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
+qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){F.postMessage(JSON.stringify({event:"merge",message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var W=mxUtils.bind(this,
+function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();l&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||
-"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=P,E.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){S(P,H)},mxUtils.bind(this,function(P){this.handleError(P)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
+"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=P,F.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){S(P,H)},mxUtils.bind(this,function(P){this.handleError(P)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&S(P.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(P){S(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==G||"object"!==typeof G||null==G.format||null==
-G.data&&null==G.url?(G=da(G),S(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(P){S(W(),H)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var E=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";E.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(H,G,aa){C.apply(this,arguments);E.postMessage(JSON.stringify({event:"openLink",
-href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==
-urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
+G.data&&null==G.url?(G=da(G),S(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(P){S(W(),H)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(H,G,aa){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",
+href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==
+urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,l);f.setAttribute("title",l);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",
g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};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.executeLayoutList=function(d,f){for(var g=this.editor.graph,m=g.getSelectionCells(),q=0;q<d.length;q++){var y=new window[d[q].layout](g);if(null!=d[q].config)for(var E in d[q].config)y[E]=
-d[q].config[E];this.executeLayout(function(){y.execute(g.getDefaultParent(),0==m.length?null:m)},q==d.length-1,f)}};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],E={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},
+":",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.executeLayoutList=function(d,f){for(var g=this.editor.graph,l=g.getSelectionCells(),q=0;q<d.length;q++){var y=new window[d[q].layout](g);if(null!=d[q].config)for(var F in d[q].config)y[F]=
+d[q].config[F];this.executeLayout(function(){y.execute(g.getDefaultParent(),0==l.length?null:l)},q==d.length-1,f)}};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),l=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},
J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var S=null,P="auto";ka=null;for(var Z=[],oa=null,va=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var sa=d.indexOf(":");if(0<sa){var Ba=mxUtils.trim(d.substring(1,sa)),ta=mxUtils.trim(d.substring(sa+1));"label"==Ba?S=H.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?Y=
ta:"labels"==Ba&&0<ta.length&&"-"!=ta?O=JSON.parse(ta):"style"==Ba?aa=ta:"parentstyle"==Ba?X=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?ba=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?da=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&"-"!=ta?ea=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?ka=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?I=ta:"left"==Ba&&0<ta.length?V=ta:"top"==Ba&&0<ta.length?Q=ta:"ignore"==
Ba?va=ta.split(","):"connect"==Ba?Z.push(JSON.parse(ta)):"link"==Ba?oa=ta:"padding"==Ba?ra=parseFloat(ta):"edgespacing"==Ba?R=parseFloat(ta):"nodespacing"==Ba?fa=parseFloat(ta):"levelspacing"==Ba?la=parseFloat(ta):"layout"==Ba&&(P=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(g[Aa].replace(/\r$/,""));sa=d=null;Ba=[];for(ta=0;ta<Na.length;ta++)ea==Na[ta]&&(d=ta),ka==Na[ta]&&(sa=ta),Ba.push(mxUtils.trim(Na[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
-"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ta=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ta+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=
-H.model.getCell(bb));g=null!=Ka;var Ua=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Ua.vertex=!0;Ua.id=bb;Ta=null!=Ka?Ka:Ua;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ta,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ta.getAttribute(Y)];null!=z&&H.labelChanged(Ta,z)}if(null!=ba&&null!=da){var L=da[Ta.getAttribute(ba)];null!=L&&(Ta.style=L)}H.setAttributeForCell(Ta,"placeholders","1");Ta.style=H.replacePlaceholders(Ta,Ta.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),
-H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Ua]));Ka=Ua;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ta=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ta+parseFloat(Ka.getAttribute(V)));
-null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==E[bb]&&(E[bb]=[]),E[bb].push(Ka)):
-(m.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<m.length;ta++){Ka=m[ta];var ua=mxUtils.bind(this,function(Da,La,Za){var Va=La.getAttribute(Za.from);
-if(null!=Va&&""!=Va){Va=Va.split(",");for(var eb=0;eb<Va.length;eb++){var jb=C[Za.to][Va[eb]];if(null==jb&&null!=qa){jb=new mxCell(Va[eb],new mxGeometry(N,W,0,0),qa);jb.style=H.replacePlaceholders(La,jb.style,G);var hb=this.editor.graph.getPreferredSizeForCell(jb);jb.geometry.width=hb.width+ra;jb.geometry.height=hb.height+ra;C[Za.to][Va[eb]]=jb;jb.vertex=!0;jb.id=Va[eb];y.push(H.addCell(jb))}if(null!=jb){hb=Za.label;null!=Za.fromlabel&&(hb=(La.getAttribute(Za.fromlabel)||"")+(hb||""));null!=Za.sourcelabel&&
-(hb=H.replacePlaceholders(La,Za.sourcelabel,G)+(hb||""));null!=Za.tolabel&&(hb=(hb||"")+(jb.getAttribute(Za.tolabel)||""));null!=Za.targetlabel&&(hb=(hb||"")+H.replacePlaceholders(jb,Za.targetlabel,G));var ob="target"==Za.placeholders==!Za.invert?jb:Da;ob=null!=Za.style?H.replacePlaceholders(ob,Za.style,G):H.createCurrentEdgeStyle();hb=H.insertEdge(null,null,hb||"",Za.invert?jb:Da,Za.invert?Da:jb,ob);if(null!=Za.labels)for(ob=0;ob<Za.labels.length;ob++){var pb=Za.labels[ob],cb=new mxCell(pb.label||
-ob,new mxGeometry(null!=pb.x?pb.x:0,null!=pb.y?pb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=pb.placeholders&&(cb.value=H.replacePlaceholders("target"==pb.placeholders==!Za.invert?jb:Da,cb.value,G));if(null!=pb.dx||null!=pb.dy)cb.geometry.offset=new mxPoint(null!=pb.dx?pb.dx:0,null!=pb.dy?pb.dy:0);hb.insert(cb)}ma.push(hb);mxUtils.remove(Za.invert?Da:jb,ia)}}}});ua(Ka,Ka,pa);if(null!=E[Ka.id])for($a=0;$a<E[Ka.id].length;$a++)ua(Ka,E[Ka.id][$a],pa)}}if(null!=
-va)for(ta=0;ta<m.length;ta++)for(Ka=m[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Da=0;Da<y.length;Da++){var La=H.getCellGeometry(y[Da]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==
-P.charAt(0)){var Ma=u;H.view.validate();this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Da){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();
+"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ua=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ua+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=
+H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ua,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ua.getAttribute(Y)];null!=z&&H.labelChanged(Ua,z)}if(null!=ba&&null!=da){var L=da[Ua.getAttribute(ba)];null!=L&&(Ua.style=L)}H.setAttributeForCell(Ua,"placeholders","1");Ua.style=H.replacePlaceholders(Ua,Ua.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),
+H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Va]));Ka=Va;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ua=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ua+parseFloat(Ka.getAttribute(V)));
+null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ka)):
+(l.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<l.length;ta++){Ka=l[ta];var ua=mxUtils.bind(this,function(Ea,La,Ta){var Wa=La.getAttribute(Ta.from);
+if(null!=Wa&&""!=Wa){Wa=Wa.split(",");for(var fb=0;fb<Wa.length;fb++){var gb=C[Ta.to][Wa[fb]];if(null==gb&&null!=qa){gb=new mxCell(Wa[fb],new mxGeometry(N,W,0,0),qa);gb.style=H.replacePlaceholders(La,gb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(gb);gb.geometry.width=ib.width+ra;gb.geometry.height=ib.height+ra;C[Ta.to][Wa[fb]]=gb;gb.vertex=!0;gb.id=Wa[fb];y.push(H.addCell(gb))}if(null!=gb){ib=Ta.label;null!=Ta.fromlabel&&(ib=(La.getAttribute(Ta.fromlabel)||"")+(ib||""));null!=Ta.sourcelabel&&
+(ib=H.replacePlaceholders(La,Ta.sourcelabel,G)+(ib||""));null!=Ta.tolabel&&(ib=(ib||"")+(gb.getAttribute(Ta.tolabel)||""));null!=Ta.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(gb,Ta.targetlabel,G));var tb="target"==Ta.placeholders==!Ta.invert?gb:Ea;tb=null!=Ta.style?H.replacePlaceholders(tb,Ta.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",Ta.invert?gb:Ea,Ta.invert?Ea:gb,tb);if(null!=Ta.labels)for(tb=0;tb<Ta.labels.length;tb++){var qb=Ta.labels[tb],cb=new mxCell(qb.label||
+tb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=qb.placeholders&&(cb.value=H.replacePlaceholders("target"==qb.placeholders==!Ta.invert?gb:Ea,cb.value,G));if(null!=qb.dx||null!=qb.dy)cb.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);ib.insert(cb)}ma.push(ib);mxUtils.remove(Ta.invert?Ea:gb,ia)}}}});ua(Ka,Ka,pa);if(null!=F[Ka.id])for($a=0;$a<F[Ka.id].length;$a++)ua(Ka,F[Ka.id][$a],pa)}}if(null!=
+va)for(ta=0;ta<l.length;ta++)for(Ka=l[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ea=0;Ea<y.length;Ea++){var La=H.getCellGeometry(y[Ea]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==
+P.charAt(0)){var Ma=u;H.view.validate();this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Ea){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();
var Sa=new mxCompactTreeLayout(H,"horizontaltree"==P);Sa.levelDistance=fa;Sa.edgeRouting=!1;Sa.resetEdges=!1;this.executeLayout(function(){Sa.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ia.length){H.view.validate();var za=new mxHierarchicalLayout(H,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=fa;za.parallelEdgeSpacing=R;za.interRankCellSpacing=la;za.disableEdgeStyle=
-!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ea=wa.isVertexIgnored;wa.isVertexIgnored=function(Da){return Ea.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=
-u&&u()}}catch(Da){this.handleError(Da)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Da=wa.isVertexIgnored;wa.isVertexIgnored=function(Ea){return Da.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=
+u&&u()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(f+=g+l+"="+urlParams[l],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+l;for(l in urlParams)0>mxUtils.indexOf(g,l)&&(d=0==f?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,l,q){d=new LinkDialog(this,d,f,g,!0,l,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
-f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+f=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(l&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var F=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);F.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(d,f,g,m,q,y,E,C){var H=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(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
-g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<E?"&dpi="+E:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||
-"none"==m,!0,!1,!1,y,!0,!1,null,C,E):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);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 m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
-m.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 m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var E=mxSettings.getCustomLibraries();for(d=0;d<E.length;d++){var C=E[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(d,f,g,l,q,y,F,C){var H=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(H.getSvg(l,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
+g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=l?l:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==l||
+"none"==l,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);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 l=d;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
+l.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 l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));
q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&
this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));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,m,q){var y=!0,E=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(E);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(E);
+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,l,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&l.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);
y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&
-(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,E=0;E<q.allowedDomains.length;E++)if(f=="https://"+q.allowedDomains[E]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),
-this[m].apply(this,C);else{var H=this[m].apply(this,C);g([H])}}else g(null,"Invalid Call: "+m+" 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 m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",
-{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(E){null!=f&&f(E)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(E){if(!E||"1"==urlParams.forceMigration){var C=
+(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var l=d.funtionName,q=this.remoteInvokableFns[l];if(null!=q&&"function"===typeof this[l]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+l+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),
+this[l].apply(this,C);else{var H=this[l].apply(this,C);g([H])}}else g(null,"Invalid Call: "+l+" 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 l=g.open("database",2);l.onupgradeneeded=function(q){try{var y=l.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",
+{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};l.onsuccess=mxUtils.bind(this,function(q){var y=l.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=
document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=
aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});
-E=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):
-Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",E)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var E=y.transaction(q,"readwrite");E.oncomplete=g;E.onerror=m;for(y=0;y<q.length;y++)E.objectStore(q[y]).put(null!=d&&
-null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);
-y.onsuccess=function(){f(y.result)};y.onerror=g}catch(E){null!=g&&g(E)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(E){null==E.target.result?d(y):(y.push(E.target.result.value),E.target.result.continue())};q.onerror=f}catch(E){null!=f&&f(E)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
-function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.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=
+F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):
+Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});l.onerror=f;l.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,l,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=l;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&
+null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=l&&l(C)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);q=q.transaction(l,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<l.length;y++)q.objectStore(l[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var y=q.transaction([l],"readonly").objectStore(l).get(d);
+y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
+function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
+d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var l=this.getCurrentFile();null!=l?l.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,m,q,y,E,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,E,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+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,l,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,l,q,y,F,C)};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,m,q,y,E,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,E,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};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,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
-EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};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),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===
-m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&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,n,D,t){function F(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function Q(){U.removeChild(la);U.removeChild(ra);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
-la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ra=document.createElement("div");ra.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),F()):Q();H=null});u.className="geCommentEditBtn";ra.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);Q();I(ja);H=null});mxEvent.addListener(la,
+f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,l)};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,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
+EditorUi.prototype.writeGraphModelToPng=function(d,f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,l,q)};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),l=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<l.length){var q="<mxfile "===
+l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(q||l)&&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,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function Q(){U.removeChild(la);U.removeChild(ra);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
+la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ra=document.createElement("div");ra.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):Q();H=null});u.className="geCommentEditBtn";ra.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);Q();I(ja);H=null});mxEvent.addListener(la,
"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(J.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";ra.appendChild(J);U.insertBefore(ra,R);fa.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var I=b.timeSince(ja);null==I&&(I=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
+mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function l(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,S);oa.appendChild(va);mxEvent.addListener(va,"click",function(Aa){P(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function fa(){function S(oa){P.push(Z);if(null!=oa.replies)for(var va=0;va<oa.replies.length;va++)Z=Z.nextSibling,S(oa.replies[va])}var P=[],Z=ra;S(ja);return{pdiv:Z,replies:P}}function la(S,P,Z,oa,va){function Aa(){g(Na);ja.addReply(ta,
-function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();m(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
+function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();l(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
ja.id);ra.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(ra.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";u.appendChild(J);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");J.appendChild(N);
-N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);ra.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ra.appendChild(u);ja.isLocked&&(ra.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);E||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||E||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){m(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
-S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){m(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));E||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function P(){var Z=S.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",va=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Aa;for(var Ba=va[sa].querySelectorAll(".geCommentAction"),
-ta=0;ta<Ba.length;ta++)Ba[ta]!=Z.parentNode&&(Ba[ta].style.display=oa);O||(va[sa].style.display="none")}F()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});ra.appendChild(u);null!=I?da.insertBefore(ra,I.nextSibling):da.appendChild(ra);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,Q);null!=H&&(H.comment.id==ja.id?(Q=ja.content,ja.content=H.comment.content,d(ja,ra,H.saveCallback,
-H.deleteOnCancel),ja.content=Q):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ra}}var E=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
+N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);ra.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ra.appendChild(u);ja.isLocked&&(ra.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
+!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){l(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
+S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){l(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function P(){var Z=S.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",va=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Aa;for(var Ba=va[sa].querySelectorAll(".geCommentAction"),
+ta=0;ta<Ba.length;ta++)Ba[ta]!=Z.parentNode&&(Ba[ta].style.display=oa);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});ra.appendChild(u);null!=I?da.insertBefore(ra,I.nextSibling):da.appendChild(ra);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,Q);null!=H&&(H.comment.id==ja.id?(Q=ja.content,ja.content=H.comment.content,d(ja,ra,H.saveCallback,
+H.deleteOnCancel),ja.content=Q):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ra}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";da.style.bottom=parseInt(aa)+7+"px";G.appendChild(da);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=aa;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!E){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
+aa.className="geButton";if(!F){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){l(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
U();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa)}qa=aa.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);b.commentsRefreshNeeded()&&(qa=aa.cloneNode(),
qa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(qa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(I){b.handleError(I)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
@@ -3783,10 +3784,10 @@ IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("
y(X[I],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(I){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var fa=I[R.id];if(null!=fa)for(f(R,fa),fa=0;null!=R.replies&&fa<R.replies.length;fa++)ja(R.replies[fa])}
if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var Q=U[V];I[Q.getAttribute("data-commentId")]=Q}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,I-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
-this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,F,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
-g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var E=document.createElement("input");E.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(E.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
-t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(E.checked)});g.appendChild(C);null!=F?(C.innerHTML=F+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
-y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(E),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(H){E.checked=!E.checked;mxEvent.consume(H)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,l){var q=document.createElement("div");q.style.textAlign="center";l=null!=l?l:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=l+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
+g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
+t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
+y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3797,14 +3798,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var n=b.indexOf(","),D=null;0<n&&(n=this.getPageById(b.substring(n+1)),null!=n&&n!=e&&(D=this.getImageForPage(n,e,k),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var n=k.getGlobalVariable,D=this.createTemporaryGraph(k.getStylesheet());D.defaultPageBackgroundColor=k.defaultPageBackgroundColor;D.shapeBackgroundColor=k.shapeBackgroundColor;D.shapeForegroundColor=k.shapeForegroundColor;var t=this.getPageIndex(null!=e?e:this.currentPage);D.getGlobalVariable=function(d){return"pagenumber"==d?t+1:"page"==d&&null!=e?e.getName():n.apply(this,arguments)};document.body.appendChild(D.container);
-this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
+this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,n=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=k&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),k=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,t){D=t.getProperty("edit").changes;for(t=0;t<D.length;t++)if(D[t]instanceof SelectPage||D[t]instanceof RenamePage||D[t]instanceof MovePage||D[t]instanceof mxRootChange){n();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var n=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(n.setViewState(e),this.editor.updateGraphComponents(),n.view.revalidate(),n.sizeDidChange()),n.container.scrollLeft=n.view.translate.x*n.view.scale+e.scrollLeft,n.container.scrollTop=n.view.translate.y*n.view.scale+e.scrollTop,n.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),n=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(f){f=f.split("^");return{name:f[0],url:f[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(n)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),n=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(f){f=f.split("^");return{name:f[0],url:f[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(n)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,n,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,e,k,n){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),n=this.getBackgroundImageObject(b.backgroundImage,n),null!=n&&e.setAttribute("backgroundImage",
@@ -3825,86 +3826,86 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var n=this.currentPage;n==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,n=this.pages[k]):1>=this.pages.length&&(n=this.insertPage(),e.model.execute(new RenamePage(this,n,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,n))}finally{e.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var n=this.editor.graph;if(n.isEnabled()){n.isEditing()&&n.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var t={},F=n.createCellLookup([n.model.root]);k=new DiagramPage(D);k.root=n.cloneCell(n.model.root,null,t);var d=new mxGraphModel;d.prefix=Editor.guid()+"-";d.setRoot(k.root);n.updateCustomLinks(n.createCellMapping(t,F),[k.root]);k.viewState=b==this.currentPage?n.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var n=this.editor.graph;if(n.isEnabled()){n.isEditing()&&n.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var t={},E=n.createCellLookup([n.model.root]);k=new DiagramPage(D);k.root=n.cloneCell(n.model.root,null,t);var d=new mxGraphModel;d.prefix=Editor.guid()+"-";d.setRoot(k.root);n.updateCustomLinks(n.createCellMapping(t,E),[k.root]);k.viewState=b==this.currentPage?n.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(f){this.handleError(f)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,n=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,m){this.pages[g]==this.currentPage?(m.className="geActivePage",m.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):m.className="geInactivePage";m.setAttribute("draggable","true");mxEvent.addListener(m,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(m,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
-q.preventDefault()}));mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(m,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(m)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
-n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
-d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,l){this.pages[g]==this.currentPage?(l.className="geActivePage",l.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):l.className="geInactivePage";l.setAttribute("draggable","true");mxEvent.addListener(l,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(l,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
+q.preventDefault()}));mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(l,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(l)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
+n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
+d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var E=0;E<this.pages.length;E++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(E)}),m=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
-null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),m());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
-mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),m(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),F=mxEvent.getClientY(n);D.popup(t,F,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(F)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
+null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),l());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
+mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),l(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,n){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),t=b.getId();k.setAttribute("title",D+(null!=t?" ("+t+")":"")+" ["+n+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(t){this.renamePage(b);mxEvent.consume(t)}));var n=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(t){n=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(t){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(t)&&D||mxEvent.isPopupTrigger(t))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var d=mxEvent.getClientX(t),f=mxEvent.getClientY(t);F.popup(d,f,null,t);this.setCurrentMenu(F,e)}mxEvent.consume(t)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var d=mxEvent.getClientX(t),f=mxEvent.getClientY(t);E.popup(d,f,null,t);this.setCurrentMenu(E,e)}mxEvent.consume(t)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var n=this.getCurrentFile();if(null!=n&&n.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,F,d,f,g,m){t=this.createUrlParameters(t,F,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),F=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-F.x,d.y=d.y/g-F.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,l){t=this.createUrlParameters(t,E,d,f,g,l);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,n){n.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(n.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&n.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,t){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?t:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
-!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,F,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
-function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var F=0;F<t.length;F++)this.model.setVisible(t[F],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,F,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,F,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!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 n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
-!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function F(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
+function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!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 n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
+!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function E(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==I.y&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==I.y+I.height&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(I,V){V=null!=V?V:!0;C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=C.cloneCells([R[0],I]);C.model.setTerminal(fa[0],C.model.getTerminal(R[0],
!0),!0);var la=d(I),ra=Q.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?fa[1].geometry.x+=V?I.geometry.width+10:-fa[1].geometry.width-10:fa[1].geometry.y+=V?I.geometry.height+10:-fa[1].geometry.height-10;C.view.currentRoot!=Q&&(fa[1].geometry.x-=ra.x,fa[1].geometry.y-=ra.y);var u=C.view.getState(I),J=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?I.geometry.width+10:-fa[1].geometry.width-
10)*J:N.y+=(V?I.geometry.height+10:-fa[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var S=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,P=ra=R=0;P<W.length;P++){var Z=C.model.getTerminal(W[P],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,oa)&&(R=10+Math.max(R,(Math.min(N.x+N.width,oa.x+oa.width)-Math.max(N.x,oa.x))/
J),ra=10+Math.max(ra,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}S?ra=0:R=0;for(P=0;P<W.length;P++)if(Z=C.model.getTerminal(W[P],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY()))){var va=[];C.traverse(oa.cell,!0,function(Aa,sa){var Ba=null!=sa&&C.isTreeEdge(sa);Ba&&va.push(sa);(null==sa||Ba)&&va.push(Aa);return null==sa||Ba});C.moveCells(va,(V?1:-1)*R,(V?1:-1)*ra)}}}return C.addCells(fa,Q)}finally{C.model.endUpdate()}}
function g(I){C.model.beginUpdate();try{var V=d(I),Q=C.getIncomingTreeEdges(I),R=C.cloneCells([Q[0],I]);C.model.setTerminal(Q[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var fa=C.model.getParent(I),la=fa.geometry,ra=[];C.view.currentRoot!=fa&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var S=null!=W&&C.isTreeEdge(W);S&&ra.push(W);(null==W||S)&&ra.push(N);return null==W||S});var u=I.geometry.width+40,J=I.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function m(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
+u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function l(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
la[1],!1);var ra=C.getCellStyle(la[1]).newEdgeStyle;if(null!=ra)try{var u=JSON.parse(ra),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",fa==mxConstants.DIRECTION_SOUTH||fa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=Q.geometry;V=[];C.view.currentRoot==Q&&(N=new mxRectangle);for(ra=0;ra<R.length;ra++){var W=C.model.getTerminal(R[ra],!1);null!=W&&V.push(W)}var S=C.view.getBounds(V),
P=C.view.translate,Z=C.view.scale;fa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):fa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=fa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==S?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(S.y+S.height)/Z-P.y+-N.y+10);return C.addCells(la,Q)}finally{C.model.endUpdate()}}function q(I,V,Q){I=C.getOutgoingTreeEdges(I);Q=C.view.getState(Q);var R=[];if(null!=Q&&null!=I){for(var fa=0;fa<I.length;fa++){var la=C.view.getState(C.model.getTerminal(I[fa],!1));null!=la&&(!V&&Math.min(la.x+la.width,Q.x+Q.width)>=Math.max(la.x,Q.x)||V&&Math.min(la.y+la.height,Q.y+
-Q.height)>=Math.max(la.y,Q.y))&&R.push(la)}R.sort(function(ra,u){return V?ra.x+ra.width-u.x-u.width:ra.y+ra.height-u.y-u.height})}return R}function y(I,V){var Q=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==R&&Q!=V?E.actions.get("selectParent").funct():Q==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(Q=C.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(R=q(C.model.getTerminal(Q[0],
-!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var E=this,C=E.editor.graph,H=C.getModel(),G=E.menus.createPopupMenu;E.menus.createPopupMenu=function(I,V,Q){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
-null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,Q)}};E.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],
-!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");E.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");E.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
-C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");E.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var Q=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&Q.push(fa);
+Q.height)>=Math.max(la.y,Q.y))&&R.push(la)}R.sort(function(ra,u){return V?ra.x+ra.width-u.x-u.width:ra.y+ra.height-u.y-u.height})}return R}function y(I,V){var Q=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==R&&Q!=V?F.actions.get("selectParent").funct():Q==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(Q=C.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(R=q(C.model.getTerminal(Q[0],
+!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(I,V,Q){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
+null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,Q)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],
+!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],Q=0;Q<I.length;Q++)V.push(C.model.getTerminal(I[Q],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
+C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var Q=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&Q.push(fa);
null!=fa&&!la||null!=V&&mxEvent.isShiftDown(V)||Q.push(R);return null==fa||la})}C.setSelectionCells(Q)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(I,V){V=null!=V?V:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));V&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var Q=[],R=0;R<I.length;R++){var fa=I[R];H.isEdge(fa)&&t(fa)&&(Q.push(fa),fa=H.getTerminal(fa,!1));if(n(fa)){var la=[];C.traverse(fa,!0,function(ra,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
-(null==u||J)&&la.push(ra);return null==u||J});0<la.length&&(Q=Q.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&Q.push(I[R])}I=Q;return aa.apply(this,arguments)};E.hoverIcons.getStateAt=function(I,V,Q){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,Q))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),R=0;R<Q.length;R++){var fa=C.view.getState(Q[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
+(null==u||J)&&la.push(ra);return null==u||J});0<la.length&&(Q=Q.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&Q.push(I[R])}I=Q;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,Q){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,Q))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),R=0;R<Q.length;R++){var fa=C.view.getState(Q[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
for(fa=0;fa<la.length;fa++)mxUtils.remove(la[fa],I)}}this.model.beginUpdate();try{var ra=da.call(this,I,V);if(ra.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(ra[R]);la=C.getIncomingTreeEdges(I[R]);if(0==u.length&&0<la.length){var J=this.cloneCell(la[0]);this.addEdge(J,C.getDefaultParent(),this.model.getTerminal(la[0],!0),ra[R])}}}finally{this.model.endUpdate()}return ra};var ba=C.moveCells;C.moveCells=function(I,V,Q,R,fa,la,ra){var u=null;this.model.beginUpdate();
try{var J=fa,N=this.getCurrentCellStyle(fa);if(null!=I&&n(fa)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<I.length;W++)if(n(I[W])||C.model.isEdge(I[W])&&null==C.model.getTerminal(I[W],!0)){fa=C.model.getParent(I[W]);break}if(null!=J&&fa!=J&&null!=this.view.getState(I[0])){var S=C.getIncomingTreeEdges(I[0]);if(0<S.length){var P=C.view.getState(C.model.getTerminal(S[0],!0));if(null!=P){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-P.getCenterX())/C.view.scale,Q=(Z.getCenterY()-
P.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=I&&u.length==I.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(J)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],J,!0);else if(n(I[W])&&(S=C.getIncomingTreeEdges(I[W]),0<S.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(S[0],!0))&&this.model.setTerminal(S[0],J,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=J;if(null==N||N==C.model.getParent(I[W]))N=C.model.getTerminal(S[0],
-!0);R=this.cloneCell(S[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=E.sidebar){var Y=E.sidebar.dropAndConnect;E.sidebar.dropAndConnect=function(I,V,Q,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var ra=0;ra<la.length;ra++)if(fa.isEdge(la[ra])&&null==fa.getTerminal(la[ra],!0)){fa.setTerminal(la[ra],I,!0);var u=C.getCellGeometry(la[ra]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var qa=
-{88:E.actions.get("selectChildren"),84:E.actions.get("selectSubtree"),80:E.actions.get("selectParent"),83:E.actions.get("selectSiblings")},O=E.onKeyDown;E.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
-V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=E.hoverIcons&&E.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=qa[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){E.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,Q,R,fa,la,ra){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return J==V||0==u.length?m(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||F(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
-n(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
-mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;E.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.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=
+!0);R=this.cloneCell(S[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(I,V,Q,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var ra=0;ra<la.length;ra++)if(fa.isEdge(la[ra])&&null==fa.getTerminal(la[ra],!0)){fa.setTerminal(la[ra],I,!0);var u=C.getCellGeometry(la[ra]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var qa=
+{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):l(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
+V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=qa[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){F.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,Q,R,fa,la,ra){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return J==V||0==u.length?l(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
+n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.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 ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,V){U.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 n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-F.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(F);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
-t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var d=new mxCell("Topic",
-new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);
-var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;F.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-y.geometry.relative=!0;y.edge=!0;F.insertEdge(y,!0);q.insertEdge(y,!1);var E=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var C=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;F.insertEdge(C,!0);E.insertEdge(C,!1);t.insert(f);t.insert(m);t.insert(y);t.insert(C);t.insert(F);t.insert(d);t.insert(g);t.insert(q);t.insert(E);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
+t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
+new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);
+var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+y.geometry.relative=!0;y.edge=!0;E.insertEdge(y,!0);q.insertEdge(y,!1);var F=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var C=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(l);t.insert(y);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-t.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-m.geometry.relative=!0;m.edge=!0;F.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);t.insert(F);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
-"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);return sb.createVertexTemplateFromCells([t,F],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;t.insertEdge(F,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
-!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([F,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+t.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);t.insert(f);t.insert(l);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
+"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
+!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var I=
O.createFormat(U);I.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(I,V){var Q=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){Q.funct.apply(this,arguments)}));
@@ -3921,12 +3922,12 @@ ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.wi
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(O){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(O);null==urlParams.dark&&(mxSettings.settings.darkMode=O,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var F=document.createElement("link");F.setAttribute("rel","stylesheet");F.setAttribute("href",STYLE_PATH+"/dark.css");F.setAttribute("charset","UTF-8");F.setAttribute("type",
+EditorUi.prototype.setDarkMode=function(O){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(O);null==urlParams.dark&&(mxSettings.settings.darkMode=O,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
"text/css");EditorUi.prototype.doSetDarkMode=function(O){if(Editor.darkMode!=O){var X=this.editor.graph;Editor.darkMode=O;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";X.view.gridColor=Editor.isDarkMode()?X.view.defaultDarkGridColor:X.view.defaultGridColor;X.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";X.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
"#ffffff";X.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";X.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";X.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.loadStylesheet();null!=this.actions.layersWindow&&(O=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null,O&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=X.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=X.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=X.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
X.shapeForegroundColor;Graph.prototype.defaultThemeName=X.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
-Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==F.parentNode&&document.getElementsByTagName("head")[0].appendChild(F):null!=F.parentNode&&F.parentNode.removeChild(F)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
+Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
@@ -3935,16 +3936,16 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
-X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):l.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==X?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div");O.style.display="inline-block";O.style.position="relative";O.style.marginTop="6px";O.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ea="1"==urlParams.publishClose?
mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(X,ea);X.setAttribute("title",ea);mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));O.appendChild(X)}}else mxUtils.write(X,mxResources.get("save")),X.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),O.appendChild(X),"1"==urlParams.saveAndExit&&(X=document.createElement("a"),
mxUtils.write(X,mxResources.get("saveAndExit")),X.setAttribute("title",mxResources.get("saveAndExit")),X.className="geMenuItem",X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),O.appendChild(X));"1"!=urlParams.noExitBtn&&(X=document.createElement("a"),ea="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(X,ea),X.setAttribute("title",ea),X.className="geMenuItem",
-X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(X));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var E=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);
-ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=E.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,
+X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(X));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);
+ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=F.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,
ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(O,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,ea),this.addMenuItems(O,["collapsible","-","lockUnlock","enterGroup"],null,ea),O.addSeparator(),this.addSubmenu("layout",O)):ka.isSelectionEmpty()&&ka.isEnabled()?(O.addSeparator(),this.addMenuItems(O,["editData"],null,ea),O.addSeparator(),this.addSubmenu("layout",O),this.addSubmenu("insert",O),this.addMenuItems(O,["-","exitGroup"],null,ea)):ka.isEnabled()&&
this.addMenuItems(O,["-","lockUnlock"],null,ea)};var H=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(O,X,ea){H.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(O,["copyAsImage"],null,ea)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
@@ -3958,35 +3959,35 @@ O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get
null,null,Editor.ctrlKey+"+Shift+K"));O.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var R=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var R=
new ParseDialog(O,mxResources.get("mermaid")+"...","mermaid");O.showDialog(R.container,620,420,!0,!1);R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,ra=la.getSelectionCell();ka.call(this,R,ra,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(ra)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,ra){R.addSeparator();
this.addSubmenu("editCell",R,ra,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],fa);O.menus.addSubmenu("openFrom",R,fa);isLocalStorage&&this.addSubmenu("openRecent",R,fa);R.addSeparator(fa);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["showRemoteCursors",
-"shareCursor"],fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&"1"!=urlParams.embedInline)){var ra=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ra)&&!/(\.svg)$/i.test(ra))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));
-R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,
-["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["showRemoteCursors","shareCursor"],fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,["outline"],fa);O.commentsSupported()&&O.menus.addMenuItems(R,
-["comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==
-App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
-this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",
-R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",
-R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen","search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),
-fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa),R.addSeparator(fa),O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa));("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
+"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&
+"1"!=urlParams.embedInline)){var ra=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ra)&&!/(\.svg)$/i.test(ra))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),
+fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,["outline"],fa);O.commentsSupported()&&O.menus.addMenuItems(R,["comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&
+"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();
+null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",
+new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);
+this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=
+urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen","search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&
+la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,ra){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ra),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ra),O.menus.addSubmenu("insertLayout",la,ra,mxResources.get("layout")),O.menus.addSubmenu("insertAdvanced",la,ra,mxResources.get("advanced"))):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,ra))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
Q=function(R,fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function O(za,wa,Ea){var Da=U.menus.get(za),La=R.addMenu(mxResources.get(za),mxUtils.bind(this,function(){Da.funct.apply(this,arguments)}),Q);La.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";La.style.display="inline-block";La.style.boxSizing="border-box";La.style.top="6px";La.style.marginRight="6px";La.style.height="30px";La.style.paddingTop="6px";La.style.paddingBottom="6px";La.style.cursor="pointer";La.setAttribute("title",mxResources.get(za));U.menus.menuCreated(Da,
-La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Za){var Va=document.createElement("a");Va.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Va.style.display="inline-block";Va.style.boxSizing="border-box";Va.style.height="30px";Va.style.padding="6px";Va.style.position="relative";Va.style.verticalAlign="top";Va.style.top="0px";"1"==urlParams.sketch&&(Va.style.borderStyle="none",Va.style.boxShadow="none",Va.style.padding="6px",Va.style.margin="0px");null!=U.statusContainer?V.insertBefore(Va,U.statusContainer):V.appendChild(Va);null!=Za?(Va.style.backgroundImage="url("+Za+")",Va.style.backgroundPosition=
-"center center",Va.style.backgroundRepeat="no-repeat",Va.style.backgroundSize="24px 24px",Va.style.width="34px"):mxUtils.write(Va,za);mxEvent.addListener(Va,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(eb){eb.preventDefault()}));mxEvent.addListener(Va,"click",function(eb){"disabled"!=Va.getAttribute("disabled")&&wa(eb);mxEvent.consume(eb)});null==Ea&&(Va.style.marginRight="4px");null!=Da&&Va.setAttribute("title",Da);null!=La&&(za=function(){La.isEnabled()?(Va.removeAttribute("disabled"),
-Va.style.cursor="pointer"):(Va.setAttribute("disabled","disabled"),Va.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Va}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
-for(var Da=0;Da<za.length;Da++)null!=za[Da]&&("1"==urlParams.sketch&&(za[Da].style.padding="10px 8px",za[Da].style.width="30px"),za[Da].style.margin="0px",za[Da].style.boxShadow="none",Ea.appendChild(za[Da]));null!=wa&&mxUtils.setOpacity(Ea,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ea,U.statusContainer):V.appendChild(Ea);return Ea}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za=
-V.firstChild;null!=za;){var wa=za.nextSibling;"geMenuItem"!=za.className&&"geItem"!=za.className||za.parentNode.removeChild(za);za=wa}Q=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;za=1E3>n||"1"==urlParams.sketch;var Ea=null;za||(Ea=O("diagram"));wa=za?O("diagram",null,Editor.drawLogoImage):null;null!=wa&&(Ea=wa);ea([Ea,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),za?Editor.shapesImage:
-null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),za?Editor.formatImage:null)],za?60:null);wa=O("insert",!0,za?N:null);ea([wa,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),za?Editor.trashImage:null)],za?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ua,640<=n?X("",Ta.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Ta,Editor.zoomInImage):null,640<=n?X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=Ea&&(mxEvent.disableContextMenu(Ea),mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Da){(mxEvent.isShiftDown(Da)||mxEvent.isAltDown(Da)||mxEvent.isMetaDown(Da)||mxEvent.isControlDown(Da)||mxEvent.isPopupTrigger(Da))&&U.appIconClicked(Da)}),null,null));wa=U.menus.get("language");null!=wa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+function(){function O(za,wa,Da){var Ea=U.menus.get(za),La=R.addMenu(mxResources.get(za),mxUtils.bind(this,function(){Ea.funct.apply(this,arguments)}),Q);La.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";La.style.display="inline-block";La.style.boxSizing="border-box";La.style.top="6px";La.style.marginRight="6px";La.style.height="30px";La.style.paddingTop="6px";La.style.paddingBottom="6px";La.style.cursor="pointer";La.setAttribute("title",mxResources.get(za));U.menus.menuCreated(Ea,
+La,"geMenuItem");null!=Da?(La.style.backgroundImage="url("+Da+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Da,Ea,La,Ta){var Wa=document.createElement("a");Wa.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Wa.style.display="inline-block";Wa.style.boxSizing="border-box";Wa.style.height="30px";Wa.style.padding="6px";Wa.style.position="relative";Wa.style.verticalAlign="top";Wa.style.top="0px";"1"==urlParams.sketch&&(Wa.style.borderStyle="none",Wa.style.boxShadow="none",Wa.style.padding="6px",Wa.style.margin="0px");null!=U.statusContainer?V.insertBefore(Wa,U.statusContainer):V.appendChild(Wa);null!=Ta?(Wa.style.backgroundImage="url("+Ta+")",Wa.style.backgroundPosition=
+"center center",Wa.style.backgroundRepeat="no-repeat",Wa.style.backgroundSize="24px 24px",Wa.style.width="34px"):mxUtils.write(Wa,za);mxEvent.addListener(Wa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Wa,"click",function(fb){"disabled"!=Wa.getAttribute("disabled")&&wa(fb);mxEvent.consume(fb)});null==Da&&(Wa.style.marginRight="4px");null!=Ea&&Wa.setAttribute("title",Ea);null!=La&&(za=function(){La.isEnabled()?(Wa.removeAttribute("disabled"),
+Wa.style.cursor="pointer"):(Wa.setAttribute("disabled","disabled"),Wa.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Wa}function ea(za,wa,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
+for(var Ea=0;Ea<za.length;Ea++)null!=za[Ea]&&("1"==urlParams.sketch&&(za[Ea].style.padding="10px 8px",za[Ea].style.width="30px"),za[Ea].style.margin="0px",za[Ea].style.boxShadow="none",Da.appendChild(za[Ea]));null!=wa&&mxUtils.setOpacity(Da,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Da,U.statusContainer):V.appendChild(Da);return Da}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za=
+V.firstChild;null!=za;){var wa=za.nextSibling;"geMenuItem"!=za.className&&"geItem"!=za.className||za.parentNode.removeChild(za);za=wa}Q=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;za=1E3>n||"1"==urlParams.sketch;var Da=null;za||(Da=O("diagram"));wa=za?O("diagram",null,Editor.drawLogoImage):null;null!=wa&&(Da=wa);ea([Da,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),za?Editor.shapesImage:
+null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),za?Editor.formatImage:null)],za?60:null);wa=O("insert",!0,za?N:null);ea([wa,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),za?Editor.trashImage:null)],za?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ua,640<=n?X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Ua,Editor.zoomInImage):null,640<=n?X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&U.appIconClicked(Ea)}),null,null));wa=U.menus.get("language");null!=wa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
n&&"1"!=urlParams.sketch?(null==Fa&&(wa=R.addMenu("",wa.funct),wa.setAttribute("title",mxResources.get("language")),wa.className="geToolbarButton",wa.style.backgroundImage="url("+Editor.globeImage+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.position="absolute",wa.style.height="24px",wa.style.width="24px",wa.style.zIndex="1",wa.style.right="8px",wa.style.cursor="pointer",wa.style.top="1"==urlParams.embed?"12px":
"11px",V.appendChild(wa),Fa=wa),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Fa&&(Fa.parentNode.removeChild(Fa),Fa=null))}qa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Ea=U.embedViewport.x+
-U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Za=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Ea-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,Za-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
+urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Da=U.embedViewport.x+
+U.embedViewport.width,Ea=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Ta=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Da-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ea,Ta-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var I=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var Q=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var fa=U.hideCurrentMenu;U.hideCurrentMenu=function(){fa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var za=U.getCurrentFile();if(null!=za&&null!=za.getTitle()){var wa=za.getMode();"google"==wa?wa="googleDrive":"github"==wa?wa="gitHub":"gitlab"==wa?wa="gitLab":"onedrive"==wa&&(wa="oneDrive");wa=mxResources.get(wa);V.setAttribute("title",za.getTitle()+(null!=wa?" ("+wa+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
@@ -4005,20 +4006,20 @@ mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlPa
U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(za);var wa=U.getCurrentFile();wa=null!=wa?wa.savingStatusKey:DrawioFile.prototype.savingStatusKey;za==mxResources.get(wa)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(wa))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",sa=!0):6<U.buttonContainer.clientWidth&&(U.statusContainer.style.display="none",sa=!1)}else U.statusContainer.style.display="inline-block",
Ba(null),sa=!0;V.style.visibility=20>V.clientWidth&&!sa?"hidden":""}}));pa=O("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";P.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(za){(mxEvent.isShiftDown(za)||mxEvent.isAltDown(za)||mxEvent.isMetaDown(za)||mxEvent.isControlDown(za)||mxEvent.isPopupTrigger(za))&&this.appIconClicked(za)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display=
"none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var ta=document.createElement("a");ta.style.padding="0px";ta.style.boxShadow="none";ta.className="geMenuItem";ta.style.display="inline-block";
-ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Za){Da=X("",Da.funct,null,La,Da,Za);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Za){null!=La&&Da.setAttribute("title",
-La);Da.style.cursor=null!=Za?Za:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.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"),!0,!1,null,!0),mxResources.get("note"));wa(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");wa(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Da=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Da.geometry.setTerminalPoint(new mxPoint(0,0),!0);Da.geometry.setTerminalPoint(new mxPoint(Da.geometry.width,0),!1);Da.geometry.points=[];Da.geometry.relative=!0;Da.edge=!0;wa(U.sidebar.createEdgeTemplateFromCells([Da],Da.geometry.width,Da.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Da=Da.clone();Da.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Da.geometry.width=I.defaultEdgeLength+20;Da.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Da.geometry.setTerminalPoint(new mxPoint(Da.geometry.width,20),!1);Da=wa(U.sidebar.createEdgeTemplateFromCells([Da],Da.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Da.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Da.style.paddingBottom="14px";Da.style.marginBottom="14px"})();za(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ea=U.actions.get("toggleShapes");za(Ea,mxResources.get("shapes")+
-" ("+Ea.shortcut+")",N);pa=O("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer");pa=O("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(ta)});mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){Na?(mxUtils.setPrefixedStyle(S.style,
+ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Ea,La,Ta){Ea=X("",Ea.funct,null,La,Ea,Ta);Ea.style.width="40px";Ea.style.opacity="0.7";return wa(Ea,null,"pointer")},wa=function(Ea,La,Ta){null!=La&&Ea.setAttribute("title",
+La);Ea.style.cursor=null!=Ta?Ta:"default";Ea.style.margin="2px 0px";S.appendChild(Ea);mxUtils.br(S);return Ea};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.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"),!0,!1,null,!0),mxResources.get("note"));wa(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");wa(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ea=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+Ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ea.geometry.setTerminalPoint(new mxPoint(Ea.geometry.width,0),!1);Ea.geometry.points=[];Ea.geometry.relative=!0;Ea.edge=!0;wa(U.sidebar.createEdgeTemplateFromCells([Ea],Ea.geometry.width,Ea.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ea=Ea.clone();Ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ea.geometry.width=I.defaultEdgeLength+20;Ea.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);Ea.geometry.setTerminalPoint(new mxPoint(Ea.geometry.width,20),!1);Ea=wa(U.sidebar.createEdgeTemplateFromCells([Ea],Ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ea.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ea.style.paddingBottom="14px";Ea.style.marginBottom="14px"})();za(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Da=U.actions.get("toggleShapes");za(Da,mxResources.get("shapes")+
+" ("+Da.shortcut+")",N);pa=O("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer");pa=O("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";wa(pa,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(ta)});mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){Na?(mxUtils.setPrefixedStyle(S.style,
"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ta.style.width="40px",ta.style.height="12px",ta.setAttribute("title","Minimize"),Na=!1,Ca()):(S.innerHTML="",S.appendChild(ta),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",ta.style.height="24px",ta.style.backgroundImage=
-"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Qa=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},Ta=U.actions.get("zoomIn"),
-Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
-"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Ea=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Ea?" ["+Ea+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca);
-T.addListener("stateChanged",function(){ca.style.opacity=T.enabled?"":"0.1"});var ia=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Ua.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};P.appendChild(z);P.appendChild(L);Ua.addListener("stateChanged",ia);$a.addListener("stateChanged",ia);ia();var ma=this.createPageMenuTab(!1,!0);ma.style.display="none";ma.style.position="";ma.style.marginLeft=
+"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Qa=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},Ua=U.actions.get("zoomIn"),
+Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Va=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Va.funct,null,mxResources.get("undo")+" ("+Va.shortcut+")",Va,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
+"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Da=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Da?" ["+Da+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca);
+T.addListener("stateChanged",function(){ca.style.opacity=T.enabled?"":"0.1"});var ia=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Va.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};P.appendChild(z);P.appendChild(L);Va.addListener("stateChanged",ia);$a.addListener("stateChanged",ia);ia();var ma=this.createPageMenuTab(!1,!0);ma.style.display="none";ma.style.position="";ma.style.marginLeft=
"";ma.style.top="";ma.style.left="";ma.style.height="100%";ma.style.lineHeight="";ma.style.borderStyle="none";ma.style.padding="3px 0";ma.style.margin="0px";ma.style.background="";ma.style.border="";ma.style.boxShadow="none";ma.style.verticalAlign="top";ma.style.width="auto";ma.style.maxWidth="160px";ma.style.position="relative";ma.style.padding="6px";ma.style.textOverflow="ellipsis";ma.style.opacity="0.8";W.appendChild(ma);U.editor.addListener("pagesPatched",bb);U.editor.addListener("pageSelected",
bb);U.editor.addListener("pageRenamed",bb);U.editor.addListener("fileLoaded",bb);bb();U.addListener("fileDescriptorChanged",J);U.addListener("pagesVisibleChanged",J);U.editor.addListener("pagesPatched",J);J();J=X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);W.appendChild(J);var pa=document.createElement("div");pa.innerHTML="100%";pa.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");pa.style.display=
-"inline-block";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";W.appendChild(pa);mxEvent.addListener(pa,"click",Qa);Qa=X("",Ta.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ta,Editor.zoomInImage);W.appendChild(Qa);u.visible&&(W.appendChild(M),mxEvent.addListener(document,
+"inline-block";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";W.appendChild(pa);mxEvent.addListener(pa,"click",Qa);Qa=X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ua,Editor.zoomInImage);W.appendChild(Qa);u.visible&&(W.appendChild(M),mxEvent.addListener(document,
"fullscreenchange",function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=U.actions.get("exit"),W.appendChild(X("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));U.tabContainer.style.visibility="hidden";V.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
P.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";ra.appendChild(P);ra.appendChild(W);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
mxClient.IS_POINTER&&(S.style.touchAction="none");ra.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(ra)}else{var ua=X("",Qa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",bb,Editor.zoomFitImage);V.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";pa=R.addMenu("100%",
@@ -4030,23 +4031,23 @@ urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mx
ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Ma=null,Oa=null,Pa=null,Sa=null;mxEvent.addGestureListeners(ja,function(za){Sa=parseInt(U.diagramContainer.style.height);Oa=mxEvent.getClientY(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(za){Pa=parseInt(U.diagramContainer.style.width);Ma=
mxEvent.getClientX(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});mxEvent.addGestureListeners(document.body,null,function(za){var wa=!1;null!=Ma&&(U.diagramContainer.style.width=Math.max(20,Pa+mxEvent.getClientX(za)-Ma)+"px",wa=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Sa+mxEvent.getClientY(za)-Oa)+"px",wa=!0);wa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
"*"),Z(),U.refresh())},function(za){null==Ma&&null==Oa||mxEvent.consume(za);Oa=Ma=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:
this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var n=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&
-this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,G=this.view.translate;F.setAttribute("viewBox",H.x+G.x-this.panDx+" "+(H.y+G.y-this.panDy)+" "+(H.width+1)+
-" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
+this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,G=this.view.translate;E.setAttribute("viewBox",H.x+G.x-this.panDx+" "+(H.y+G.y-this.panDy)+" "+(H.width+1)+
+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(H){return d.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
-0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var l=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:l.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
this.selectPageById=function(H){H=this.getIndexById(H);var G=0<=H;G&&this.selectPage(H);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var G=H.src,aa=G.indexOf(",");0<aa&&(aa=d.getIndexById(G.substring(aa+1)),0<=aa&&(H=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[aa])),
-H.originalSrc=G))}y.apply(this,arguments)};var E=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var G=E.apply(this,arguments);H=this.backgroundImage;if(null!=H){var aa=this.view.translate,da=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+H.x)*da,(aa.y+H.y)*da,H.width*da,H.height*da))}return G};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",
+H.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var G=F.apply(this,arguments);H=this.backgroundImage;if(null!=H){var aa=this.view.translate,da=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+H.x)*da,(aa.y+H.y)*da,H.width*da,H.height*da))}return G};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",
this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=
!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var G=H.indexOf(",");d.selectPageById(H.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return C.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});
-k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),t=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(t.disconnect(),n())}));t.observe(D,{attributes:!0})}else n()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var D=this.getObservableParent(b),t=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(t.disconnect(),n())}));t.observe(D,{attributes:!0})}else n()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
@@ -4060,17 +4061,17 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=f,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",n),this.graph.addListener("size",n)):new ResizeSensor(this.graph.container,n));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var t=D=null;n=mxUtils.bind(this,function(){window.clearTimeout(t);this.handlingResize||(t=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",n):new ResizeSensor(this.graph.container,n))}else 9>=document.documentMode||this.graph.addListener("size",
-n);var F=mxUtils.bind(this,function(d){var f=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>g)?(d=null,null!=g&&e.height+2*this.graph.border>g-2&&(d=(g-2*this.graph.border-2)/e.height),this.fitGraph(d)):this.widthIsEmpty||
-null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+d.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=f});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(d){e=this.graph.getGraphBounds();D=null;F(d)}};
+n);var E=mxUtils.bind(this,function(d){var f=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>g)?(d=null,null!=g&&e.height+2*this.graph.border>g-2&&(d=(g-2*this.graph.border-2)/e.height),this.fitGraph(d)):this.widthIsEmpty||
+null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+d.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=f});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(d){e=this.graph.getGraphBounds();D=null;E(d)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
-d<F;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<F;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
+d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
-"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);l++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),F=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(F(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){F(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){F(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||F(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
-this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():F(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,E=null,C=null,H=0;H<g.length;H++){var G=
+function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
+mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
+this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,l=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
g[H];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var aa=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");aa.style.borderRightStyle="none";aa.style.paddingLeft="0px";aa.style.paddingRight="0px";k.appendChild(C);var da=
b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");da.style.paddingLeft="0px";da.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerHTML="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";aa.style.display=C.style.display;da.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==G){if(this.layersEnabled){var ba=this.graph.getModel(),
@@ -4078,10 +4079,10 @@ Y=b(mxUtils.bind(this,function(ea){if(null!=q)q.parentNode.removeChild(q),q=null
U.translate.x&&0<ja.y/U.scale+this.graph.originalViewState.translate.y-U.translate.y&&(U.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ea=Y.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var ka=mxUtils.getDocumentScrollOrigin(document);q.style.left=ka.x+ea.left-1+"px";q.style.top=ka.y+ea.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");ba.addListener(mxEvent.CHANGE,function(){Y.style.display=
1<ba.getChildCount(ba.root)?"inline-block":"none"});Y.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ea){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
-y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=E)E.parentNode.removeChild(E),E=null;else{E=y.div;mxEvent.addListener(E,"mouseleave",function(){E.parentNode.removeChild(E);E=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);E.style.left=ka.x+ea.left-1+"px";E.style.top=
-ka.y+ea.bottom-2+"px";document.body.appendChild(E);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
+y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);F.style.left=ka.x+ea.left-1+"px";F.style.top=
+ka.y+ea.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*l);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.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;",g.setAttribute("title",this.graphConfig.title),
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*l;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
{left:-ka.x,top:-ka.y};ea={left:ea.left-ka.left,top:ea.top-ka.top,bottom:ea.bottom-ka.top,right:ea.right-ka.left};k.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ea.top+1+"px"):k.style.top=ea.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(U){for(U=mxEvent.getSource(U);null!=U;){if(U==e||U==k||U==q)return;U=U.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(U){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
@@ -4093,19 +4094,19 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){n.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-n.refresh=function(){};var D=mxUtils.bind(this,function(m){27==m.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var F=n.editor.graph,d=F.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;F.getImageFromBundles=function(m){return f.getImageUrl(m)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(q){return f.getImageUrl(q)};return m};this.graphConfig.move&&(F.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(F,n);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
-"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(F,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
+n.refresh=function(){};var D=mxUtils.bind(this,function(l){27==l.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var E=n.editor.graph,d=E.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;E.getImageFromBundles=function(l){return f.getImageUrl(l)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=g.apply(this,arguments);l.getImageFromBundles=function(q){return f.getImageUrl(q)};return l};this.graphConfig.move&&(E.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(E,n);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
+"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(E,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerHTML="",GraphViewer.createViewerForElement(e)}catch(k){e.innerHTML=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var n=document.getElementsByTagName("*");e=[];for(k=0;k<n.length;k++){var D=n[k].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&e.push(n[k]))}return e};
GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var n=JSON.parse(k),D=function(t){t=mxUtils.parseXml(t);t=new GraphViewer(b,t.documentElement,n);null!=e&&e(t)};null!=n.url?GraphViewer.getUrl(n.url,function(t){D(t)}):D(n.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(E){this.q.push(E)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function F(q,y){if(!q.resizedAttached)q.resizedAttached=
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var E=q.resizeSensor.childNodes[0],C=E.childNodes[0],H=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";E.scrollLeft=1E5;E.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};G();var aa=!1,da=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(da))};b(da);var ba,Y,qa,O;y=function(){if((qa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)aa=!0,ba=qa,Y=O;G()};var X=
-function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(E,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)F(k[f],d)}else F(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],H=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};G();var aa=!1,da=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(da))};b(da);var ba,Y,qa,O;y=function(){if((qa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)aa=!0,ba=qa,Y=O;G()};var X=
+function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(F,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var l=k.length;f<l;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
y;q++)e.detach(k[q]);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()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 90ed581e..37a65cd0 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"18.0.7",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/"),
+var mxClient={VERSION:"18.0.8",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]"!==
diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt
index f5456987..1db07670 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index 10896016..a231b9d3 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index 65220691..791690d6 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index b43c282b..9574fff5 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index dc66262e..1280fdac 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index adfe9e07..0928dbb5 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index 710acda6..7dd0342b 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index d3f28bd6..28b80c98 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index dc47d934..871ac4f4 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index 87bd43ac..adbd09c4 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index b41e1858..b62e8901 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index 41baeb4b..361a96d6 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index 56779ef1..17dac2db 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index 78890960..7c1e0aed 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_eu.txt b/src/main/webapp/resources/dia_eu.txt
index 3f6b5445..71ad9454 100644
--- a/src/main/webapp/resources/dia_eu.txt
+++ b/src/main/webapp/resources/dia_eu.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index 5d82355b..ece5cf6d 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index ca9846f1..15b8cf70 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index 6144856d..9cc1408d 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index a96b75ce..e3abad31 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_gl.txt b/src/main/webapp/resources/dia_gl.txt
index 458a0aaf..3038071e 100644
--- a/src/main/webapp/resources/dia_gl.txt
+++ b/src/main/webapp/resources/dia_gl.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index ea9e83f0..e8289052 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index df0d014b..d68dffb5 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index 3d3803ef..a283f896 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index 7777fbae..95c25485 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index 4de12e17..97bb992d 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index 09a873a0..1875116d 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=confAFileCleanFailed
confACleanOnly=confACleanOnly
brush=brush
openDevTools=openDevTools
+autoBkp=autoBkp
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index 74c4bb5c..e60a019d 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index c9c2271b..4a1b917d 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 09851259..1d1094ca 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 0c4eceba..cb83e623 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index acc4a0a6..d3bd881d 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=ìž„ì‹œ 저장 다ì´ì–´ê·¸ëž¨ "{1}" 삭제를 실패하였ì
confACleanOnly=ìž„ì‹œ ì €ìž¥ëœ ë‹¤ì´ì–´ê·¸ëž¨ë§Œ ì‚­ì œ
brush=브러시
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index fad0efa2..c0577180 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index 5875da09..48f5bf1c 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index d1a8a270..8fe28d6d 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 521e4a0a..af81f8f5 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index e45d9d9a..b82f3da0 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txt
index f5456987..1db07670 100644
--- a/src/main/webapp/resources/dia_my.txt
+++ b/src/main/webapp/resources/dia_my.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 289bd2db..e2b3f1ce 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Oude versies opschonen van diagram concept "{1}" mislukt
confACleanOnly=Alleen diagram concepten opschonen
brush=Kwast
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index d8b7c7b5..2ca08334 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index 405c3887..67abca4a 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index c5a2daf8..29d9b055 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index 2effd323..137a20b4 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index daba3009..ea538c46 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index 87dddc8c..10eba7f2 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txt
index f5456987..1db07670 100644
--- a/src/main/webapp/resources/dia_si.txt
+++ b/src/main/webapp/resources/dia_si.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index 2a6e183c..e5675381 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index 7631d95b..f8ee64c7 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index 6276ce0e..99f67408 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index 00f3f15b..65d46e57 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index b141d776..328e1a23 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index 78ed8e93..c0c37f09 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index c180da54..59b72746 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index 5eb8ade3..d8aa3e19 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index f4cc28f0..38cea6da 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index b93dd15e..c5b1c86a 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Ð§Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñтарих верÑій чернеток Ð
confACleanOnly=ЧиÑтити тільки чернетки діаграм
brush=Пензлик
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index b1599030..e656ffb4 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index d2ac83ae..88069d87 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=筆刷
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 528d1011..a70b0b8d 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -1197,3 +1197,4 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
+autoBkp=Automatic Backup
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index d9d3158c..bb6bc0eb 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-fa8c4ce5"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"4f5761c9d5c12f7e4abd5d492fe092c8"},{url:"js/extensions.min.js",revision:"73cc2b66f2ddc50354256dc6b065af7d"},{url:"js/stencils.min.js",revision:"98924b5296c015cef20b904ef861eeea"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"0611491c663261a732ff18224906184d"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"ff96548551b348ba8bf011c913edab1c"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6d5a85e70c7b82ba685782ca6df2b9d5"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"c6552981ba1add209fe3e12ffcf79c9a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"fab9a95f19a57bb836e42f67a1c0078b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"2bd677096ebffd3aa5cab0c347851e3f"},{url:"connect/confluence/viewer.js",revision:"a9d84488d17425d28e5d85d464e0a8f8"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"352d2782274de07617d117926b68c205"},{url:"connect/confluence/includeDiagram.html",revision:"5cefef0227d058cf716d1f51f2cf202f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"4a867862bf904c7ad3a64df7dad16418"},{url:"resources/dia_am.txt",revision:"4689225def33ebe303b3cb139853496a"},{url:"resources/dia_ar.txt",revision:"7f304c86dc394b9af1ad6164c6d3ddd5"},{url:"resources/dia_bg.txt",revision:"d61d74692a5bf45f73fc93f1d7e87920"},{url:"resources/dia_bn.txt",revision:"3872321b45397def596cdf1bda972b28"},{url:"resources/dia_bs.txt",revision:"a71af7c97bdc76f5aac426df06b4e3f8"},{url:"resources/dia_ca.txt",revision:"0157e5c040a2f8267eb9ca49d22e3826"},{url:"resources/dia_cs.txt",revision:"333a3ee5b7b7df98971f6d19a21f39b5"},{url:"resources/dia_da.txt",revision:"6cb7a6e408feed6af210b6d056e347ce"},{url:"resources/dia_de.txt",revision:"18e94ca0a4b7186bffd5be4469bd2034"},{url:"resources/dia_el.txt",revision:"f61edf46348bb30a2167a15ebf5c279d"},{url:"resources/dia_eo.txt",revision:"6c7972069739da31ef54bd86633d0ffa"},{url:"resources/dia_es.txt",revision:"7d7e05567922e5e513161b1dee485077"},{url:"resources/dia_et.txt",revision:"99497a7ed1e75872b306b0f644e0293d"},{url:"resources/dia_eu.txt",revision:"dee2e4b5cbf36d918d2680cd820396c5"},{url:"resources/dia_fa.txt",revision:"adccf1eca87f7b03787ace14c25d69b1"},{url:"resources/dia_fi.txt",revision:"d4ce04c27dd20140847809f289fae661"},{url:"resources/dia_fil.txt",revision:"1e4a095234dab2b0f9bf46c93954227e"},{url:"resources/dia_fr.txt",revision:"69e45804fef71e02de20e2b630b4d1a1"},{url:"resources/dia_gl.txt",revision:"0669d8f3ec00ead8714d58af07d24d66"},{url:"resources/dia_gu.txt",revision:"b608a7aa6c6fc2f131be132388b629b0"},{url:"resources/dia_he.txt",revision:"9aa9fc87c0a97f0bd241554b9b4216b6"},{url:"resources/dia_hi.txt",revision:"d8c988437bf2d9c80c44a93055c5c5f3"},{url:"resources/dia_hr.txt",revision:"e50f8893d4fbf00434de72ec9d109780"},{url:"resources/dia_hu.txt",revision:"f8b6b0735c787f7e655da7127e84b930"},{url:"resources/dia_id.txt",revision:"5466988af743d857a245c8f4f01e5159"},{url:"resources/dia_it.txt",revision:"a32f008225133eefac800cebddb8ddcb"},{url:"resources/dia_ja.txt",revision:"a683a7cd55e67852c6d639f8f4ab0a9f"},{url:"resources/dia_kn.txt",revision:"e73e06abe7f40a5734d491292e89748d"},{url:"resources/dia_ko.txt",revision:"9856ddd95c7b25be26eb99014968dc9d"},{url:"resources/dia_lt.txt",revision:"c1c24186569131733bdd45fd98d19c33"},{url:"resources/dia_lv.txt",revision:"c93d5d21c6d5864623db09c47cdb67ef"},{url:"resources/dia_ml.txt",revision:"70bd1e5024c8fb8d234575dd3e59c954"},{url:"resources/dia_mr.txt",revision:"49fb0b282abd23a20b6f818b76fa70bf"},{url:"resources/dia_ms.txt",revision:"a86c345ad3266ec55ca2f645a5043483"},{url:"resources/dia_my.txt",revision:"4a867862bf904c7ad3a64df7dad16418"},{url:"resources/dia_nl.txt",revision:"6ecd54a5d4376288499420f1bad7cb5d"},{url:"resources/dia_no.txt",revision:"787c1ef695d70116887c87bf55112b01"},{url:"resources/dia_pl.txt",revision:"efce793a77009b73b4d491e4678f5207"},{url:"resources/dia_pt-br.txt",revision:"68b48b305ed1c63f5fd55af096ec3b5b"},{url:"resources/dia_pt.txt",revision:"82f0affa616995eafd8c7f0151d1662f"},{url:"resources/dia_ro.txt",revision:"0091276e527e52e72b9dc3b87e05171c"},{url:"resources/dia_ru.txt",revision:"7004c5621dd1d1eec21e249547dc564b"},{url:"resources/dia_si.txt",revision:"4a867862bf904c7ad3a64df7dad16418"},{url:"resources/dia_sk.txt",revision:"69e29124515cbeace9d72f3b2575c871"},{url:"resources/dia_sl.txt",revision:"bc8a59b4b0a4410b1a3019cb7b7b24d6"},{url:"resources/dia_sr.txt",revision:"f6886d9c5d5c8052135bcdd5417247f0"},{url:"resources/dia_sv.txt",revision:"3ea62fbf4bfac96b2aabf9bc9a8378e4"},{url:"resources/dia_sw.txt",revision:"4ed9d255a447fa4d78efe08d7ee633af"},{url:"resources/dia_ta.txt",revision:"7eff30c11d017190ea1e13d0cbc1a32b"},{url:"resources/dia_te.txt",revision:"75f39c5c527129b4f5ccf60b2b10b7cb"},{url:"resources/dia_th.txt",revision:"bc28afe63d3b37c34e94d1874f87d22c"},{url:"resources/dia_tr.txt",revision:"a5ec306083c41ad693babc0830c338dc"},{url:"resources/dia_uk.txt",revision:"e02d3e8090a9fb30281bfd31e0469d66"},{url:"resources/dia_vi.txt",revision:"123eef638fc928a74639ee1c88dd69dc"},{url:"resources/dia_zh-tw.txt",revision:"d2d3186931252f427e8c6711ed4b79d2"},{url:"resources/dia_zh.txt",revision:"cebe4e3dd5c6c7e862a7b0205ff60dfb"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-50a29d49"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"2d3841e9541a31b42eb4058e85709e87"},{url:"js/extensions.min.js",revision:"73cc2b66f2ddc50354256dc6b065af7d"},{url:"js/stencils.min.js",revision:"98924b5296c015cef20b904ef861eeea"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"0611491c663261a732ff18224906184d"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"6c27011cd72d91fa2b1abbf935022844"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6d5a85e70c7b82ba685782ca6df2b9d5"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"c6552981ba1add209fe3e12ffcf79c9a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"fab9a95f19a57bb836e42f67a1c0078b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"2bd677096ebffd3aa5cab0c347851e3f"},{url:"connect/confluence/viewer.js",revision:"a9d84488d17425d28e5d85d464e0a8f8"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"352d2782274de07617d117926b68c205"},{url:"connect/confluence/includeDiagram.html",revision:"5cefef0227d058cf716d1f51f2cf202f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"8e34c9af7f8d502cfd1584a3906efde0"},{url:"resources/dia_am.txt",revision:"b1cae5291215a5034ac42f73b027c5d7"},{url:"resources/dia_ar.txt",revision:"6e4736c460473f556a0ac7650a1f99a3"},{url:"resources/dia_bg.txt",revision:"b6c2c2451b0e31f0925eed924289e05c"},{url:"resources/dia_bn.txt",revision:"78daf0565086adf9e1672d6f1317bda5"},{url:"resources/dia_bs.txt",revision:"06bac1fee85828b8db2837fd334adfcc"},{url:"resources/dia_ca.txt",revision:"2e034dfde79b3feb3484a26b1f6c357d"},{url:"resources/dia_cs.txt",revision:"d177d00f8f1d1b9aeac81df181136ca0"},{url:"resources/dia_da.txt",revision:"f244c674d2863b1d4a4019c5618a7fc0"},{url:"resources/dia_de.txt",revision:"73fdf0841d2c247d51a95e83aa8b0995"},{url:"resources/dia_el.txt",revision:"5284df86fb89f04e57270c1418c6becb"},{url:"resources/dia_eo.txt",revision:"72f2fc6768b1b710b4c054582588857f"},{url:"resources/dia_es.txt",revision:"4c41cd24505f6bf2d2beca8fb29dbc52"},{url:"resources/dia_et.txt",revision:"cc9e2bd4f79f4782b0a4f956f7a7d887"},{url:"resources/dia_eu.txt",revision:"a9e20c40c84023b9886fba2657d3b3a6"},{url:"resources/dia_fa.txt",revision:"48ef8e033a7e66d981a8e31eb46d7c2d"},{url:"resources/dia_fi.txt",revision:"07a230a6649d527f6fcc71190852d60f"},{url:"resources/dia_fil.txt",revision:"41d4669b6e560b4856f9ec31169d801e"},{url:"resources/dia_fr.txt",revision:"2b69ce9fcfa150e21b5f3b82baa62a83"},{url:"resources/dia_gl.txt",revision:"f696a37829215a03d74b577f0e193d39"},{url:"resources/dia_gu.txt",revision:"83cfd5e26cea2e31c14ac6be912295f3"},{url:"resources/dia_he.txt",revision:"0335866f8064454819141659ac422ca1"},{url:"resources/dia_hi.txt",revision:"92fe4218858dcbe8d30351799df0f4ca"},{url:"resources/dia_hr.txt",revision:"c7dee00a9cb74656e538646681aaa8b9"},{url:"resources/dia_hu.txt",revision:"5a28c9a4c4a52beb39da3aff77cb176a"},{url:"resources/dia_id.txt",revision:"c927e56e3b2121a9042ce9f284a126f9"},{url:"resources/dia_it.txt",revision:"ae1d326f35a964fada09f7c69948fa08"},{url:"resources/dia_ja.txt",revision:"ba6d3ca71cd2c0b78f24426495141105"},{url:"resources/dia_kn.txt",revision:"ecc38aad8980d8f546ce745b3beac484"},{url:"resources/dia_ko.txt",revision:"25cb961c38bad57e5ff76292a57652a5"},{url:"resources/dia_lt.txt",revision:"ef23c72e2256478a443874be1f61ca37"},{url:"resources/dia_lv.txt",revision:"2c35489f81edad8a8b017b77847c5e1d"},{url:"resources/dia_ml.txt",revision:"b9dd65e0ea3145fa005a9ff4042087ec"},{url:"resources/dia_mr.txt",revision:"e94f5f2050375652beb186f1836a4778"},{url:"resources/dia_ms.txt",revision:"0f87275e26a884927643a187a9468942"},{url:"resources/dia_my.txt",revision:"8e34c9af7f8d502cfd1584a3906efde0"},{url:"resources/dia_nl.txt",revision:"e275240e3c513e1b2e598ea564c38dca"},{url:"resources/dia_no.txt",revision:"d19f878a809337bed2a91da1a9dfeffd"},{url:"resources/dia_pl.txt",revision:"1bab2f1b6ddbd728e485ff64c86d0425"},{url:"resources/dia_pt-br.txt",revision:"2372f6fbd1e21c0b183b180bc94e1e63"},{url:"resources/dia_pt.txt",revision:"3e3e073a2dd715015c3d95ed227f411d"},{url:"resources/dia_ro.txt",revision:"1eab1efc5eab57335c49c0862d30d323"},{url:"resources/dia_ru.txt",revision:"b40ee1842311d03cd356d2f8fa645db7"},{url:"resources/dia_si.txt",revision:"8e34c9af7f8d502cfd1584a3906efde0"},{url:"resources/dia_sk.txt",revision:"a3e4a57e303e6bb2d60da6f8c78992fe"},{url:"resources/dia_sl.txt",revision:"d7f8c99d531f89e14c3cd2deaf576eef"},{url:"resources/dia_sr.txt",revision:"3167385790cec85acecd1c6ecaa74929"},{url:"resources/dia_sv.txt",revision:"c43570ee17b78766d6e6659363625f1d"},{url:"resources/dia_sw.txt",revision:"6326dcb2d3266cc71194a8118ffcc4f0"},{url:"resources/dia_ta.txt",revision:"f4573d8b89013b7e06f3bae1ae66d8cf"},{url:"resources/dia_te.txt",revision:"37b45cfce7ee5c8507d92b9f1dbeab3d"},{url:"resources/dia_th.txt",revision:"24338a7fa8e8a1c7a58058bf082fe614"},{url:"resources/dia_tr.txt",revision:"897b674fcf3b42e63cbf725d74c7473b"},{url:"resources/dia_uk.txt",revision:"e44438f964e9222286c18cfbf8c1fdab"},{url:"resources/dia_vi.txt",revision:"1c24f857d15d5a48926c7fd04923675d"},{url:"resources/dia_zh-tw.txt",revision:"e862d6b91264121956038107be20163d"},{url:"resources/dia_zh.txt",revision:"67598bcff64219afb6267ce6030ae007"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index cd97b488..696cbb39 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/1806f1d933193d714ed46713f54a4ad6/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"4f5761c9d5c12f7e4abd5d492fe092c8\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"73cc2b66f2ddc50354256dc6b065af7d\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"98924b5296c015cef20b904ef861eeea\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"0611491c663261a732ff18224906184d\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"ff96548551b348ba8bf011c913edab1c\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6d5a85e70c7b82ba685782ca6df2b9d5\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"c6552981ba1add209fe3e12ffcf79c9a\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"fab9a95f19a57bb836e42f67a1c0078b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"2bd677096ebffd3aa5cab0c347851e3f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"a9d84488d17425d28e5d85d464e0a8f8\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"352d2782274de07617d117926b68c205\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"5cefef0227d058cf716d1f51f2cf202f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"4a867862bf904c7ad3a64df7dad16418\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"4689225def33ebe303b3cb139853496a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"7f304c86dc394b9af1ad6164c6d3ddd5\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d61d74692a5bf45f73fc93f1d7e87920\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"3872321b45397def596cdf1bda972b28\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"a71af7c97bdc76f5aac426df06b4e3f8\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"0157e5c040a2f8267eb9ca49d22e3826\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"333a3ee5b7b7df98971f6d19a21f39b5\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"6cb7a6e408feed6af210b6d056e347ce\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"18e94ca0a4b7186bffd5be4469bd2034\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"f61edf46348bb30a2167a15ebf5c279d\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6c7972069739da31ef54bd86633d0ffa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"7d7e05567922e5e513161b1dee485077\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"99497a7ed1e75872b306b0f644e0293d\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"dee2e4b5cbf36d918d2680cd820396c5\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"adccf1eca87f7b03787ace14c25d69b1\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"d4ce04c27dd20140847809f289fae661\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"1e4a095234dab2b0f9bf46c93954227e\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"69e45804fef71e02de20e2b630b4d1a1\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"0669d8f3ec00ead8714d58af07d24d66\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"b608a7aa6c6fc2f131be132388b629b0\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"9aa9fc87c0a97f0bd241554b9b4216b6\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"d8c988437bf2d9c80c44a93055c5c5f3\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"e50f8893d4fbf00434de72ec9d109780\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f8b6b0735c787f7e655da7127e84b930\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"5466988af743d857a245c8f4f01e5159\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"a32f008225133eefac800cebddb8ddcb\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"a683a7cd55e67852c6d639f8f4ab0a9f\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"e73e06abe7f40a5734d491292e89748d\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"9856ddd95c7b25be26eb99014968dc9d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"c1c24186569131733bdd45fd98d19c33\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"c93d5d21c6d5864623db09c47cdb67ef\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"70bd1e5024c8fb8d234575dd3e59c954\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"49fb0b282abd23a20b6f818b76fa70bf\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"a86c345ad3266ec55ca2f645a5043483\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4a867862bf904c7ad3a64df7dad16418\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"6ecd54a5d4376288499420f1bad7cb5d\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"787c1ef695d70116887c87bf55112b01\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"efce793a77009b73b4d491e4678f5207\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"68b48b305ed1c63f5fd55af096ec3b5b\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"82f0affa616995eafd8c7f0151d1662f\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"0091276e527e52e72b9dc3b87e05171c\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"7004c5621dd1d1eec21e249547dc564b\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"4a867862bf904c7ad3a64df7dad16418\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"69e29124515cbeace9d72f3b2575c871\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"bc8a59b4b0a4410b1a3019cb7b7b24d6\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"f6886d9c5d5c8052135bcdd5417247f0\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3ea62fbf4bfac96b2aabf9bc9a8378e4\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"4ed9d255a447fa4d78efe08d7ee633af\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"7eff30c11d017190ea1e13d0cbc1a32b\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"75f39c5c527129b4f5ccf60b2b10b7cb\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bc28afe63d3b37c34e94d1874f87d22c\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"a5ec306083c41ad693babc0830c338dc\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"e02d3e8090a9fb30281bfd31e0469d66\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"123eef638fc928a74639ee1c88dd69dc\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"d2d3186931252f427e8c6711ed4b79d2\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"cebe4e3dd5c6c7e862a7b0205ff60dfb\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/eb09853e43636a99d984568ec70901c7/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"2d3841e9541a31b42eb4058e85709e87\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"73cc2b66f2ddc50354256dc6b065af7d\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"98924b5296c015cef20b904ef861eeea\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"0611491c663261a732ff18224906184d\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"6c27011cd72d91fa2b1abbf935022844\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6d5a85e70c7b82ba685782ca6df2b9d5\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"c6552981ba1add209fe3e12ffcf79c9a\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"fab9a95f19a57bb836e42f67a1c0078b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"2bd677096ebffd3aa5cab0c347851e3f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"a9d84488d17425d28e5d85d464e0a8f8\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"352d2782274de07617d117926b68c205\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"5cefef0227d058cf716d1f51f2cf202f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"8e34c9af7f8d502cfd1584a3906efde0\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"b1cae5291215a5034ac42f73b027c5d7\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"6e4736c460473f556a0ac7650a1f99a3\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"b6c2c2451b0e31f0925eed924289e05c\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"78daf0565086adf9e1672d6f1317bda5\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"06bac1fee85828b8db2837fd334adfcc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"2e034dfde79b3feb3484a26b1f6c357d\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"d177d00f8f1d1b9aeac81df181136ca0\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"f244c674d2863b1d4a4019c5618a7fc0\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"73fdf0841d2c247d51a95e83aa8b0995\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"5284df86fb89f04e57270c1418c6becb\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"72f2fc6768b1b710b4c054582588857f\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"4c41cd24505f6bf2d2beca8fb29dbc52\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"cc9e2bd4f79f4782b0a4f956f7a7d887\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a9e20c40c84023b9886fba2657d3b3a6\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"48ef8e033a7e66d981a8e31eb46d7c2d\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"07a230a6649d527f6fcc71190852d60f\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"41d4669b6e560b4856f9ec31169d801e\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"2b69ce9fcfa150e21b5f3b82baa62a83\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"f696a37829215a03d74b577f0e193d39\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"83cfd5e26cea2e31c14ac6be912295f3\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"0335866f8064454819141659ac422ca1\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"92fe4218858dcbe8d30351799df0f4ca\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"c7dee00a9cb74656e538646681aaa8b9\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"5a28c9a4c4a52beb39da3aff77cb176a\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"c927e56e3b2121a9042ce9f284a126f9\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"ae1d326f35a964fada09f7c69948fa08\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"ba6d3ca71cd2c0b78f24426495141105\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ecc38aad8980d8f546ce745b3beac484\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"25cb961c38bad57e5ff76292a57652a5\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"ef23c72e2256478a443874be1f61ca37\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"2c35489f81edad8a8b017b77847c5e1d\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"b9dd65e0ea3145fa005a9ff4042087ec\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e94f5f2050375652beb186f1836a4778\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"0f87275e26a884927643a187a9468942\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"8e34c9af7f8d502cfd1584a3906efde0\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e275240e3c513e1b2e598ea564c38dca\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"d19f878a809337bed2a91da1a9dfeffd\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"1bab2f1b6ddbd728e485ff64c86d0425\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"2372f6fbd1e21c0b183b180bc94e1e63\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"3e3e073a2dd715015c3d95ed227f411d\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1eab1efc5eab57335c49c0862d30d323\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"b40ee1842311d03cd356d2f8fa645db7\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"8e34c9af7f8d502cfd1584a3906efde0\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"a3e4a57e303e6bb2d60da6f8c78992fe\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"d7f8c99d531f89e14c3cd2deaf576eef\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"3167385790cec85acecd1c6ecaa74929\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"c43570ee17b78766d6e6659363625f1d\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"6326dcb2d3266cc71194a8118ffcc4f0\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"f4573d8b89013b7e06f3bae1ae66d8cf\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"37b45cfce7ee5c8507d92b9f1dbeab3d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"24338a7fa8e8a1c7a58058bf082fe614\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"897b674fcf3b42e63cbf725d74c7473b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"e44438f964e9222286c18cfbf8c1fdab\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"1c24f857d15d5a48926c7fd04923675d\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"e862d6b91264121956038107be20163d\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"67598bcff64219afb6267ce6030ae007\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
diff --git a/src/main/webapp/workbox-50a29d49.js b/src/main/webapp/workbox-50a29d49.js
new file mode 100644
index 00000000..5999151e
--- /dev/null
+++ b/src/main/webapp/workbox-50a29d49.js
@@ -0,0 +1,2 @@
+define("./workbox-50a29d49.js",["exports"],(function(t){"use strict";try{self["workbox:core:6.2.4"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.2.4"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const a=t.method;if(!o&&this.i.has(a)&&(o=this.i.get(a)),!o)return;let c;try{c=o.handle({url:s,request:t,event:e,params:i})}catch(t){c=Promise.reject(t)}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let a;const c={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[c.prefix,t,c.suffix].filter((t=>t&&t.length>0)).join("-"),u=t=>t||h(c.precache),l=t=>t||h(c.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.2.4"]&&_()}catch(t){}function w(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class d{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class p{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let y;async function g(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,a=function(){if(void 0===y){const t=new Response("");if("body"in t)try{new Response(t.body),y=!0}catch(t){y=!1}y=!1}return y}()?i.body:await i.blob();return new Response(a,o)}function R(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class m{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const v=new Set;try{self["workbox:strategies:6.2.4"]&&_()}catch(t){}function q(t){return"string"==typeof t?new Request(t):t}class U{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new m,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=q(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=q(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=q(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const a=await this.v(e);if(!a)return!1;const{cacheName:c,matchOptions:h}=this.l,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=R(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===R(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?a.clone():a)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of v)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){if(!this.u[e]){let s=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))s=q(await t({mode:e,request:s,event:this.event,params:this.params}));this.u[e]=s}return this.u[e]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class b extends class{constructor(t){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new U(this,{event:e,request:s,params:n}),r=this.q(i,s,e);return[r,this.U(r,i,s,e)]}async q(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.L(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async U(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}{constructor(t){t.cacheName=u(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.C(t,e):await this.O(t,e))}async O(t,e){let n;const i=e.params||{};if(!this._)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:r||s})),s&&o&&(this.N(),await e.cachePut(t,n.clone()))}return n}async C(t,e){this.N();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}b.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},b.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await g(t):t};class L{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.k=new Map,this.j=new Map,this.K=new Map,this.l=new b({cacheName:u(t),plugins:[...e,new p({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.T||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.T=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=w(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.k.has(i)&&this.k.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.k.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.K.has(t)&&this.K.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.K.set(t,n.integrity)}if(this.k.set(i,t),this.j.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return f(t,(async()=>{const e=new d;this.strategy.plugins.push(e);for(const[e,s]of this.k){const n=this.K.get(s),i=this.j.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return f(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.k.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.k}getCachedURLs(){return[...this.k.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.k.get(e.href)}getIntegrityForCacheKey(t){return this.K.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let C;const E=()=>(C||(C=new L),C);class O extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}function x(t){const e=E();!function(t,e,n){let c;if("string"==typeof t){const s=new URL(t,location.href);c=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)c=new r(t,e,n);else if("function"==typeof t)c=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});c=t}(a||(a=new o,a.addFetchListener(),a.addCacheListener()),a).registerRoute(c)}(new O(e,t))}t.precacheAndRoute=function(t,e){!function(t){E().precache(t)}(t),x(e)}}));
+//# sourceMappingURL=workbox-50a29d49.js.map
diff --git a/src/main/webapp/workbox-50a29d49.js.map b/src/main/webapp/workbox-50a29d49.js.map
new file mode 100644
index 00000000..e7f04bd8
--- /dev/null
+++ b/src/main/webapp/workbox-50a29d49.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"workbox-50a29d49.js","sources":["../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_version.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/logger.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/models/messages/messageGenerator.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/WorkboxError.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/_version.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/constants.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/normalizeHandler.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/Route.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/RegExpRoute.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/Router.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/cacheNames.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/waitUntil.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/_version.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/createCacheKey.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/PrecacheInstallReportPlugin.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/PrecacheCacheKeyPlugin.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/copyResponse.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/cacheMatchIgnoreParams.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/Deferred.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/models/quotaErrorCallbacks.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-strategies/_version.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-strategies/StrategyHandler.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/timeout.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/getFriendlyURL.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheStrategy.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-strategies/Strategy.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheController.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/getOrCreatePrecacheController.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheRoute.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/generateURLVariations.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/removeIgnoredSearchParams.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/addRoute.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-routing/registerRoute.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.js","../../../../../../../opt/hostedtoolcache/node/14.19.2/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precache.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:6.2.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production' ? null : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in self)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null,\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n})());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = (process.env.NODE_ENV === 'production') ?\n fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:6.2.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array<string>}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof module:workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {module:workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {module:workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * [Route]{@link module:workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing}\n *\n * @memberof module:workbox-routing\n * @extends module:workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * [handler's]{@link module:workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if ((url.origin !== location.origin) && (result.index !== 0)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a FetchEvent through one or more\n * [Routes]{@link module:workbox-routing.Route} responding with a Request if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof module:workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map<string, Array<module:workbox-routing.Route>>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n if (event.data && event.data.type === 'CACHE_URLS') { // eslint-disable-line\n const { payload } = event.data; // eslint-disable-line\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array<Promise<Response> | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise<Response>|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([\n `Found a route to handle this request:`, route,\n ]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`, params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise && (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if ((matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0)) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {module:workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {module:workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A utility method that makes it easier to use `event.waitUntil` with\n * async functions and return the result.\n *\n * @param {ExtendableEvent} event\n * @param {Function} asyncFn\n * @return {Function}\n * @private\n */\nfunction waitUntil(event, asyncFn) {\n const returnPromise = asyncFn();\n event.waitUntil(returnPromise);\n return returnPromise;\n}\nexport { waitUntil };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:precaching:6.2.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport '../_version.js';\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object|string} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n const { revision, url } = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const cacheKeyURL = new URL(url, location.href);\n const originalURL = new URL(url, location.href);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to determine the\n * of assets that were updated (or not updated) during the install event.\n *\n * @private\n */\nclass PrecacheInstallReportPlugin {\n constructor() {\n this.updatedURLs = [];\n this.notUpdatedURLs = [];\n this.handlerWillStart = async ({ request, state, }) => {\n // TODO: `state` should never be undefined...\n if (state) {\n state.originalRequest = request;\n }\n };\n this.cachedResponseWillBeUsed = async ({ event, state, cachedResponse, }) => {\n if (event.type === 'install') {\n if (state && state.originalRequest\n && state.originalRequest instanceof Request) {\n // TODO: `state` should never be undefined...\n const url = state.originalRequest.url;\n if (cachedResponse) {\n this.notUpdatedURLs.push(url);\n }\n else {\n this.updatedURLs.push(url);\n }\n }\n }\n return cachedResponse;\n };\n }\n}\nexport { PrecacheInstallReportPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to translate URLs into\n * the corresponding cache key, based on the current revision info.\n *\n * @private\n */\nclass PrecacheCacheKeyPlugin {\n constructor({ precacheController }) {\n this.cacheKeyWillBeUsed = async ({ request, params, }) => {\n // Params is type any, can't change right now.\n /* eslint-disable */\n const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) ||\n this._precacheController.getCacheKeyForURL(request.url);\n /* eslint-enable */\n return cacheKey\n ? new Request(cacheKey, { headers: request.headers })\n : request;\n };\n this._precacheController = precacheController;\n }\n}\nexport { PrecacheCacheKeyPlugin };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a new `Response` from a `response.body` stream.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `Response` from a `response.body` stream, `false` otherwise.\n *\n * @private\n */\nfunction canConstructResponseFromBodyStream() {\n if (supportStatus === undefined) {\n const testResponse = new Response('');\n if ('body' in testResponse) {\n try {\n new Response(testResponse.body);\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n supportStatus = false;\n }\n return supportStatus;\n}\nexport { canConstructResponseFromBodyStream };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Allows developers to copy a response and modify its `headers`, `status`,\n * or `statusText` values (the values settable via a\n * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}\n * object in the constructor).\n * To modify these values, pass a function as the second argument. That\n * function will be invoked with a single object with the response properties\n * `{headers, status, statusText}`. The return value of this function will\n * be used as the `ResponseInit` for the new `Response`. To change the values\n * either modify the passed parameter(s) and return it, or return a totally\n * new object.\n *\n * This method is intentionally limited to same-origin responses, regardless of\n * whether CORS was used or not.\n *\n * @param {Response} response\n * @param {Function} modifier\n * @memberof module:workbox-core\n */\nasync function copyResponse(response, modifier) {\n let origin = null;\n // If response.url isn't set, assume it's cross-origin and keep origin null.\n if (response.url) {\n const responseURL = new URL(response.url);\n origin = responseURL.origin;\n }\n if (origin !== self.location.origin) {\n throw new WorkboxError('cross-origin-copy-response', { origin });\n }\n const clonedResponse = response.clone();\n // Create a fresh `ResponseInit` object by cloning the headers.\n const responseInit = {\n headers: new Headers(clonedResponse.headers),\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n };\n // Apply any user modifications.\n const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n // Create the new response from the body stream and `ResponseInit`\n // modifications. Note: not all browsers support the Response.body stream,\n // so fall back to reading the entire body into memory as a blob.\n const body = canConstructResponseFromBodyStream() ?\n clonedResponse.body : await clonedResponse.blob();\n return new Response(body, modifiedResponseInit);\n}\nexport { copyResponse };\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array<string>} ignoreParams\n * @return {Promise<Response|undefined>}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:6.2.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return (typeof input === 'string') ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance instance calls\n * [handle()]{@link module:workbox-strategies.Strategy~handle} or\n * [handleAll()]{@link module:workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof module:workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {module:workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * [match callback]{@link module:workbox-routing~matchCallback},\n * (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof module:workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof module:workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof module:workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * [match callback]{@link module:workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof module:workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise<Response>}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = await event.preloadResponse;\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail') ?\n request.clone() : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', { thrownErrorMessage: err.message });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ?\n undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise<Response>}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cachedResponseWillByUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise<Response|undefined>} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse = (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise<boolean>} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions) :\n null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ?\n responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise<Request>}\n */\n async getCacheKey(request, mode) {\n if (!this._cacheKeys[mode]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params,\n }));\n }\n this._cacheKeys[mode] = effectiveRequest;\n }\n return this._cacheKeys[mode];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * [`iterateCallbacks()`]{@link module:workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array<Function>}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * [`doneWaiting()`]{@link module:workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * [`waitUntil()`]{@link module:workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread my be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n let promise;\n while (promise = this._extendLifetimePromises.shift()) {\n await promise;\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise<Response|undefined>}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache = (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof module:workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { copyResponse } from 'workbox-core/copyResponse.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from 'workbox-strategies/Strategy.js';\nimport './_version.js';\n/**\n * A [Strategy]{@link module:workbox-strategies.Strategy} implementation\n * specifically designed to work with\n * [PrecacheController]{@link module:workbox-precaching.PrecacheController}\n * to both cache and fetch precached assets.\n *\n * Note: an instance of this class is created automatically when creating a\n * `PrecacheController`; it's generally not necessary to create this yourself.\n *\n * @extends module:workbox-strategies.Strategy\n * @memberof module:workbox-precaching\n */\nclass PrecacheStrategy extends Strategy {\n /**\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * [workbox-core]{@link module:workbox-core.cacheNames}.\n * @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor(options = {}) {\n options.cacheName = cacheNames.getPrecacheName(options.cacheName);\n super(options);\n this._fallbackToNetwork =\n options.fallbackToNetwork === false ? false : true;\n // Redirected responses cannot be used to satisfy a navigation request, so\n // any redirected response must be \"copied\" rather than cloned, so the new\n // response doesn't contain the `redirected` flag. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1\n this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {module:workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise<Response>}\n */\n async _handle(request, handler) {\n const response = await handler.cacheMatch(request);\n if (response) {\n return response;\n }\n // If this is an `install` event for an entry that isn't already cached,\n // then populate the cache.\n if (handler.event && handler.event.type === 'install') {\n return await this._handleInstall(request, handler);\n }\n // Getting here means something went wrong. An entry that should have been\n // precached wasn't found in the cache.\n return await this._handleFetch(request, handler);\n }\n async _handleFetch(request, handler) {\n let response;\n const params = (handler.params || {});\n // Fall back to the network if we're configured to do so.\n if (this._fallbackToNetwork) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` +\n `found. Falling back to the network.`);\n }\n const integrityInManifest = params.integrity;\n const integrityInRequest = request.integrity;\n const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n response = await handler.fetch(new Request(request, {\n integrity: integrityInRequest || integrityInManifest,\n }));\n // It's only \"safe\" to repair the cache if we're using SRI to guarantee\n // that the response matches the precache manifest's expectations,\n // and there's either a) no integrity property in the incoming request\n // or b) there is an integrity, and it matches the precache manifest.\n // See https://github.com/GoogleChrome/workbox/issues/2858\n if (integrityInManifest && noIntegrityConflict) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const wasCached = await handler.cachePut(request, response.clone());\n if (process.env.NODE_ENV !== 'production') {\n if (wasCached) {\n logger.log(`A response for ${getFriendlyURL(request.url)} ` +\n `was used to \"repair\" the precache.`);\n }\n }\n }\n }\n else {\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new WorkboxError('missing-precache-entry', {\n cacheName: this.cacheName,\n url: request.url,\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));\n logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n return response;\n }\n async _handleInstall(request, handler) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const response = await handler.fetch(request);\n // Make sure we defer cachePut() until after we know the response\n // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737\n const wasCached = await handler.cachePut(request, response.clone());\n if (!wasCached) {\n // Throwing here will lead to the `install` handler failing, which\n // we want to do if *any* of the responses aren't safe to cache.\n throw new WorkboxError('bad-precaching-response', {\n url: request.url,\n status: response.status,\n });\n }\n return response;\n }\n /**\n * This method is complex, as there a number of things to account for:\n *\n * The `plugins` array can be set at construction, and/or it might be added to\n * to at any time before the strategy is used.\n *\n * At the time the strategy is used (i.e. during an `install` event), there\n * needs to be at least one plugin that implements `cacheWillUpdate` in the\n * array, other than `copyRedirectedCacheableResponsesPlugin`.\n *\n * - If this method is called and there are no suitable `cacheWillUpdate`\n * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n *\n * - If this method is called and there is exactly one `cacheWillUpdate`, then\n * we don't have to do anything (this might be a previously added\n * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n *\n * - If this method is called and there is more than one `cacheWillUpdate`,\n * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n * we need to remove it. (This situation is unlikely, but it could happen if\n * the strategy is used multiple times, the first without a `cacheWillUpdate`,\n * and then later on after manually adding a custom `cacheWillUpdate`.)\n *\n * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n *\n * @private\n */\n _useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }\n}\nPrecacheStrategy.defaultPrecacheCacheabilityPlugin = {\n async cacheWillUpdate({ response }) {\n if (!response || response.status >= 400) {\n return null;\n }\n return response;\n },\n};\nPrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {\n async cacheWillUpdate({ response }) {\n return response.redirected ? await copyResponse(response) : response;\n },\n};\nexport { PrecacheStrategy };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof module:workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * [workbox-core]{@link module:workbox-core.cacheNames}.\n * @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n */\n constructor(options = {}) {\n /**\n * Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * [workbox-core]{@link module:workbox-core.cacheNames}.\n *\n * @type {string}\n */\n this.cacheName = cacheNames.getRuntimeName(options.cacheName);\n /**\n * The list\n * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * used by this strategy.\n *\n * @type {Array<Object>}\n */\n this.plugins = options.plugins || [];\n /**\n * Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n *\n * @type {Object}\n */\n this.fetchOptions = options.fetchOptions;\n /**\n * The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n *\n * @type {Object}\n */\n this.matchOptions = options.matchOptions;\n }\n /**\n * Perform a request strategy and returns a `Promise` that will resolve with\n * a `Response`, invoking all relevant plugin callbacks.\n *\n * When a strategy instance is registered with a Workbox\n * [route]{@link module:workbox-routing.Route}, this method is automatically\n * called when the route matches.\n *\n * Alternatively, this method can be used in a standalone `FetchEvent`\n * listener by passing it to `event.respondWith()`.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n */\n handle(options) {\n const [responseDone] = this.handleAll(options);\n return responseDone;\n }\n /**\n * Similar to [`handle()`]{@link module:workbox-strategies.Strategy~handle}, but\n * instead of just returning a `Promise` that resolves to a `Response` it\n * it will return an tuple of [response, done] promises, where the former\n * (`response`) is equivalent to what `handle()` returns, and the latter is a\n * Promise that will resolve once any promises that were added to\n * `event.waitUntil()` as part of performing the strategy have completed.\n *\n * You can await the `done` promise to ensure any extra work performed by\n * the strategy (usually caching responses) completes successfully.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * @return {Array<Promise>} A tuple of [response, done]\n * promises that can be used to determine when the response resolves as\n * well as when the handler has completed all its work.\n */\n handleAll(options) {\n // Allow for flexible options to be passed.\n if (options instanceof FetchEvent) {\n options = {\n event: options,\n request: options.request,\n };\n }\n const event = options.event;\n const request = typeof options.request === 'string' ?\n new Request(options.request) :\n options.request;\n const params = 'params' in options ? options.params : undefined;\n const handler = new StrategyHandler(this, { event, request, params });\n const responseDone = this._getResponse(handler, request, event);\n const handlerDone = this._awaitComplete(responseDone, handler, request, event);\n // Return an array of promises, suitable for use with Promise.all().\n return [responseDone, handlerDone];\n }\n async _getResponse(handler, request, event) {\n await handler.runCallbacks('handlerWillStart', { event, request });\n let response = undefined;\n try {\n response = await this._handle(request, handler);\n // The \"official\" Strategy subclasses all throw this error automatically,\n // but in case a third-party Strategy doesn't, ensure that we have a\n // consistent failure when there's no response or an error response.\n if (!response || response.type === 'error') {\n throw new WorkboxError('no-response', { url: request.url });\n }\n }\n catch (error) {\n if (error instanceof Error) {\n for (const callback of handler.iterateCallbacks('handlerDidError')) {\n response = await callback({ error, event, request });\n if (response) {\n break;\n }\n }\n }\n if (!response) {\n throw error;\n }\n else if (process.env.NODE_ENV !== 'production') {\n logger.log(`While responding to '${getFriendlyURL(request.url)}', ` +\n `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` +\n `a handlerDidError plugin.`);\n }\n }\n for (const callback of handler.iterateCallbacks('handlerWillRespond')) {\n response = await callback({ event, request, response });\n }\n return response;\n }\n async _awaitComplete(responseDone, handler, request, event) {\n let response;\n let error;\n try {\n response = await responseDone;\n }\n catch (error) {\n // Ignore errors, as response errors should be caught via the `response`\n // promise above. The `done` promise will only throw for errors in\n // promises passed to `handler.waitUntil()`.\n }\n try {\n await handler.runCallbacks('handlerDidRespond', {\n event,\n request,\n response,\n });\n await handler.doneWaiting();\n }\n catch (waitUntilError) {\n if (waitUntilError instanceof Error) {\n error = waitUntilError;\n }\n }\n await handler.runCallbacks('handlerDidComplete', {\n event,\n request,\n response,\n error: error,\n });\n handler.destroy();\n if (error) {\n throw error;\n }\n }\n}\nexport { Strategy };\n/**\n * Classes extending the `Strategy` based class should implement this method,\n * and leverage the [`handler`]{@link module:workbox-strategies.StrategyHandler}\n * arg to perform all fetching and cache logic, which will ensure all relevant\n * cache, cache options, fetch options and plugins are used (per the current\n * strategy instance).\n *\n * @name _handle\n * @instance\n * @abstract\n * @function\n * @param {Request} request\n * @param {module:workbox-strategies.StrategyHandler} handler\n * @return {Promise<Response>}\n *\n * @memberof module:workbox-strategies.Strategy\n */\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { waitUntil } from 'workbox-core/_private/waitUntil.js';\nimport { createCacheKey } from './utils/createCacheKey.js';\nimport { PrecacheInstallReportPlugin } from './utils/PrecacheInstallReportPlugin.js';\nimport { PrecacheCacheKeyPlugin } from './utils/PrecacheCacheKeyPlugin.js';\nimport { printCleanupDetails } from './utils/printCleanupDetails.js';\nimport { printInstallDetails } from './utils/printInstallDetails.js';\nimport { PrecacheStrategy } from './PrecacheStrategy.js';\nimport './_version.js';\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof module:workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] The cache to use for precaching.\n * @param {string} [options.plugins] Plugins to use when precaching as well\n * as responding to fetch events for precached assets.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor({ cacheName, plugins = [], fallbackToNetwork = true } = {}) {\n this._urlsToCacheKeys = new Map();\n this._urlsToCacheModes = new Map();\n this._cacheKeysToIntegrities = new Map();\n this._strategy = new PrecacheStrategy({\n cacheName: cacheNames.getPrecacheName(cacheName),\n plugins: [\n ...plugins,\n new PrecacheCacheKeyPlugin({ precacheController: this }),\n ],\n fallbackToNetwork,\n });\n // Bind the install and activate methods to the instance.\n this.install = this.install.bind(this);\n this.activate = this.activate.bind(this);\n }\n /**\n * @type {module:workbox-precaching.PrecacheStrategy} The strategy created by this controller and\n * used to cache assets and respond to fetch events.\n */\n get strategy() {\n return this._strategy;\n }\n /**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * [\"precache cache\"]{@link module:workbox-core.cacheNames} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * @param {Array<Object|string>} [entries=[]] Array of entries to precache.\n */\n precache(entries) {\n this.addToCacheList(entries);\n if (!this._installAndActiveListenersAdded) {\n self.addEventListener('install', this.install);\n self.addEventListener('activate', this.activate);\n this._installAndActiveListenersAdded = true;\n }\n }\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {Array<module:workbox-precaching.PrecacheController.PrecacheEntry|string>} entries\n * Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n const urlsToWarnAbout = [];\n for (const entry of entries) {\n // See https://github.com/GoogleChrome/workbox/issues/2259\n if (typeof entry === 'string') {\n urlsToWarnAbout.push(entry);\n }\n else if (entry && entry.revision === undefined) {\n urlsToWarnAbout.push(entry.url);\n }\n const { cacheKey, url } = createCacheKey(entry);\n const cacheMode = (typeof entry !== 'string' && entry.revision) ?\n 'reload' : 'default';\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n if (typeof entry !== 'string' && entry.integrity) {\n if (this._cacheKeysToIntegrities.has(cacheKey) &&\n this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {\n throw new WorkboxError('add-to-cache-list-conflicting-integrities', {\n url,\n });\n }\n this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n this._urlsToCacheModes.set(url, cacheMode);\n if (urlsToWarnAbout.length > 0) {\n const warningMessage = `Workbox is precaching URLs without revision ` +\n `info: ${urlsToWarnAbout.join(', ')}\\nThis is generally NOT safe. ` +\n `Learn more at https://bit.ly/wb-precache`;\n if (process.env.NODE_ENV === 'production') {\n // Use console directly to display this warning without bloating\n // bundle sizes by pulling in all of the logger codebase in prod.\n console.warn(warningMessage);\n }\n else {\n logger.warn(warningMessage);\n }\n }\n }\n }\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise<module:workbox-precaching.InstallResult>}\n */\n install(event) {\n // waitUntil returns Promise<any>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const installReportPlugin = new PrecacheInstallReportPlugin();\n this.strategy.plugins.push(installReportPlugin);\n // Cache entries one at a time.\n // See https://github.com/GoogleChrome/workbox/issues/2528\n for (const [url, cacheKey] of this._urlsToCacheKeys) {\n const integrity = this._cacheKeysToIntegrities.get(cacheKey);\n const cacheMode = this._urlsToCacheModes.get(url);\n const request = new Request(url, {\n integrity,\n cache: cacheMode,\n credentials: 'same-origin',\n });\n await Promise.all(this.strategy.handleAll({\n params: { cacheKey },\n request,\n event,\n }));\n }\n const { updatedURLs, notUpdatedURLs } = installReportPlugin;\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(updatedURLs, notUpdatedURLs);\n }\n return { updatedURLs, notUpdatedURLs };\n });\n }\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise<module:workbox-precaching.CleanupResult>}\n */\n activate(event) {\n // waitUntil returns Promise<any>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const cache = await self.caches.open(this.strategy.cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n return { deletedURLs };\n });\n }\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map<string, string>} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array<string>} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location.href);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n /**\n * @param {string} url A cache key whose SRI you want to look up.\n * @return {string} The subresource integrity associated with the cache key,\n * or undefined if it's not set.\n */\n getIntegrityForCacheKey(cacheKey) {\n return this._cacheKeysToIntegrities.get(cacheKey);\n }\n /**\n * This acts as a drop-in replacement for\n * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n * with the following differences:\n *\n * - It knows what the name of the precache is, and only checks in that cache.\n * - It allows you to pass in an \"original\" URL without versioning parameters,\n * and it will automatically look up the correct cache key for the currently\n * active revision of that URL.\n *\n * E.g., `matchPrecache('index.html')` will find the correct precached\n * response for the currently active service worker, even if the actual cache\n * key is `'/index.html?__WB_REVISION__=1234abcd'`.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise<Response|undefined>}\n */\n async matchPrecache(request) {\n const url = request instanceof Request ? request.url : request;\n const cacheKey = this.getCacheKeyForURL(url);\n if (cacheKey) {\n const cache = await self.caches.open(this.strategy.cacheName);\n return cache.match(cacheKey);\n }\n return undefined;\n }\n /**\n * Returns a function that looks up `url` in the precache (taking into\n * account revision information), and returns the corresponding `Response`.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @return {module:workbox-routing~handlerCallback}\n */\n createHandlerBoundToURL(url) {\n const cacheKey = this.getCacheKeyForURL(url);\n if (!cacheKey) {\n throw new WorkboxError('non-precached-url', { url });\n }\n return (options) => {\n options.request = new Request(url);\n options.params = Object.assign({ cacheKey }, options.params);\n return this.strategy.handle(options);\n };\n }\n}\nexport { PrecacheController };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { PrecacheController } from '../PrecacheController.js';\nimport '../_version.js';\nlet precacheController;\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { generateURLVariations } from './utils/generateURLVariations.js';\nimport './_version.js';\n/**\n * A subclass of [Route]{@link module:workbox-routing.Route} that takes a\n * [PrecacheController]{@link module:workbox-precaching.PrecacheController}\n * instance and uses it to match incoming requests and handle fetching\n * responses from the precache.\n *\n * @memberof module:workbox-precaching\n * @extends module:workbox-routing.Route\n */\nclass PrecacheRoute extends Route {\n /**\n * @param {PrecacheController} precacheController A `PrecacheController`\n * instance used to both match requests and respond to fetch events.\n * @param {Object} [options] Options to control how requests are matched\n * against the list of precached URLs.\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array<RegExp>} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {module:workbox-precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URLs that should be checked for precache matches.\n */\n constructor(precacheController, options) {\n const match = ({ request }) => {\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(request.url, options)) {\n const cacheKey = urlsToCacheKeys.get(possibleURL);\n if (cacheKey) {\n const integrity = precacheController.getIntegrityForCacheKey(cacheKey);\n return { cacheKey, integrity };\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` +\n getFriendlyURL(request.url));\n }\n return;\n };\n super(match, precacheController.strategy);\n }\n}\nexport { PrecacheRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { removeIgnoredSearchParams } from './removeIgnoredSearchParams.js';\nimport '../_version.js';\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function* generateURLVariations(url, { ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], directoryIndex = 'index.html', cleanURLs = true, urlManipulation, } = {}) {\n const urlObject = new URL(url, location.href);\n urlObject.hash = '';\n yield urlObject.href;\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams.href);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams.href);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n if (urlManipulation) {\n const additionalURLs = urlManipulation({ url: urlObject });\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array<RegExp>} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n return urlObject;\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport { PrecacheRoute } from './PrecacheRoute.js';\nimport './_version.js';\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} [options] See\n * [PrecacheRoute options]{@link module:workbox-precaching.PrecacheRoute}.\n *\n * @memberof module:workbox-precaching\n */\nfunction addRoute(options) {\n const precacheController = getOrCreatePrecacheController();\n const precacheRoute = new PrecacheRoute(precacheController, options);\n registerRoute(precacheRoute);\n}\nexport { addRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call [registerRoute()]{@link module:workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|module:workbox-routing.Route~matchCallback|module:workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {module:workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {module:workbox-routing.Route} The generated `Route`(Useful for\n * unregistering).\n *\n * @memberof module:workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http') ?\n captureUrl.pathname : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if ((new RegExp(`${wildcards}`)).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if ((url.pathname === captureUrl.pathname) &&\n (url.origin !== captureUrl.origin)) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { addRoute } from './addRoute.js';\nimport { precache } from './precache.js';\nimport './_version.js';\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * [precache()]{@link module:workbox-precaching.precache} and\n * [addRoute()]{@link module:workbox-precaching.addRoute} in a single call.\n *\n * @param {Array<Object|string>} entries Array of entries to precache.\n * @param {Object} [options] See\n * [PrecacheRoute options]{@link module:workbox-precaching.PrecacheRoute}.\n *\n * @memberof module:workbox-precaching\n */\nfunction precacheAndRoute(entries, options) {\n precache(entries);\n addRoute(options);\n}\nexport { precacheAndRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * [\"precache cache\"]{@link module:workbox-core.cacheNames} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * [addRoute()]{@link module:workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * [precacheAndRoute()]{@link module:workbox-precaching.precacheAndRoute}.\n *\n * @param {Array<Object|string>} [entries=[]] Array of entries to precache.\n *\n * @memberof module:workbox-precaching\n */\nfunction precache(entries) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.precache(entries);\n}\nexport { precache };\n"],"names":["self","_","e","messageGenerator","code","args","msg","length","JSON","stringify","WorkboxError","Error","constructor","errorCode","details","super","this","name","normalizeHandler","handler","handle","Route","match","method","setCatchHandler","catchHandler","RegExpRoute","regExp","url","result","exec","href","origin","location","index","slice","Router","_routes","Map","_defaultHandlerMap","routes","addFetchListener","addEventListener","event","request","responsePromise","handleRequest","respondWith","addCacheListener","data","type","payload","requestPromises","Promise","all","urlsToCache","map","entry","Request","waitUntil","ports","then","postMessage","URL","protocol","startsWith","sameOrigin","params","route","findMatchingRoute","has","get","err","reject","_catchHandler","catch","async","catchErr","matchResult","Array","isArray","Object","keys","undefined","setDefaultHandler","set","registerRoute","push","unregisterRoute","routeIndex","indexOf","splice","defaultRouter","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","value","join","cacheNames","userCacheName","asyncFn","returnPromise","createCacheKey","urlObject","cacheKey","revision","cacheKeyURL","originalURL","searchParams","PrecacheInstallReportPlugin","updatedURLs","notUpdatedURLs","handlerWillStart","state","originalRequest","cachedResponseWillBeUsed","cachedResponse","PrecacheCacheKeyPlugin","precacheController","cacheKeyWillBeUsed","_precacheController","getCacheKeyForURL","headers","supportStatus","copyResponse","response","modifier","clonedResponse","clone","responseInit","Headers","status","statusText","modifiedResponseInit","body","testResponse","Response","error","canConstructResponseFromBodyStream","blob","stripParams","fullURL","ignoreParams","strippedURL","param","delete","Deferred","promise","resolve","quotaErrorCallbacks","Set","toRequest","input","StrategyHandler","strategy","options","_cacheKeys","assign","_strategy","_handlerDeferred","_extendLifetimePromises","_plugins","plugins","_pluginStateMap","plugin","mode","FetchEvent","preloadResponse","possiblePreloadResponse","hasCallback","cb","iterateCallbacks","thrownErrorMessage","message","pluginFilteredRequest","fetchResponse","fetch","fetchOptions","callback","runCallbacks","responseClone","cachePut","key","matchOptions","effectiveRequest","getCacheKey","multiMatchOptions","caches","ms","setTimeout","String","replace","RegExp","responseToCache","_ensureResponseSafeToCache","cache","open","hasCacheUpdateCallback","oldResponse","strippedRequestURL","keysOptions","ignoreSearch","cacheKeys","cacheMatchIgnoreParams","put","executeQuotaErrorCallbacks","newResponse","statefulCallback","statefulParam","shift","destroy","pluginsUsed","PrecacheStrategy","responseDone","handleAll","_getResponse","_awaitComplete","_handle","doneWaiting","waitUntilError","_fallbackToNetwork","fallbackToNetwork","copyRedirectedCacheableResponsesPlugin","cacheMatch","_handleInstall","_handleFetch","integrityInManifest","integrity","integrityInRequest","noIntegrityConflict","_useDefaultCacheabilityPluginIfNeeded","defaultPluginIndex","cacheWillUpdatePluginCount","entries","defaultPrecacheCacheabilityPlugin","cacheWillUpdate","redirected","PrecacheController","_urlsToCacheKeys","_urlsToCacheModes","_cacheKeysToIntegrities","install","bind","activate","addToCacheList","_installAndActiveListenersAdded","urlsToWarnAbout","cacheMode","firstEntry","secondEntry","warningMessage","console","warn","installReportPlugin","credentials","currentlyCachedRequests","expectedCacheKeys","values","deletedURLs","getURLsToCacheKeys","getCachedURLs","getIntegrityForCacheKey","createHandlerBoundToURL","getOrCreatePrecacheController","PrecacheRoute","urlsToCacheKeys","possibleURL","ignoreURLParametersMatching","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","paramName","some","test","removeIgnoredSearchParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","generateURLVariations","addRoute","capture","captureUrl","moduleName","funcName"],"mappings":"qEAEA,IACIA,KAAK,uBAAyBC,IAElC,MAAOC,ICEP,MCgBaC,EAdI,CAACC,KAASC,KACvB,IAAIC,EAAMF,EAIV,OAHIC,EAAKE,OAAS,IACdD,GAAQ,OAAME,KAAKC,UAAUJ,MAE1BC,GCIX,MAAMI,UAAqBC,MASvBC,YAAYC,EAAWC,GAEnBC,MADgBZ,EAAiBU,EAAWC,IAE5CE,KAAKC,KAAOJ,EACZG,KAAKF,QAAUA,GC7BvB,IACId,KAAK,0BAA4BC,IAErC,MAAOC,ICWA,MCAMgB,EAAoBC,GACzBA,GAA8B,iBAAZA,EASXA,EAWA,CAAEC,OAAQD,GCjBzB,MAAME,EAYFT,YAAYU,EAAOH,EAASI,EFhBH,OE8BrBP,KAAKG,QAAUD,EAAiBC,GAChCH,KAAKM,MAAQA,EACbN,KAAKO,OAASA,EAOlBC,gBAAgBL,GACZH,KAAKS,aAAeP,EAAiBC,IChC7C,MAAMO,UAAoBL,EActBT,YAAYe,EAAQR,EAASI,GAiCzBR,OAxBc,EAAGa,IAAAA,MACb,MAAMC,EAASF,EAAOG,KAAKF,EAAIG,MAE/B,GAAKF,IAOAD,EAAII,SAAWC,SAASD,QAA6B,IAAjBH,EAAOK,OAYhD,OAAOL,EAAOM,MAAM,KAEXhB,EAASI,ICxC9B,MAAMa,EAIFxB,cACII,KAAKqB,EAAU,IAAIC,IACnBtB,KAAKuB,EAAqB,IAAID,IAO9BE,aACA,OAAOxB,KAAKqB,EAMhBI,mBAEIzC,KAAK0C,iBAAiB,SAAWC,IAC7B,MAAMC,QAAEA,GAAYD,EACdE,EAAkB7B,KAAK8B,cAAc,CAAEF,QAAAA,EAASD,MAAAA,IAClDE,GACAF,EAAMI,YAAYF,MA0B9BG,mBAEIhD,KAAK0C,iBAAiB,WAAaC,IAE/B,GAAIA,EAAMM,MAA4B,eAApBN,EAAMM,KAAKC,KAAuB,CAChD,MAAMC,QAAEA,GAAYR,EAAMM,KAIpBG,EAAkBC,QAAQC,IAAIH,EAAQI,YAAYC,KAAKC,IACpC,iBAAVA,IACPA,EAAQ,CAACA,IAEb,MAAMb,EAAU,IAAIc,WAAWD,GAC/B,OAAOzC,KAAK8B,cAAc,CAAEF,QAAAA,EAASD,MAAAA,QAKzCA,EAAMgB,UAAUP,GAEZT,EAAMiB,OAASjB,EAAMiB,MAAM,IACtBR,EAAgBS,MAAK,IAAMlB,EAAMiB,MAAM,GAAGE,aAAY,SAiB3EhB,eAAcF,QAAEA,EAAFD,MAAWA,IASrB,MAAMf,EAAM,IAAImC,IAAInB,EAAQhB,IAAKK,SAASF,MAC1C,IAAKH,EAAIoC,SAASC,WAAW,QAIzB,OAEJ,MAAMC,EAAatC,EAAII,SAAWC,SAASD,QACrCmC,OAAEA,EAAFC,MAAUA,GAAUpD,KAAKqD,kBAAkB,CAC7C1B,MAAAA,EACAC,QAAAA,EACAsB,WAAAA,EACAtC,IAAAA,IAEJ,IAAIT,EAAUiD,GAASA,EAAMjD,QAgB7B,MAAMI,EAASqB,EAAQrB,OAQvB,IAPKJ,GAAWH,KAAKuB,EAAmB+B,IAAI/C,KAKxCJ,EAAUH,KAAKuB,EAAmBgC,IAAIhD,KAErCJ,EAMD,OAkBJ,IAAI0B,EACJ,IACIA,EAAkB1B,EAAQC,OAAO,CAAEQ,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,EAAOwB,OAAAA,IAE5D,MAAOK,GACH3B,EAAkBQ,QAAQoB,OAAOD,GAGrC,MAAM/C,EAAe2C,GAASA,EAAM3C,aAsCpC,OArCIoB,aAA2BQ,UAAYrC,KAAK0D,GAAiBjD,KAC7DoB,EAAkBA,EAAgB8B,OAAMC,MAAAA,IAEpC,GAAInD,EAUA,IACI,aAAaA,EAAaL,OAAO,CAAEQ,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,EAAOwB,OAAAA,IAE5D,MAAOU,GACCA,aAAoBlE,QACpB6D,EAAMK,GAIlB,GAAI7D,KAAK0D,EAUL,OAAO1D,KAAK0D,EAActD,OAAO,CAAEQ,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,IAErD,MAAM6B,MAGP3B,EAiBXwB,mBAAkBzC,IAAEA,EAAFsC,WAAOA,EAAPtB,QAAmBA,EAAnBD,MAA4BA,IAC1C,MAAMH,EAASxB,KAAKqB,EAAQkC,IAAI3B,EAAQrB,SAAW,GACnD,IAAK,MAAM6C,KAAS5B,EAAQ,CACxB,IAAI2B,EAGJ,MAAMW,EAAcV,EAAM9C,MAAM,CAAEM,IAAAA,EAAKsC,WAAAA,EAAYtB,QAAAA,EAASD,MAAAA,IAC5D,GAAImC,EA6BA,OAjBAX,EAASW,GACLC,MAAMC,QAAQb,IAA6B,IAAlBA,EAAO5D,QAI1BuE,EAAYlE,cAAgBqE,QACE,IAApCA,OAAOC,KAAKJ,GAAavE,QAIG,kBAAhBuE,KAPZX,OAASgB,GAcN,CAAEf,MAAAA,EAAOD,OAAAA,GAIxB,MAAO,GAgBXiB,kBAAkBjE,EAASI,EJxSF,OIySrBP,KAAKuB,EAAmB8C,IAAI9D,EAAQL,EAAiBC,IASzDK,gBAAgBL,GACZH,KAAK0D,EAAgBxD,EAAiBC,GAO1CmE,cAAclB,GAiCLpD,KAAKqB,EAAQiC,IAAIF,EAAM7C,SACxBP,KAAKqB,EAAQgD,IAAIjB,EAAM7C,OAAQ,IAInCP,KAAKqB,EAAQkC,IAAIH,EAAM7C,QAAQgE,KAAKnB,GAOxCoB,gBAAgBpB,GACZ,IAAKpD,KAAKqB,EAAQiC,IAAIF,EAAM7C,QACxB,MAAM,IAAIb,EAAa,6CAA8C,CACjEa,OAAQ6C,EAAM7C,SAGtB,MAAMkE,EAAazE,KAAKqB,EAAQkC,IAAIH,EAAM7C,QAAQmE,QAAQtB,GAC1D,KAAIqB,GAAc,GAId,MAAM,IAAI/E,EAAa,yCAHvBM,KAAKqB,EAAQkC,IAAIH,EAAM7C,QAAQoE,OAAOF,EAAY,ICtX9D,IAAIG,ECDJ,MAAMC,EAAoB,CACtBC,gBAAiB,kBACjBC,SAAU,cACVC,OAAQ,UACRC,QAAS,UACTC,OAAgC,oBAAjBC,aAA+BA,aAAaC,MAAQ,IAEjEC,EAAoBC,GACf,CAACT,EAAkBG,OAAQM,EAAWT,EAAkBK,QAC1DK,QAAQC,GAAUA,GAASA,EAAMjG,OAAS,IAC1CkG,KAAK,KAODC,EAWSC,GACPA,GAAiBN,EAAiBR,EAAkBE,UAZtDW,EAiBQC,GACNA,GAAiBN,EAAiBR,EAAkBI,SC3BnE,SAAStC,EAAUhB,EAAOiE,GACtB,MAAMC,EAAgBD,IAEtB,OADAjE,EAAMgB,UAAUkD,GACTA,ECjBX,IACI7G,KAAK,6BAA+BC,IAExC,MAAOC,ICeA,SAAS4G,EAAerD,GAC3B,IAAKA,EACD,MAAM,IAAI/C,EAAa,oCAAqC,CAAE+C,MAAAA,IAIlE,GAAqB,iBAAVA,EAAoB,CAC3B,MAAMsD,EAAY,IAAIhD,IAAIN,EAAOxB,SAASF,MAC1C,MAAO,CACHiF,SAAUD,EAAUhF,KACpBH,IAAKmF,EAAUhF,MAGvB,MAAMkF,SAAEA,EAAFrF,IAAYA,GAAQ6B,EAC1B,IAAK7B,EACD,MAAM,IAAIlB,EAAa,oCAAqC,CAAE+C,MAAAA,IAIlE,IAAKwD,EAAU,CACX,MAAMF,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACxC,MAAO,CACHiF,SAAUD,EAAUhF,KACpBH,IAAKmF,EAAUhF,MAKvB,MAAMmF,EAAc,IAAInD,IAAInC,EAAKK,SAASF,MACpCoF,EAAc,IAAIpD,IAAInC,EAAKK,SAASF,MAE1C,OADAmF,EAAYE,aAAa/B,IAxCC,kBAwC0B4B,GAC7C,CACHD,SAAUE,EAAYnF,KACtBH,IAAKuF,EAAYpF,MCvCzB,MAAMsF,EACFzG,cACII,KAAKsG,YAAc,GACnBtG,KAAKuG,eAAiB,GACtBvG,KAAKwG,iBAAmB5C,OAAShC,QAAAA,EAAS6E,MAAAA,MAElCA,IACAA,EAAMC,gBAAkB9E,IAGhC5B,KAAK2G,yBAA2B/C,OAASjC,MAAAA,EAAO8E,MAAAA,EAAOG,eAAAA,MACnD,GAAmB,YAAfjF,EAAMO,MACFuE,GAASA,EAAMC,iBACZD,EAAMC,2BAA2BhE,QAAS,CAE7C,MAAM9B,EAAM6F,EAAMC,gBAAgB9F,IAC9BgG,EACA5G,KAAKuG,eAAehC,KAAK3D,GAGzBZ,KAAKsG,YAAY/B,KAAK3D,GAIlC,OAAOgG,ICxBnB,MAAMC,EACFjH,aAAYkH,mBAAEA,IACV9G,KAAK+G,mBAAqBnD,OAAShC,QAAAA,EAASuB,OAAAA,MAGxC,MAAM6C,GAAY7C,MAAAA,OAAuC,EAASA,EAAO6C,WACrEhG,KAAKgH,EAAoBC,kBAAkBrF,EAAQhB,KAEvD,OAAOoF,EACD,IAAItD,QAAQsD,EAAU,CAAEkB,QAAStF,EAAQsF,UACzCtF,GAEV5B,KAAKgH,EAAsBF,GClBnC,IAAIK,ECqBJvD,eAAewD,EAAaC,EAAUC,GAClC,IAAItG,EAAS,KAEb,GAAIqG,EAASzG,IAAK,CAEdI,EADoB,IAAI+B,IAAIsE,EAASzG,KAChBI,OAEzB,GAAIA,IAAWhC,KAAKiC,SAASD,OACzB,MAAM,IAAItB,EAAa,6BAA8B,CAAEsB,OAAAA,IAE3D,MAAMuG,EAAiBF,EAASG,QAE1BC,EAAe,CACjBP,QAAS,IAAIQ,QAAQH,EAAeL,SACpCS,OAAQJ,EAAeI,OACvBC,WAAYL,EAAeK,YAGzBC,EAAuBP,EAAWA,EAASG,GAAgBA,EAI3DK,EDjCV,WACI,QAAsB3D,IAAlBgD,EAA6B,CAC7B,MAAMY,EAAe,IAAIC,SAAS,IAClC,GAAI,SAAUD,EACV,IACI,IAAIC,SAASD,EAAaD,MAC1BX,GAAgB,EAEpB,MAAOc,GACHd,GAAgB,EAGxBA,GAAgB,EAEpB,OAAOA,ECmBMe,GACTX,EAAeO,WAAaP,EAAeY,OAC/C,OAAO,IAAIH,SAASF,EAAMD,GC9C9B,SAASO,EAAYC,EAASC,GAC1B,MAAMC,EAAc,IAAIxF,IAAIsF,GAC5B,IAAK,MAAMG,KAASF,EAChBC,EAAYnC,aAAaqC,OAAOD,GAEpC,OAAOD,EAAYxH,KCIvB,MAAM2H,EAIF9I,cACII,KAAK2I,QAAU,IAAItG,SAAQ,CAACuG,EAASnF,KACjCzD,KAAK4I,QAAUA,EACf5I,KAAKyD,OAASA,MCZ1B,MAAMoF,EAAsB,IAAIC,ICThC,IACI9J,KAAK,6BAA+BC,IAExC,MAAOC,ICWP,SAAS6J,EAAUC,GACf,MAAyB,iBAAVA,EAAsB,IAAItG,QAAQsG,GAASA,EAW9D,MAAMC,EAkBFrJ,YAAYsJ,EAAUC,GAClBnJ,KAAKoJ,EAAa,GA8ClBnF,OAAOoF,OAAOrJ,KAAMmJ,GACpBnJ,KAAK2B,MAAQwH,EAAQxH,MACrB3B,KAAKsJ,EAAYJ,EACjBlJ,KAAKuJ,EAAmB,IAAIb,EAC5B1I,KAAKwJ,EAA0B,GAG/BxJ,KAAKyJ,EAAW,IAAIP,EAASQ,SAC7B1J,KAAK2J,EAAkB,IAAIrI,IAC3B,IAAK,MAAMsI,KAAU5J,KAAKyJ,EACtBzJ,KAAK2J,EAAgBtF,IAAIuF,EAAQ,IAErC5J,KAAK2B,MAAMgB,UAAU3C,KAAKuJ,EAAiBZ,SAepC/E,YAACoF,GACR,MAAMrH,MAAEA,GAAU3B,KAClB,IAAI4B,EAAUmH,EAAUC,GACxB,GAAqB,aAAjBpH,EAAQiI,MACRlI,aAAiBmI,YACjBnI,EAAMoI,gBAAiB,CACvB,MAAMC,QAAgCrI,EAAMoI,gBAC5C,GAAIC,EAKA,OAAOA,EAMf,MAAMtD,EAAkB1G,KAAKiK,YAAY,gBACrCrI,EAAQ4F,QAAU,KACtB,IACI,IAAK,MAAM0C,KAAMlK,KAAKmK,iBAAiB,oBACnCvI,QAAgBsI,EAAG,CAAEtI,QAASA,EAAQ4F,QAAS7F,MAAAA,IAGvD,MAAO6B,GACH,GAAIA,aAAe7D,MACf,MAAM,IAAID,EAAa,kCAAmC,CAAE0K,mBAAoB5G,EAAI6G,UAM5F,MAAMC,EAAwB1I,EAAQ4F,QACtC,IACI,IAAI+C,EAEJA,QAAsBC,MAAM5I,EAA0B,aAAjBA,EAAQiI,UACzC1F,EAAYnE,KAAKsJ,EAAUmB,cAM/B,IAAK,MAAMC,KAAY1K,KAAKmK,iBAAiB,mBACzCI,QAAsBG,EAAS,CAC3B/I,MAAAA,EACAC,QAAS0I,EACTjD,SAAUkD,IAGlB,OAAOA,EAEX,MAAOtC,GAeH,MARIvB,SACM1G,KAAK2K,aAAa,eAAgB,CACpC1C,MAAOA,EACPtG,MAAAA,EACA+E,gBAAiBA,EAAgBc,QACjC5F,QAAS0I,EAAsB9C,UAGjCS,GAaQrE,uBAACoF,GACnB,MAAM3B,QAAiBrH,KAAKwK,MAAMxB,GAC5B4B,EAAgBvD,EAASG,QAE/B,OADKxH,KAAK2C,UAAU3C,KAAK6K,SAAS7B,EAAO4B,IAClCvD,EAcKzD,iBAACkH,GACb,MAAMlJ,EAAUmH,EAAU+B,GAC1B,IAAIlE,EACJ,MAAMtB,UAAEA,EAAFyF,aAAaA,GAAiB/K,KAAKsJ,EACnC0B,QAAyBhL,KAAKiL,YAAYrJ,EAAS,QACnDsJ,EAAoBjH,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAI0B,GAAe,CAAEzF,UAAAA,IAC3EsB,QAAuBuE,OAAO7K,MAAM0K,EAAkBE,GAStD,IAAK,MAAMR,KAAY1K,KAAKmK,iBAAiB,4BACzCvD,QAAwB8D,EAAS,CAC7BpF,UAAAA,EACAyF,aAAAA,EACAnE,eAAAA,EACAhF,QAASoJ,EACTrJ,MAAO3B,KAAK2B,cACTwC,EAEX,OAAOyC,EAiBGhD,eAACkH,EAAKzD,GAChB,MAAMzF,EAAUmH,EAAU+B,GCtP3B,IAAiBM,QAAAA,EDyPF,ECxPX,IAAI/I,SAASuG,GAAYyC,WAAWzC,EAASwC,MDyPhD,MAAMJ,QAAyBhL,KAAKiL,YAAYrJ,EAAS,SAiBzD,IAAKyF,EAKD,MAAM,IAAI3H,EAAa,6BAA8B,CACjDkB,KExRQA,EFwRYoK,EAAiBpK,IEvRlC,IAAImC,IAAIuI,OAAO1K,GAAMK,SAASF,MAG/BA,KAAKwK,QAAQ,IAAIC,OAAQ,IAAGvK,SAASD,UAAW,OAJ1CJ,IAAAA,EF2RhB,MAAM6K,QAAwBzL,KAAK0L,EAA2BrE,GAC9D,IAAKoE,EAKD,OAAO,EAEX,MAAMnG,UAAEA,EAAFyF,aAAaA,GAAiB/K,KAAKsJ,EACnCqC,QAAc3M,KAAKmM,OAAOS,KAAKtG,GAC/BuG,EAAyB7L,KAAKiK,YAAY,kBAC1C6B,EAAcD,QJpR5BjI,eAAsC+H,EAAO/J,EAAS0G,EAAcyC,GAChE,MAAMgB,EAAqB3D,EAAYxG,EAAQhB,IAAK0H,GAEpD,GAAI1G,EAAQhB,MAAQmL,EAChB,OAAOJ,EAAMrL,MAAMsB,EAASmJ,GAGhC,MAAMiB,EAAc/H,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAI0B,GAAe,CAAEkB,cAAc,IAC7EC,QAAkBP,EAAMzH,KAAKtC,EAASoK,GAC5C,IAAK,MAAMhG,KAAYkG,EAEnB,GAAIH,IADwB3D,EAAYpC,EAASpF,IAAK0H,GAElD,OAAOqD,EAAMrL,MAAM0F,EAAU+E,GIwQkBoB,CAInDR,EAAOX,EAAiBxD,QAAS,CAAC,mBAAoBuD,GAClD,KAKJ,UACUY,EAAMS,IAAIpB,EAAkBa,EAC9BJ,EAAgBjE,QAAUiE,GAElC,MAAOxD,GACH,GAAIA,aAAiBtI,MAKjB,KAHmB,uBAAfsI,EAAMhI,YG9S1B2D,iBAKI,IAAK,MAAM8G,KAAY7B,QACb6B,IHySY2B,GAEJpE,EAGd,IAAK,MAAMyC,KAAY1K,KAAKmK,iBAAiB,wBACnCO,EAAS,CACXpF,UAAAA,EACAwG,YAAAA,EACAQ,YAAab,EAAgBjE,QAC7B5F,QAASoJ,EACTrJ,MAAO3B,KAAK2B,QAGpB,OAAO,EAaMiC,kBAAChC,EAASiI,GACvB,IAAK7J,KAAKoJ,EAAWS,GAAO,CACxB,IAAImB,EAAmBpJ,EACvB,IAAK,MAAM8I,KAAY1K,KAAKmK,iBAAiB,sBACzCa,EAAmBjC,QAAgB2B,EAAS,CACxCb,KAAAA,EACAjI,QAASoJ,EACTrJ,MAAO3B,KAAK2B,MAEZwB,OAAQnD,KAAKmD,UAGrBnD,KAAKoJ,EAAWS,GAAQmB,EAE5B,OAAOhL,KAAKoJ,EAAWS,GAS3BI,YAAYhK,GACR,IAAK,MAAM2J,KAAU5J,KAAKsJ,EAAUI,QAChC,GAAIzJ,KAAQ2J,EACR,OAAO,EAGf,OAAO,EAkBOhG,mBAAC3D,EAAMuI,GACrB,IAAK,MAAMkC,KAAY1K,KAAKmK,iBAAiBlK,SAGnCyK,EAASlC,GAYN2B,kBAAClK,GACd,IAAK,MAAM2J,KAAU5J,KAAKsJ,EAAUI,QAChC,GAA4B,mBAAjBE,EAAO3J,GAAsB,CACpC,MAAMwG,EAAQzG,KAAK2J,EAAgBpG,IAAIqG,GACjC2C,EAAoB/D,IACtB,MAAMgE,EAAgBvI,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAIb,GAAQ,CAAE/B,MAAAA,IAGhE,OAAOmD,EAAO3J,GAAMuM,UAElBD,GAiBlB5J,UAAUgG,GAEN,OADA3I,KAAKwJ,EAAwBjF,KAAKoE,GAC3BA,EAYM/E,oBACb,IAAI+E,EACJ,KAAOA,EAAU3I,KAAKwJ,EAAwBiD,eACpC9D,EAOd+D,UACI1M,KAAKuJ,EAAiBX,QAAQ,MAYFhF,QAACyD,GAC7B,IAAIoE,EAAkBpE,EAClBsF,GAAc,EAClB,IAAK,MAAMjC,KAAY1K,KAAKmK,iBAAiB,mBAOzC,GANAsB,QAAyBf,EAAS,CAC9B9I,QAAS5B,KAAK4B,QACdyF,SAAUoE,EACV9J,MAAO3B,KAAK2B,cACTwC,EACPwI,GAAc,GACTlB,EACD,MAwBR,OArBKkB,GACGlB,GAA8C,MAA3BA,EAAgB9D,SACnC8D,OAAkBtH,GAmBnBsH,GInef,MAAMmB,UCRN,MAuBIhN,YAAYuJ,GAQRnJ,KAAKsF,UAAYI,EAA0ByD,EAAQ7D,WAQnDtF,KAAK0J,QAAUP,EAAQO,SAAW,GAQlC1J,KAAKyK,aAAetB,EAAQsB,aAQ5BzK,KAAK+K,aAAe5B,EAAQ4B,aAqBhC3K,OAAO+I,GACH,MAAO0D,GAAgB7M,KAAK8M,UAAU3D,GACtC,OAAO0D,EAwBXC,UAAU3D,GAEFA,aAAmBW,aACnBX,EAAU,CACNxH,MAAOwH,EACPvH,QAASuH,EAAQvH,UAGzB,MAAMD,EAAQwH,EAAQxH,MAChBC,EAAqC,iBAApBuH,EAAQvH,QAC3B,IAAIc,QAAQyG,EAAQvH,SACpBuH,EAAQvH,QACNuB,EAAS,WAAYgG,EAAUA,EAAQhG,YAASgB,EAChDhE,EAAU,IAAI8I,EAAgBjJ,KAAM,CAAE2B,MAAAA,EAAOC,QAAAA,EAASuB,OAAAA,IACtD0J,EAAe7M,KAAK+M,EAAa5M,EAASyB,EAASD,GAGzD,MAAO,CAACkL,EAFY7M,KAAKgN,EAAeH,EAAc1M,EAASyB,EAASD,IAI1DiC,QAACzD,EAASyB,EAASD,GAEjC,IAAI0F,QADElH,EAAQwK,aAAa,mBAAoB,CAAEhJ,MAAAA,EAAOC,QAAAA,IAExD,IAKI,GAJAyF,QAAiBrH,KAAKiN,EAAQrL,EAASzB,IAIlCkH,GAA8B,UAAlBA,EAASnF,KACtB,MAAM,IAAIxC,EAAa,cAAe,CAAEkB,IAAKgB,EAAQhB,MAG7D,MAAOqH,GACH,GAAIA,aAAiBtI,MACjB,IAAK,MAAM+K,KAAYvK,EAAQgK,iBAAiB,mBAE5C,GADA9C,QAAiBqD,EAAS,CAAEzC,MAAAA,EAAOtG,MAAAA,EAAOC,QAAAA,IACtCyF,EACA,MAIZ,IAAKA,EACD,MAAMY,EAQd,IAAK,MAAMyC,KAAYvK,EAAQgK,iBAAiB,sBAC5C9C,QAAiBqD,EAAS,CAAE/I,MAAAA,EAAOC,QAAAA,EAASyF,SAAAA,IAEhD,OAAOA,EAESzD,QAACiJ,EAAc1M,EAASyB,EAASD,GACjD,IAAI0F,EACAY,EACJ,IACIZ,QAAiBwF,EAErB,MAAO5E,IAKP,UACU9H,EAAQwK,aAAa,oBAAqB,CAC5ChJ,MAAAA,EACAC,QAAAA,EACAyF,SAAAA,UAEElH,EAAQ+M,cAElB,MAAOC,GACCA,aAA0BxN,QAC1BsI,EAAQkF,GAUhB,SAPMhN,EAAQwK,aAAa,qBAAsB,CAC7ChJ,MAAAA,EACAC,QAAAA,EACAyF,SAAAA,EACAY,MAAOA,IAEX9H,EAAQuM,UACJzE,EACA,MAAMA,IDlKdrI,YAAYuJ,GACRA,EAAQ7D,UAAYI,EAA2ByD,EAAQ7D,WACvDvF,MAAMoJ,GACNnJ,KAAKoN,GAC6B,IAA9BjE,EAAQkE,kBAKZrN,KAAK0J,QAAQnF,KAAKqI,EAAiBU,wCAS1B1J,QAAChC,EAASzB,GACnB,MAAMkH,QAAiBlH,EAAQoN,WAAW3L,GAC1C,OAAIyF,IAKAlH,EAAQwB,OAAgC,YAAvBxB,EAAQwB,MAAMO,WAClBlC,KAAKwN,EAAe5L,EAASzB,SAIjCH,KAAKyN,EAAa7L,EAASzB,IAE1ByD,QAAChC,EAASzB,GACxB,IAAIkH,EACJ,MAAMlE,EAAUhD,EAAQgD,QAAU,GAElC,IAAInD,KAAKoN,EA+BL,MAAM,IAAI1N,EAAa,yBAA0B,CAC7C4F,UAAWtF,KAAKsF,UAChB1E,IAAKgB,EAAQhB,MAjCQ,CAMzB,MAAM8M,EAAsBvK,EAAOwK,UAC7BC,EAAqBhM,EAAQ+L,UAC7BE,GAAuBD,GAAsBA,IAAuBF,EAC1ErG,QAAiBlH,EAAQqK,MAAM,IAAI9H,QAAQd,EAAS,CAChD+L,UAAWC,GAAsBF,KAOjCA,GAAuBG,IACvB7N,KAAK8N,UACmB3N,EAAQ0K,SAASjJ,EAASyF,EAASG,UA+BnE,OAAOH,EAESzD,QAAChC,EAASzB,GAC1BH,KAAK8N,IACL,MAAMzG,QAAiBlH,EAAQqK,MAAM5I,GAIrC,UADwBzB,EAAQ0K,SAASjJ,EAASyF,EAASG,SAIvD,MAAM,IAAI9H,EAAa,0BAA2B,CAC9CkB,IAAKgB,EAAQhB,IACb+G,OAAQN,EAASM,SAGzB,OAAON,EA6BXyG,IACI,IAAIC,EAAqB,KACrBC,EAA6B,EACjC,IAAK,MAAO9M,EAAO0I,KAAW5J,KAAK0J,QAAQuE,UAEnCrE,IAAWgD,EAAiBU,yCAI5B1D,IAAWgD,EAAiBsB,oCAC5BH,EAAqB7M,GAErB0I,EAAOuE,iBACPH,KAG2B,IAA/BA,EACAhO,KAAK0J,QAAQnF,KAAKqI,EAAiBsB,mCAE9BF,EAA6B,GAA4B,OAAvBD,GAEvC/N,KAAK0J,QAAQ/E,OAAOoJ,EAAoB,IAKpDnB,EAAiBsB,kCAAoC,CACjDtK,gBAAA,OAAsByD,SAAEA,MACfA,GAAYA,EAASM,QAAU,IACzB,KAEJN,GAGfuF,EAAiBU,uCAAyC,CACtD1J,gBAAA,OAAsByD,SAAEA,KACbA,EAAS+G,iBAAmBhH,EAAaC,GAAYA,GE3LpE,MAAMgH,EAWFzO,aAAY0F,UAAEA,EAAFoE,QAAaA,EAAU,GAAvB2D,kBAA2BA,GAAoB,GAAS,IAChErN,KAAKsO,EAAmB,IAAIhN,IAC5BtB,KAAKuO,EAAoB,IAAIjN,IAC7BtB,KAAKwO,EAA0B,IAAIlN,IACnCtB,KAAKsJ,EAAY,IAAIsD,EAAiB,CAClCtH,UAAWI,EAA2BJ,GACtCoE,QAAS,IACFA,EACH,IAAI7C,EAAuB,CAAEC,mBAAoB9G,QAErDqN,kBAAAA,IAGJrN,KAAKyO,QAAUzO,KAAKyO,QAAQC,KAAK1O,MACjCA,KAAK2O,SAAW3O,KAAK2O,SAASD,KAAK1O,MAMnCkJ,eACA,OAAOlJ,KAAKsJ,EAYhBvE,SAASkJ,GACLjO,KAAK4O,eAAeX,GACfjO,KAAK6O,IACN7P,KAAK0C,iBAAiB,UAAW1B,KAAKyO,SACtCzP,KAAK0C,iBAAiB,WAAY1B,KAAK2O,UACvC3O,KAAK6O,GAAkC,GAU/CD,eAAeX,GASX,MAAMa,EAAkB,GACxB,IAAK,MAAMrM,KAASwL,EAAS,CAEJ,iBAAVxL,EACPqM,EAAgBvK,KAAK9B,GAEhBA,QAA4B0B,IAAnB1B,EAAMwD,UACpB6I,EAAgBvK,KAAK9B,EAAM7B,KAE/B,MAAMoF,SAAEA,EAAFpF,IAAYA,GAAQkF,EAAerD,GACnCsM,EAA8B,iBAAVtM,GAAsBA,EAAMwD,SAClD,SAAW,UACf,GAAIjG,KAAKsO,EAAiBhL,IAAI1C,IAC1BZ,KAAKsO,EAAiB/K,IAAI3C,KAASoF,EACnC,MAAM,IAAItG,EAAa,wCAAyC,CAC5DsP,WAAYhP,KAAKsO,EAAiB/K,IAAI3C,GACtCqO,YAAajJ,IAGrB,GAAqB,iBAAVvD,GAAsBA,EAAMkL,UAAW,CAC9C,GAAI3N,KAAKwO,EAAwBlL,IAAI0C,IACjChG,KAAKwO,EAAwBjL,IAAIyC,KAAcvD,EAAMkL,UACrD,MAAM,IAAIjO,EAAa,4CAA6C,CAChEkB,IAAAA,IAGRZ,KAAKwO,EAAwBnK,IAAI2B,EAAUvD,EAAMkL,WAIrD,GAFA3N,KAAKsO,EAAiBjK,IAAIzD,EAAKoF,GAC/BhG,KAAKuO,EAAkBlK,IAAIzD,EAAKmO,GAC5BD,EAAgBvP,OAAS,EAAG,CAC5B,MAAM2P,EACD,qDAAQJ,EAAgBrJ,KAAK,8EAK9B0J,QAAQC,KAAKF,KAkB7BT,QAAQ9M,GAGJ,OAAOgB,EAAUhB,GAAOiC,UACpB,MAAMyL,EAAsB,IAAIhJ,EAChCrG,KAAKkJ,SAASQ,QAAQnF,KAAK8K,GAG3B,IAAK,MAAOzO,EAAKoF,KAAahG,KAAKsO,EAAkB,CACjD,MAAMX,EAAY3N,KAAKwO,EAAwBjL,IAAIyC,GAC7C+I,EAAY/O,KAAKuO,EAAkBhL,IAAI3C,GACvCgB,EAAU,IAAIc,QAAQ9B,EAAK,CAC7B+M,UAAAA,EACAhC,MAAOoD,EACPO,YAAa,sBAEXjN,QAAQC,IAAItC,KAAKkJ,SAAS4D,UAAU,CACtC3J,OAAQ,CAAE6C,SAAAA,GACVpE,QAAAA,EACAD,MAAAA,KAGR,MAAM2E,YAAEA,EAAFC,eAAeA,GAAmB8I,EAIxC,MAAO,CAAE/I,YAAAA,EAAaC,eAAAA,MAa9BoI,SAAShN,GAGL,OAAOgB,EAAUhB,GAAOiC,UACpB,MAAM+H,QAAc3M,KAAKmM,OAAOS,KAAK5L,KAAKkJ,SAAS5D,WAC7CiK,QAAgC5D,EAAMzH,OACtCsL,EAAoB,IAAI1G,IAAI9I,KAAKsO,EAAiBmB,UAClDC,EAAc,GACpB,IAAK,MAAM9N,KAAW2N,EACbC,EAAkBlM,IAAI1B,EAAQhB,aACzB+K,EAAMlD,OAAO7G,GACnB8N,EAAYnL,KAAK3C,EAAQhB,MAMjC,MAAO,CAAE8O,YAAAA,MASjBC,qBACI,OAAO3P,KAAKsO,EAQhBsB,gBACI,MAAO,IAAI5P,KAAKsO,EAAiBpK,QAWrC+C,kBAAkBrG,GACd,MAAMmF,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACxC,OAAOf,KAAKsO,EAAiB/K,IAAIwC,EAAUhF,MAO/C8O,wBAAwB7J,GACpB,OAAOhG,KAAKwO,EAAwBjL,IAAIyC,GAoBzBpC,oBAAChC,GAChB,MAAMhB,EAAMgB,aAAmBc,QAAUd,EAAQhB,IAAMgB,EACjDoE,EAAWhG,KAAKiH,kBAAkBrG,GACxC,GAAIoF,EAAU,CAEV,aADoBhH,KAAKmM,OAAOS,KAAK5L,KAAKkJ,SAAS5D,YACtChF,MAAM0F,IAY3B8J,wBAAwBlP,GACpB,MAAMoF,EAAWhG,KAAKiH,kBAAkBrG,GACxC,IAAKoF,EACD,MAAM,IAAItG,EAAa,oBAAqB,CAAEkB,IAAAA,IAElD,OAAQuI,IACJA,EAAQvH,QAAU,IAAIc,QAAQ9B,GAC9BuI,EAAQhG,OAASc,OAAOoF,OAAO,CAAErD,SAAAA,GAAYmD,EAAQhG,QAC9CnD,KAAKkJ,SAAS9I,OAAO+I,KCvRxC,IAAIrC,EAKG,MAAMiJ,EAAgC,KACpCjJ,IACDA,EAAqB,IAAIuH,GAEtBvH,GCGX,MAAMkJ,UAAsB3P,EAiBxBT,YAAYkH,EAAoBqC,GAgB5BpJ,OAfc,EAAG6B,QAAAA,MACb,MAAMqO,EAAkBnJ,EAAmB6I,qBAC3C,IAAK,MAAMO,KCtBhB,UAAgCtP,GAAKuP,4BAAEA,EAA8B,CAAC,QAAS,YAA1CC,eAAuDA,EAAiB,aAAxEC,UAAsFA,GAAY,EAAlGC,gBAAwGA,GAAqB,IACrK,MAAMvK,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACxCgF,EAAUwK,KAAO,SACXxK,EAAUhF,KAChB,MAAMyP,ECHH,SAAmCzK,EAAWoK,EAA8B,IAG/E,IAAK,MAAMM,IAAa,IAAI1K,EAAUK,aAAalC,QAC3CiM,EAA4BO,MAAM/P,GAAWA,EAAOgQ,KAAKF,MACzD1K,EAAUK,aAAaqC,OAAOgI,GAGtC,OAAO1K,EDLyB6K,CAA0B7K,EAAWoK,GAErE,SADMK,EAAwBzP,KAC1BqP,GAAkBI,EAAwBK,SAASC,SAAS,KAAM,CAClE,MAAMC,EAAe,IAAIhO,IAAIyN,EAAwBzP,MACrDgQ,EAAaF,UAAYT,QACnBW,EAAahQ,KAEvB,GAAIsP,EAAW,CACX,MAAMW,EAAW,IAAIjO,IAAIyN,EAAwBzP,MACjDiQ,EAASH,UAAY,cACfG,EAASjQ,KAEnB,GAAIuP,EAAiB,CACjB,MAAMW,EAAiBX,EAAgB,CAAE1P,IAAKmF,IAC9C,IAAK,MAAMmL,KAAgBD,QACjBC,EAAanQ,MDGOoQ,CAAsBvP,EAAQhB,IAAKuI,GAAU,CACnE,MAAMnD,EAAWiK,EAAgB1M,IAAI2M,GACrC,GAAIlK,EAAU,CAEV,MAAO,CAAEA,SAAAA,EAAU2H,UADD7G,EAAmB+I,wBAAwB7J,QAU5Dc,EAAmBoC,WG7BxC,SAASkI,EAASjI,GACd,MAAMrC,EAAqBiJ,KCM/B,SAAuBsB,EAASlR,EAASI,GACrC,IAAI6C,EACJ,GAAuB,iBAAZiO,EAAsB,CAC7B,MAAMC,EAAa,IAAIvO,IAAIsO,EAASpQ,SAASF,MAiC7CqC,EAAQ,IAAI/C,GAZU,EAAGO,IAAAA,KASdA,EAAIG,OAASuQ,EAAWvQ,MAGFZ,EAASI,QAEzC,GAAI8Q,aAAmB7F,OAExBpI,EAAQ,IAAI1C,EAAY2Q,EAASlR,EAASI,QAEzC,GAAuB,mBAAZ8Q,EAEZjO,EAAQ,IAAI/C,EAAMgR,EAASlR,EAASI,OAEnC,CAAA,KAAI8Q,aAAmBhR,GAIxB,MAAM,IAAIX,EAAa,yBAA0B,CAC7C6R,WAAY,kBACZC,SAAU,gBACVf,UAAW,YANfrN,EAAQiO,GzB7DPzM,IACDA,EAAgB,IAAIxD,EAEpBwD,EAAcnD,mBACdmD,EAAc5C,oBAEX4C,GyBiEON,cAAclB,GD7D5BkB,CADsB,IAAI0L,EAAclJ,EAAoBqC,uBEHhE,SAA0B8E,EAAS9E,ICInC,SAAkB8E,GACa8B,IACRhL,SAASkJ,GDL5BlJ,CAASkJ,GACTmD,EAASjI"} \ No newline at end of file